Django:Form和ModelForm介紹

Form介紹

我們之前在HTMl頁面中利用form表單向后端提交數(shù)據(jù)時(shí)章钾,都會(huì)協(xié)議系IE回去用戶輸入的標(biāo)簽并且用form標(biāo)簽把它們包起來为迈。

與此同時(shí)我們在好多場景下都需要對用戶輸入的數(shù)據(jù)做校驗(yàn),比如用戶輸入的長度和格式是否符合規(guī)范等等烈钞。如果用戶輸入錯(cuò)誤就會(huì)提示錯(cuò)誤信息珍剑。

Django form 組件的主要功能就實(shí)現(xiàn)了上述功能缕溉。

其實(shí),form組建的主要功能如下:

  • 生成頁面可用的HTML標(biāo)簽
  • 對用戶提交的數(shù)據(jù)進(jìn)行校驗(yàn)
  • 保留上次輸入的內(nèi)容

普通手寫注冊功能

views.py

# 注冊
def register(request):
    error_msg = ""
    if request.method == "POST":
        username = request.POST.get("name")
        pwd = request.POST.get("pwd")
        # 對注冊信息做校驗(yàn)
        if len(username) < 6:
            # 用戶長度小于6位
            error_msg = "用戶名長度不能小于6位"
        else:
            # 將用戶名和密碼存到數(shù)據(jù)庫
            return HttpResponse("注冊成功")
    return render(request, "register.html", {"error_msg": error_msg})

login.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注冊頁面</title>
</head>
<body>
<form action="/reg/" method="post">
    {% csrf_token %}
    <p>
        用戶名:
        <input type="text" name="name">
    </p>
    <p>
        密碼:
        <input type="password" name="pwd">
    </p>
    <p>
        <input type="submit" value="注冊">
        <p style="color: red">{{ error_msg }}</p>
    </p>
</form>
</body>
</html>

使用form組件實(shí)現(xiàn)注冊功能

views.py

先定義一個(gè)RegForm類

from django import forms

# 按照django form組件的要求自己寫一個(gè)類
class RegForm(forms.Form):
    name = forms.CharField(label='用戶名')
    pwd = forms.CharField(lable='密碼')

再寫一個(gè)視圖函數(shù):

# 使用form組件實(shí)現(xiàn)注冊方式
def register2(request):
    form_obj = RegForm()
    if request.method == "POST":
        # 實(shí)例化form對象的時(shí)候,把post提交過來的數(shù)據(jù)直接傳進(jìn)去
        form_obj = RegForm(request.POST)
        # 調(diào)用form_obj校驗(yàn)數(shù)據(jù)的方法
        if form_obj.is_valid():
            return HttpResponse("注冊成功")
    return render(request, "register2.html", {"form_obj": form_obj})

login2.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注冊2</title>
</head>
<body>
    <form action="/reg2/" method="post" novalidate autocomplete="off">
        {% csrf_token %}
        <div>
            <label for="{{ form_obj.name.id_for_label }}">{{ form_obj.name.label }}</label>
            {{ form_obj.name }} {{ form_obj.name.errors.0 }}
        </div>
        <div>
            <label for="{{ form_obj.pwd.id_for_label }}">{{ form_obj.pwd.label }}</label>
            {{ form_obj.pwd }} {{ form_obj.pwd.errors.0 }}
        </div>
        <div>
            <input type="submit" class="btn btn-success" value="注冊">
        </div>
    </form>
</body>
</html>

Form那些事兒

常用字段與插件

創(chuàng)建Form類時(shí)前联,主要涉及到【字段】和【插件】功戚,字段用于對用戶請求數(shù)據(jù)的驗(yàn)證,插件用于自動(dòng)生成HTML

initial:初始值似嗤,input框里面的初始值啸臀。

class LoginForm(forms.Form):
    username = forms.CharField(
        min_length=8,
        label="用戶名",
        initial="張三"  # 設(shè)置默認(rèn)值
    )
    pwd = forms.CharField(min_length=6, label="密碼")

error_messages:重寫錯(cuò)誤信息


