You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
681 B
33 lines
681 B
# -*- coding: utf-8 -*-
|
|
from django import forms
|
|
|
|
from .models import Review, SiteReview
|
|
|
|
|
|
class ReviewCreateForm(forms.ModelForm):
|
|
"""
|
|
Create Review form for creating review
|
|
|
|
"""
|
|
class Meta:
|
|
model = Review
|
|
fields = ('comment', 'rating')
|
|
|
|
|
|
class ReviewChangeForm(forms.ModelForm):
|
|
"""
|
|
Create Review form for changing review
|
|
|
|
"""
|
|
class Meta:
|
|
model = Review
|
|
fields = ('comment', 'rating', 'user')
|
|
|
|
|
|
class SiteReviewForm(forms.ModelForm):
|
|
"""
|
|
Форма для отзывов о сайте и предложений по улучшению
|
|
"""
|
|
class Meta:
|
|
model = SiteReview
|
|
exclude = ()
|
|
|