From e054772fbd28452597dfa48f057c56701cb432b8 Mon Sep 17 00:00:00 2001 From: Sashi20 Date: Fri, 6 Mar 2020 16:26:45 +0530 Subject: Modify the reference field in proposal form --- arduino_blog/forms.py | 3 ++- arduino_blog/urls.py | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/arduino_blog/forms.py b/arduino_blog/forms.py index b4e23ae..e12f36e 100644 --- a/arduino_blog/forms.py +++ b/arduino_blog/forms.py @@ -247,7 +247,8 @@ class AbstractProposalForm(forms.ModelForm): error_messages={ 'required': 'Abstract field required.'}, ) - references = forms.CharField(widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'References(if any)'}) + references = forms.CharField(widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'References(if any)'}), + required = False ) completion_date = forms.DateTimeField( input_formats=['%YY-%mm-%dd'], diff --git a/arduino_blog/urls.py b/arduino_blog/urls.py index 0b06838..9a4a81f 100644 --- a/arduino_blog/urls.py +++ b/arduino_blog/urls.py @@ -8,15 +8,15 @@ from . import views app_name = 'arduino_blog' urlpatterns = [ re_path(r'^comment-abstract/(?P\d+)$', - views.comment_abstract, name='comment_abstract'), - re_path(r'^abstract-details/(?P\d+)$', - views.abstract_details, name='abstract_details'), - url(r'^view-abstracts/$', views.view_abstracts, name="view_abstracts"), - url(r'^accounts/logout/$', views.user_logout, name="user_logout"), - url(r'^activate/(?P.+)$', views.activate_user, name="activate"), + views.comment_abstract, name='comment_abstract'), + re_path(r'^abstract-details/(?P\d+)$', + views.abstract_details, name='abstract_details'), + url(r'^view-abstracts/$', views.view_abstracts, name="view_abstracts"), + url(r'^accounts/logout/$', views.user_logout, name="user_logout"), + url(r'^activate/(?P.+)$', views.activate_user, name="activate"), url(r'^new_activation/$', views.new_activation, name='new_activation'), - url(r'^submit-abstract/$', views.submitabstract, name='submitabstract'), + url(r'^submit-abstract/$', views.submitabstract, name='submitabstract'), url(r'^accounts/register/$', views.user_register, name='user_register'), url(r'^accounts/login/$', views.user_login, name='user_login'), - url(r'^$', views.index, name='index'), + url(r'^$', views.index, name='index'), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) -- cgit