class LoginForm(forms.Form):
    username = forms.CharField(
        min_length=8,
        label="用戶名",
        initial="張三",
        error_messages={
            "required": "不能為空",
            "invalid": "格式錯(cuò)誤",
            "min_length": "用戶名最短8位"
        }
    )
    pwd = forms.CharField(min_length=6, label="密碼"

password

class LoginForm(forms.Form):
    username = forms.CharField(
        min_length=8,
        label="用戶名",
        initial="張三",
        error_messages={
            "required": "不能為空",
            "invalid": "格式錯(cuò)誤",
            "min_length": "用戶名最短8位"
        }
    )
    pwd = forms.CharField(min_length=6, label="密碼")
    gender = forms.fields.ChoiceField(
        choices=((1, "男"), (2, "女"), (3, "保密")),
        label="性別",
        initial=3,
        widget=forms.widgets.RadioSelect()
    )

單選Select

class LoginForm(forms.Form):
    ...
    hobby = forms.fields.ChoiceField(
        choices=((1, "籃球"), (2, "足球"), (3, "雙色球"), ),
        label="愛好",
        initial=3,
        widget=forms.widgets.Select()
    )

多選Select

class LoginForm(forms.Form):
    ...
    hobby = forms.fields.MultipleChoiceField(
        choices=((1, "籃球"), (2, "足球"), (3, "雙色球"), ),
        label="愛好",
        initial=[1, 3],
        widget=forms.widgets.SelectMultiple()
    )

單選checkbox

class LoginForm(forms.Form):
    ...
    keep = forms.fields.ChoiceField(
        label="是否記住密碼",
        initial="checked",
        widget=forms.widgets.CheckboxInput()
    )

多選checkbox

class LoginForm(forms.Form):
    ...
    hobby = forms.fields.MultipleChoiceField(
        choices=((1, "籃球"), (2, "足球"), (3, "雙色球"),),
        label="愛好",
        initial=[1, 3],
        widget=forms.widgets.CheckboxSelectMultiple()
    )

chioce字段注意事項(xiàng):
在使用選擇標(biāo)簽的時(shí)候,需要注意chioces的選項(xiàng)可已配置從數(shù)據(jù)庫中獲取的數(shù)據(jù)烁落,但是由于靜態(tài)字段獲取的值無法實(shí)時(shí)更新乘粒,需要重寫構(gòu)造方法從而實(shí)現(xiàn)chioce實(shí)時(shí)更新

方式一

from django.forms import Form
from django.forms import widgets
from django.forms import fields

 
class MyForm(Form):
 
    user = fields.ChoiceField(
        # choices=((1, '上海'), (2, '北京'),),
        initial=2,
        widget=widgets.Select
    )
 
    def __init__(self, *args, **kwargs):
        super(MyForm,self).__init__(*args, **kwargs)
        # self.fields['user'].choices = ((1, '上海'), (2, '北京'),)
        # 或
        self.fields['user'].choices = models.Classes.objects.all().values_list('id','caption')

方式二

from django import forms
from django.forms import fields
from django.forms import models as form_model

 
class FInfo(forms.Form):
    authors = form_model.ModelMultipleChoiceField(queryset=models.NNewType.objects.all())  # 多選
    # authors = form_model.ModelChoiceField(queryset=models.NNewType.objects.all())  #單選

Django Form所有內(nèi)置字段

Field
    required=True,               是否允許為空
    widget=None,                 HTML插件
    label=None,                  用于生成Label標(biāo)簽或顯示內(nèi)容
    initial=None,                初始值
    help_text='',                幫助信息(在標(biāo)簽旁邊顯示)
    error_messages=None,         錯(cuò)誤信息 {'required': '不能為空', 'invalid': '格式錯(cuò)誤'}
    validators=[],               自定義驗(yàn)證規(guī)則
    localize=False,              是否支持本地化
    disabled=False,              是否可以編輯
    label_suffix=None            Label內(nèi)容后綴
 
 
CharField(Field)
    max_length=None,             最大長度
    min_length=None,             最小長度
    strip=True                   是否移除用戶輸入空白
 
IntegerField(Field)
    max_value=None,              最大值
    min_value=None,              最小值
 
FloatField(IntegerField)
    ...
 
DecimalField(IntegerField)
    max_value=None,              最大值
    min_value=None,              最小值
    max_digits=None,             總長度
    decimal_places=None,         小數(shù)位長度
 
BaseTemporalField(Field)
    input_formats=None          時(shí)間格式化   
 
DateField(BaseTemporalField)    格式:2015-09-01
TimeField(BaseTemporalField)    格式:11:12
DateTimeField(BaseTemporalField)格式:2015-09-01 11:12
 
DurationField(Field)            時(shí)間間隔:%d %H:%M:%S.%f
    ...
 
RegexField(CharField)
    regex,                      自定制正則表達(dá)式
    max_length=None,            最大長度
    min_length=None,            最小長度
    error_message=None,         忽略,錯(cuò)誤信息使用 error_messages={'invalid': '...'}
 
EmailField(CharField)      
    ...
 
FileField(Field)
    allow_empty_file=False     是否允許空文件
 
ImageField(FileField)      
    ...
    注:需要PIL模塊伤塌,pip3 install Pillow
    以上兩個(gè)字典使用時(shí)灯萍,需要注意兩點(diǎn):
        - form表單中 enctype="multipart/form-data"
        - view函數(shù)中 obj = MyForm(request.POST, request.FILES)
 
URLField(Field)
    ...
 
 
BooleanField(Field)  
    ...
 
NullBooleanField(BooleanField)
    ...
 
ChoiceField(Field)
    ...
    choices=(),                選項(xiàng),如:choices = ((0,'上海'),(1,'北京'),)
    required=True,             是否必填
    widget=None,               插件每聪,默認(rèn)select插件
    label=None,                Label內(nèi)容
    initial=None,              初始值
    help_text='',              幫助提示
 
 
ModelChoiceField(ChoiceField)
    ...                        django.forms.models.ModelChoiceField
    queryset,                  # 查詢數(shù)據(jù)庫中的數(shù)據(jù)
    empty_label="---------",   # 默認(rèn)空顯示內(nèi)容
    to_field_name=None,        # HTML中value的值對應(yīng)的字段
    limit_choices_to=None      # ModelForm中對queryset二次篩選
     
ModelMultipleChoiceField(ModelChoiceField)
    ...                        django.forms.models.ModelMultipleChoiceField
 
 
     
TypedChoiceField(ChoiceField)
    coerce = lambda val: val   對選中的值進(jìn)行一次轉(zhuǎn)換
    empty_value= ''            空值的默認(rèn)值
 
MultipleChoiceField(ChoiceField)
    ...
 
TypedMultipleChoiceField(MultipleChoiceField)
    coerce = lambda val: val   對選中的每一個(gè)值進(jìn)行一次轉(zhuǎn)換
    empty_value= ''            空值的默認(rèn)值
 
ComboField(Field)
    fields=()                  使用多個(gè)驗(yàn)證旦棉,如下:即驗(yàn)證最大長度20,又驗(yàn)證郵箱格式
                               fields.ComboField(fields=[fields.CharField(max_length=20), fields.EmailField(),])
 
MultiValueField(Field)
    PS: 抽象類熊痴,子類中可以實(shí)現(xiàn)聚合多個(gè)字典去匹配一個(gè)值他爸,要配合MultiWidget使用
 
SplitDateTimeField(MultiValueField)
    input_date_formats=None,   格式列表:['%Y--%m--%d', '%m%d/%Y', '%m/%d/%y']
    input_time_formats=None    格式列表:['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
 
FilePathField(ChoiceField)     文件選項(xiàng),目錄下文件顯示在頁面中
    path,                      文件夾路徑
    match=None,                正則匹配
    recursive=False,           遞歸下面的文件夾
    allow_files=True,          允許文件
    allow_folders=False,       允許文件夾
    required=True,
    widget=None,
    label=None,
    initial=None,
    help_text=''
 
GenericIPAddressField
    protocol='both',           both,ipv4,ipv6支持的IP格式
    unpack_ipv4=False          解析ipv4地址果善,如果是::ffff:192.0.2.1時(shí)候诊笤,可解析為192.0.2.1, PS:protocol必須為both才能啟用
 
SlugField(CharField)           數(shù)字巾陕,字母讨跟,下劃線,減號(連字符)
    ...
 
UUIDField(CharField)           uuid類型

字段校驗(yàn)

RegxValidator驗(yàn)證器

from django.forms import Form
from django.forms import widgets
from django.forms import fields
from django.core.validators import RegexValidator
 
class MyForm(Form):
    user = fields.CharField(
        validators=[RegexValidator(r'^[0-9]+$', '請輸入數(shù)字'), RegexValidator(r'^159[0-9]+$', '數(shù)字必須以159開頭')],
    )

自定義驗(yàn)證函數(shù)

import re
from django.forms import Form
from django.forms import widgets
from django.forms import fields
from django.core.exceptions import ValidationError
 
 
# 自定義驗(yàn)證規(guī)則
def mobile_validate(value):
    mobile_re = re.compile(r'^(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$')
    if not mobile_re.match(value):
        raise ValidationError('手機(jī)號碼格式錯(cuò)誤')
 
 
class PublishForm(Form):
 
 
    title = fields.CharField(max_length=20,
                            min_length=5,
                            error_messages={'required': '標(biāo)題不能為空',
                                            'min_length': '標(biāo)題最少為5個(gè)字符',
                                            'max_length': '標(biāo)題最多為20個(gè)字符'},
                            widget=widgets.TextInput(attrs={'class': "form-control",
                                                          'placeholder': '標(biāo)題5-20個(gè)字符'}))
 
 
    # 使用自定義驗(yàn)證規(guī)則
    phone = fields.CharField(validators=[mobile_validate, ],
                            error_messages={'required': '手機(jī)不能為空'},
                            widget=widgets.TextInput(attrs={'class': "form-control",
                                                          'placeholder': u'手機(jī)號碼'}))
 
    email = fields.EmailField(required=False,
                            error_messages={'required': u'郵箱不能為空','invalid': u'郵箱格式錯(cuò)誤'},
                            widget=widgets.TextInput(attrs={'class': "form-control", 'placeholder': u'郵箱'}))

Hook方法

除了上面兩種方式鄙煤,我們還可以在Form類中定義鉤子函數(shù)晾匠,來實(shí)現(xiàn)自定義的驗(yàn)證功能。

局部鉤子

我們在Form類中定義 clean_字段名() 方法梯刚,就能夠?qū)崿F(xiàn)對特定字段進(jìn)行校驗(yàn)凉馆。
舉個(gè)例子:

class LoginForm(forms.Form):
    username = forms.CharField(
        min_length=8,
        label="用戶名",
        initial="張三",
        error_messages={
            "required": "不能為空",
            "invalid": "格式錯(cuò)誤",
            "min_length": "用戶名最短8位"
        },
        widget=forms.widgets.TextInput(attrs={"class": "form-control"})
    )
    ...
    # 定義局部鉤子,用來校驗(yàn)username字段
    def clean_username(self):
        value = self.cleaned_data.get("username")
        if "666" in value:
            raise ValidationError("光喊666是不行的")
        else:
            return value

全局鉤子

我們在Form類重定義 clean() 方法亡资,就能夠?qū)崿F(xiàn)對字段進(jìn)行全局校驗(yàn)澜共。

