1. angri
  2. brainstill

Commits

angri  committed 37ead2c

используем фичу SEPARATE_PAGE_FOR_IDEA в bsproj

  • Participants
  • Parent commits cdf3225
  • Branches default

Comments (0)

Files changed (4)

File bsproj/settings.py

View file
  • Ignore whitespace
 
 ROOT_URLCONF = 'bsproj.urls'
 
-LOGIN_URL = '/login/'
 LOGIN_REDIRECT_URL = '/'
 
 TEMPLATE_DIRS = (
 )
 
 COMMENTS_APP = 'bsproj.custom_comments'
+
+BRAINSTILL_SEPARATE_PAGE_FOR_IDEA = True

File bsproj/templates/brainstill/idea_detail.html

View file
  • Ignore whitespace
 {% load i18n brainstill comments %}
 
 {% block content %}
-{% with object as idea %}
   <h1>
     <span class="idea-number">#{{ idea.pk }} </span>
     <span class="idea-title">{{ idea }}</span>
   {% with idea.get_absolute_url as next %}
     {% render_comment_form for idea %}
   {% endwith %}
-{% endwith %}
 {% endblock %}

File bsproj/templates/brainstill/project_detail.html

View file
  • Ignore whitespace
       <a name="{{ idea.pk }}"></a>
       <h2>
         <span class="idea-number">#{{ idea.pk }} </span>
-        <span class="idea-title"><a href="{% url brainstill_idea_detail idea.pk %}">{{ idea }}</a></span>
+        <span class="idea-title"><a href="{{ idea.get_absolute_url }}">{{ idea }}</a></span>
         {% ranks_and_votes idea %}
       </h2>
       <p class="info">

File bsproj/urls.py

View file
  • Ignore whitespace
     url(r'^comments/', include('django.contrib.comments.urls')),
 
     url(r'^projects/', include('brainstill.urls')),
-    url(r'^idea(?P<object_id>\d+)/$', list_detail.object_detail,
-        dict(queryset=Idea.objects.all()),
-        name='brainstill_idea_detail'),
 
     url(r'^%s(?P<path>.*)$' % media_url, 'django.views.static.serve',
         {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),