File tree Expand file tree Collapse file tree 4 files changed +6
-7
lines changed Expand file tree Collapse file tree 4 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 11from django import forms
2- from django .conf import settings
32from django .forms import ModelForm
43
54from pyconbalkan .cfp .models import CFPRating
@@ -51,4 +50,5 @@ class Meta:
5150 fields = (
5251 'mark' ,
5352 'comment' ,
53+ 'tags' ,
5454 )
Original file line number Diff line number Diff line change 66
77 < div class ="cfp ">
88 < div class ="cfp__content ">
9+ < a class ="button button--yellow " href ="{% url 'cfp_list' %} " role ="button "> Back to CFP List</ a >
910 < h1 > {{ cfp.get_type_display }}: {{ cfp.title }} ({% if cfp.duration %}{{ cfp.duration }}{% endif %})</ h1 >
1011 < h2 > by {{ cfp.name }} {% if cfp.company %}({{ cfp.company }}){% endif %}</ h2 >
1112 < p > Email: {{ cfp.email }}</ p >
@@ -28,7 +29,9 @@ <h2 class="success-message">
2829 < input class ="button button--blue button--fullwidth mb-xs-40 " type ="submit " value ="Submit " />
2930 </ div >
3031 </ form >
32+ < a class ="button button--yellow " href ="{% url 'cfp_list' %} " role ="button "> Back to CFP List</ a >
3133 </ div >
3234 </ div >
3335
36+
3437{% endblock %}
Original file line number Diff line number Diff line change @@ -57,24 +57,20 @@ def cfp_detail(request, slug):
5757 context = {
5858 'cfp' : cfp ,
5959 }
60-
6160 initial = {
6261 'user' : request .user ,
6362 'cfp' : cfp
6463 }
65-
6664 try :
6765 rating_instance = CFPRating .objects .get (** initial )
6866 except CFPRating .DoesNotExist :
6967 rating_instance = CFPRating (** initial )
70-
7168 if request .method == 'POST' :
7269 form = RateForm (request .POST , instance = rating_instance )
7370 if form .is_valid ():
7471 form .save ()
72+ context ['success' ] = 'Your review has been successfully saved.'
7573 else :
7674 form = RateForm (instance = rating_instance )
77-
7875 context ['form' ] = form
79-
8076 return render (request , 'cfp_detail.html' , context )
Original file line number Diff line number Diff line change 11dj-database-url == 0.5.0
22dj-static == 0.0.6
3- Django == 2.1
3+ Django == 2.0.5
44django-choices == 1.6.1
55django-countries == 5.3.1
66django-filter == 2.0.0
You can’t perform that action at this time.
0 commit comments