class LoginForm(forms.Form):
    ...
    password = forms.CharField(
        min_length=6,
        label="密碼",
        widget=forms.widgets.PasswordInput(attrs={'class': 'form-control'}, render_value=True)
    )
    re_password = forms.CharField(
        min_length=6,
        label="確認(rèn)密碼",
        widget=forms.widgets.PasswordInput(attrs={'class': 'form-control'}, render_value=True)
    )
    ...
    # 定義全局的鉤子,用來校驗(yàn)密碼和確認(rèn)密碼字段是否相同
    def clean(self):
        password_value = self.cleaned_data.get('password')
        re_password_value = self.cleaned_data.get('re_password')
        if password_value == re_password_value:
            return self.cleaned_data
        else:
            self.add_error('re_password', '兩次密碼不一致')
            raise ValidationError('兩次密碼不一致')

進(jìn)階

應(yīng)用Bootstrap樣式

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="x-ua-compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
  <title>login</title>
</head>
<body>
<div class="container">
  <div class="row">
    <form action="/login2/" method="post" novalidate class="form-horizontal">
      {% csrf_token %}
      <div class="form-group">
        <label for="{{ form_obj.username.id_for_label }}"
               class="col-md-2 control-label">{{ form_obj.username.label }}</label>
        <div class="col-md-10">
          {{ form_obj.username }}
          <span class="help-block">{{ form_obj.username.errors.0 }}</span>
        </div>
      </div>
      <div class="form-group">
        <label for="{{ form_obj.pwd.id_for_label }}" class="col-md-2 control-label">{{ form_obj.pwd.label }}</label>
        <div class="col-md-10">
          {{ form_obj.pwd }}
          <span class="help-block">{{ form_obj.pwd.errors.0 }}</span>
        </div>
      </div>
      <div class="form-group">
      <label class="col-md-2 control-label">{{ form_obj.gender.label }}</label>
        <div class="col-md-10">
          <div class="radio">
            {% for radio in form_obj.gender %}
              <label for="{{ radio.id_for_label }}">
                {{ radio.tag }}{{ radio.choice_label }}
              </label>
            {% endfor %}
          </div>
        </div>
      </div>
      <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
          <button type="submit" class="btn btn-default">注冊</button>
        </div>
      </div>
    </form>
  </div>
