Dear Luis, FYI:
post_detail.html ----------------------- {% extends "blog/base.html" %} {% block content %} <div class="post"> {% if post.published_date %} <div class="date"> {{ post.published_date }} </div> {% endif %} <h1>{{ post.title }}</h1> <p>{{ post.text|linebreaks }}</p> </div> {% endblock %} post_list.html -------------------- {% extends "blog/base.html" %} {% block content %} {% for post in posts %} <div class="post"> <h1><a href="{% url "post_detail" pk=post.pk %}">{{ post.title }}</a></h1> <p align="justify">{{ post.text|linebreaks }}</p> <p align="right" class="date">Web published: {{ post.published_date }}</p> </div> {% endfor %} {% endblock content %} Thanks in Advance, Sankar B On Tue, Sep 22, 2015 at 8:32 AM, Luis Zárate <luisz...@gmail.com> wrote: > The error is in the template, please check the url statement inside the > template. > > Or share with ours the template file. > > El sábado, 19 de septiembre de 2015, sankar vasu <sankarmc...@gmail.com> > escribió: > > Hi All, > > > > I got below error, please advise. please look at the following link: > http://pysan.pythonanywhere.com/ > > > > > </mail/u/0/s/?view=att&th=14fe57938a35ee8f&attid=0.1&disp=emb&realattid=ii_14fe489d7752bc59&zw&atsh=1> > > > > > > url.py > > > > from django.conf.urls import url > > from . import views > > > > urlpatterns = [ > > url(r'^$', views.post_list, name='post_list'), > > url(r'^post/(?P<pk>[0-9]+)/$', views.post_detail, > name='post_detail'), > > ] > > > > > > view.py > > > > from django.shortcuts import render, get_object_or_404 > > from django.utils import timezone > > from .models import Post > > > > def post_list(request): > > posts = > Post.objects.filter(published_date__lte=timezone.now()).order_by('published_date') > > return render(request, 'blog/post_list.html', {'posts': posts}) > > > > def post_detail(request, pk): > > post = get_object_or_404(Post, pk=pk) > > return render(request, 'blog/post_detail.html', {'post': post}) > > > > > > Thanks in advance, > > Sankar B > > > > -- > > You received this message because you are subscribed to the Google > Groups "Django users" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to django-users+unsubscr...@googlegroups.com. > > To post to this group, send email to django-users@googlegroups.com. > > Visit this group at http://groups.google.com/group/django-users. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAPzi0vCzoaSN%2B6xEL%3D%2BPSu_vQMpqG6i8oFw9y4_mtPvO8xtoeg%40mail.gmail.com > . > > For more options, visit https://groups.google.com/d/optout. > > > > -- > "La utopía sirve para caminar" Fernando Birri > > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAG%2B5VyOjk899wEAdjmMaZSGKc9tYQHDmUL%2Bc-3NTtDEF6kNEKw%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAG%2B5VyOjk899wEAdjmMaZSGKc9tYQHDmUL%2Bc-3NTtDEF6kNEKw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- By, Sankar -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPzi0vB8Mjr%2BeEsCb6qTuCNKm%2Bzn9MFnSr8_8%2BK%3D0f0Km490Xw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.