mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-21 21:53:30 +00:00
Fix weekmail new article link
This commit is contained in:
parent
39b32d456c
commit
3cf1628435
@ -6,7 +6,7 @@
|
|||||||
<h4>{% trans %}Communication:{% endtrans %}</h4>
|
<h4>{% trans %}Communication:{% endtrans %}</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li> <a href="{{ url('com:news_new') }}?club={{ object.id }}">{% trans %}Create a news{% endtrans %}</a></li>
|
<li> <a href="{{ url('com:news_new') }}?club={{ object.id }}">{% trans %}Create a news{% endtrans %}</a></li>
|
||||||
<li> <a href="{{ url('com:weekmail_article', club_id=object.id) }}">{% trans %}Post in the Weekmail{% endtrans %}</a></li>
|
<li> <a href="{{ url('com:weekmail_article') }}?club={{ object.id }}">{% trans %}Post in the Weekmail{% endtrans %}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h4>{% trans %}Counters:{% endtrans %}</h4>
|
<h4>{% trans %}Counters:{% endtrans %}</h4>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -9,7 +9,7 @@ urlpatterns = [
|
|||||||
url(r'^sith/edit/weekmail_destinations$', WeekmailDestinationEditView.as_view(), name='weekmail_destinations'),
|
url(r'^sith/edit/weekmail_destinations$', WeekmailDestinationEditView.as_view(), name='weekmail_destinations'),
|
||||||
url(r'^weekmail$', WeekmailEditView.as_view(), name='weekmail'),
|
url(r'^weekmail$', WeekmailEditView.as_view(), name='weekmail'),
|
||||||
url(r'^weekmail/preview$', WeekmailPreviewView.as_view(), name='weekmail_preview'),
|
url(r'^weekmail/preview$', WeekmailPreviewView.as_view(), name='weekmail_preview'),
|
||||||
url(r'^weekmail/club/((?P<club_id>[0-9]+)/)?new_article$', WeekmailArticleCreateView.as_view(), name='weekmail_article'),
|
url(r'^weekmail/new_article$', WeekmailArticleCreateView.as_view(), name='weekmail_article'),
|
||||||
url(r'^weekmail/article/(?P<article_id>[0-9]+)/delete$', WeekmailArticleDeleteView.as_view(), name='weekmail_article_delete'),
|
url(r'^weekmail/article/(?P<article_id>[0-9]+)/delete$', WeekmailArticleDeleteView.as_view(), name='weekmail_article_delete'),
|
||||||
url(r'^weekmail/article/(?P<article_id>[0-9]+)/edit$', WeekmailArticleEditView.as_view(), name='weekmail_article_edit'),
|
url(r'^weekmail/article/(?P<article_id>[0-9]+)/edit$', WeekmailArticleEditView.as_view(), name='weekmail_article_edit'),
|
||||||
url(r'^news$', NewsListView.as_view(), name='news_list'),
|
url(r'^news$', NewsListView.as_view(), name='news_list'),
|
||||||
|
@ -333,7 +333,7 @@ class WeekmailArticleCreateView(QuickNotifMixin, CreateView): #XXX need to prote
|
|||||||
def get_initial(self):
|
def get_initial(self):
|
||||||
init = {}
|
init = {}
|
||||||
try:
|
try:
|
||||||
init['club'] = Club.objects.filter(id=self.kwargs['club_id']).first()
|
init['club'] = Club.objects.filter(id=self.request.GET['club']).first()
|
||||||
except: pass
|
except: pass
|
||||||
return init
|
return init
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user