</div>

<script src="/static/jquery-3.2.1.min.js"></script>
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>

批量添加樣式

可以通過重寫form類的init方法來實(shí)現(xiàn)

class LoginForm(forms.Form):
    username = forms.CharField(
        min_length=8,
        label="用戶名",
        initial="張三",
        error_messages={
            "required": "不能為空",
            "invalid": "格式錯(cuò)誤",
            "min_length": "用戶名最短8位"
        }
    ...

    def __init__(self, *args, **kwargs):
        super(LoginForm, self).__init__(*args, **kwargs)
        for field in iter(self.fields):
            self.fields[field].widget.attrs.update({
                'class': 'form-control'
            })

ModelForm

通常在Django項(xiàng)目中锥腻,我們編寫的大部分都是與Django 的模型緊密映射的表單嗦董。 舉個(gè)例子,你也許會(huì)有個(gè)Book 模型瘦黑,并且你還想創(chuàng)建一個(gè)form表單用來添加和編輯書籍信息到這個(gè)模型中京革。 在這種情況下奇唤,在form表單中定義字段將是冗余的,因?yàn)槲覀円呀?jīng)在模型中定義了那些字段匹摇。

基于這個(gè)原因咬扇,Django 提供一個(gè)輔助類來讓我們可以從Django 的模型創(chuàng)建Form,這就是ModelForm来惧。

ModelForm定義

form與model的結(jié)合

class BookForm(forms.ModelForm):

    class Meta:
        model = models.Book
        fields = "__all__"
        labels = {
            "title": "書名",
            "price": "價(jià)格"
        }
        widgets = {
            "password": forms.widgets.PasswordInput(attrs={"class": "c1"}),
        }

class Meta下常用參數(shù)

model = models.Book # 對應(yīng)的Model中的類
fields = "all" # 字段冗栗,如果是all,就是表示列出所有的字段
exclude = None # 排除的字段
labels = None # 提示信息
help_texts = None # 幫助提示信息
widgets = None # 自定義插件
error_messages = None # 自定義錯(cuò)誤信息

ModelForm的驗(yàn)證

與普通的Form表單驗(yàn)證類型類似,ModelForm表單的驗(yàn)證在調(diào)用is_valid() 或訪問errors 屬性時(shí)隱式調(diào)用供搀。

我們可以像使用Form類一樣自定義局部鉤子方法和全局鉤子方法來實(shí)現(xiàn)自定義的校驗(yàn)規(guī)則隅居。

如果我們不重寫具體字段并設(shè)置validators屬性的化,ModelForm是按照模型中字段的validators來校驗(yàn)的葛虐。

save()方法

每個(gè)ModelForm還具有一個(gè)save()方法胎源。這個(gè)方法根據(jù)表單綁定的數(shù)據(jù)創(chuàng)建并保存數(shù)據(jù)庫對象。ModelForm的子類可以接受現(xiàn)有的模型實(shí)例作為關(guān)鍵字參數(shù)instance屿脐;如果提供此功能涕蚤,則save()將跟新該實(shí)例。如果沒有提供的诵,save()將創(chuàng)建模型的一個(gè)新實(shí)例:

>>> from myapp.models import Book
>>> from myapp.forms import BookForm

# 根據(jù)POST數(shù)據(jù)創(chuàng)建一個(gè)新的form對象
>>> form_obj = BookForm(request.POST)

# 創(chuàng)建書籍對象
>>> new_ book = form_obj.save()

# 基于一個(gè)書籍對象創(chuàng)建form對象
>>> edit_obj = Book.objects.get(id=1)
# 使用POST提交的數(shù)據(jù)更新書籍對象
>>> form_obj = BookForm(request.POST, instance=edit_obj)
>>> form_obj.save()
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末万栅,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子西疤,更是在濱河造成了極大的恐慌烦粒,老刑警劉巖,帶你破解...
    沈念sama閱讀 219,188評論 6 508
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件代赁,死亡現(xiàn)場離奇詭異扰她,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)芭碍,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,464評論 3 395
  • 文/潘曉璐 我一進(jìn)店門徒役,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人窖壕,你說我怎么就攤上這事忧勿。” “怎么了瞻讽?”我有些...
    開封第一講書人閱讀 165,562評論 0 356
  • 文/不壞的土叔 我叫張陵狐蜕,是天一觀的道長。 經(jīng)常有香客問我卸夕,道長,這世上最難降的妖魔是什么婆瓜? 我笑而不...
    開封第一講書人閱讀 58,893評論 1 295
  • 正文 為了忘掉前任快集,我火速辦了婚禮贡羔,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘个初。我一直安慰自己乖寒,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,917評論 6 392
  • 文/花漫 我一把揭開白布院溺。 她就那樣靜靜地躺著楣嘁,像睡著了一般。 火紅的嫁衣襯著肌膚如雪珍逸。 梳的紋絲不亂的頭發(fā)上逐虚,一...
    開封第一講書人閱讀 51,708評論 1 305
  • 那天,我揣著相機(jī)與錄音谆膳,去河邊找鬼叭爱。 笑死,一個(gè)胖子當(dāng)著我的面吹牛漱病,可吹牛的內(nèi)容都是我干的买雾。 我是一名探鬼主播,決...
    沈念sama閱讀 40,430評論 3 420
  • 文/蒼蘭香墨 我猛地睜開眼杨帽,長吁一口氣:“原來是場噩夢啊……” “哼漓穿!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起注盈,我...
    開封第一講書人閱讀 39,342評論 0 276
  • 序言:老撾萬榮一對情侶失蹤晃危,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后当凡,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體山害,經(jīng)...
    沈念sama閱讀 45,801評論 1 317
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,976評論 3 337
  • 正文 我和宋清朗相戀三年沿量,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了浪慌。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 40,115評論 1 351
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡朴则,死狀恐怖权纤,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情乌妒,我是刑警寧澤汹想,帶...
    沈念sama閱讀 35,804評論 5 346
  • 正文 年R本政府宣布,位于F島的核電站撤蚊,受9級特大地震影響古掏,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜侦啸,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,458評論 3 331
  • 文/蒙蒙 一槽唾、第九天 我趴在偏房一處隱蔽的房頂上張望丧枪。 院中可真熱鬧,春花似錦庞萍、人聲如沸拧烦。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,008評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽恋博。三九已至,卻和暖如春私恬,著一層夾襖步出監(jiān)牢的瞬間债沮,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,135評論 1 272
  • 我被黑心中介騙來泰國打工践付, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留秦士,地道東北人。 一個(gè)月前我還...
    沈念sama閱讀 48,365評論 3 373
  • 正文 我出身青樓永高,卻偏偏與公主長得像隧土,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個(gè)殘疾皇子命爬,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,055評論 2 355

推薦閱讀更多精彩內(nèi)容