hi, i m adding my views.py file

On Tue, Feb 19, 2013 at 5:44 PM, Pankaj Singh <ps.j...@gmail.com> wrote:

> Hey,
>
> Every things worked for me when I used your original templates and
> following urls.py.
>
> As you can notice, I have used generic view as I did not have original
> view function.
>
> Please share views.py because it's hard to help help without that.
>
> FYI, you can test reverse match by using django.core.urlresolvers.reverse
> in shell.
>
>  ### urls.py
> from django.conf.urls import patterns, include, url
> from django.views.generic.simple import direct_to_template
>
> urlpatterns = patterns('',
>         url(r'^$', direct_to_template, {"template": "home.html"},
>             name="home"),
>         url(r'^about/$', direct_to_template, {"template": "about.html"},
>             name="about"),
>         url(r'^contact/$', direct_to_template, {"template":
> "contact.html"},
>             name="contact"),
>         url(r'^archive/$', direct_to_template, {"template":
> "archive.html"},
>             name="archive"),
> )
>
> Sincerely,
> Pankaj Singh
> http://about.me/psjinx
>
>
> On Tue, Feb 19, 2013 at 5:06 PM, Avnesh Shakya <avnesh.n...@gmail.com>wrote:
>
>> ya i have done it but error has occured again..
>>
>>
>> On Tue, Feb 19, 2013 at 5:04 PM, Pankaj Singh <ps.j...@gmail.com> wrote:
>>
>>> Hey,
>>>
>>> I asked you to make changes in templates (i.e. home.html, about.html
>>> etc.) and not urls.py.
>>>
>>>
>>> Sincerely,
>>> Pankaj Singh
>>> http://about.me/psjinx
>>>
>>>
>>> On Tue, Feb 19, 2013 at 4:56 PM, Avnesh Shakya <avnesh.n...@gmail.com>wrote:
>>>
>>>> hi pankaj, i have got again error same......
>>>> if i change....
>>>>
>>>> from django.conf.urls.defaults import *
>>>> urlpatterns= patterns('myapp.views',
>>>>     url(r'^$','home',name="home"),
>>>>     url(r'^about/$','about',name="about"),
>>>>     url(r'^contact/$','contact',name="contact"),
>>>>     url(r'^contact/$','archive',name="archive"),
>>>> )
>>>> its to
>>>>
>>>> from django.conf.urls.defaults import *
>>>> urlpatterns= patterns('myapp.views',
>>>>     url(r'^$','home',name="home"),
>>>>     url(r'^$','about',name="about"),
>>>>     url(r'^$','contact',name="contact"),
>>>>     url(r'^$','archive',name="archive"),
>>>> )
>>>> then it's not generating error but that links are not opening.....
>>>> thanks
>>>>
>>>> On Tue, Feb 19, 2013 at 4:28 PM, Pankaj Singh <ps.j...@gmail.com>wrote:
>>>>
>>>>> Hey Avnesh,
>>>>>
>>>>> In your templates you have written following lines
>>>>>
>>>>> <a href="{% url home %}">home</a><a href="{% url about %}">about</a><a 
>>>>> href="{% url archive %}">archive</a><a href="{% url contact 
>>>>> %}">contact</a>
>>>>>
>>>>> Change them to following, notice single quotes surrounding url pattern
>>>>> name
>>>>>
>>>>> <a href="{% url 'home' %}">home</a><a href="{% url 'about' 
>>>>> %}">about</a><a href="{% url 'archive' %}">archive</a><a href="{% url 
>>>>> 'contact' %}">contact</a>
>>>>>
>>>>>
>>>>>
>>>>> Sincerely,
>>>>> Pankaj Singh
>>>>> http://about.me/psjinx
>>>>>
>>>>>
>>>>> On Tue, Feb 19, 2013 at 4:06 PM, Avnesh Shakya 
>>>>> <avnesh.n...@gmail.com>wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Feb 19, 2013 at 3:47 PM, Avnesh Shakya <avnesh.n...@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> ya i have completed and i m just doing copy n paste from from
>>>>>>> tutorial but there is no error but i m facing this error again n 
>>>>>>> again...
>>>>>>>
>>>>>>> https://www.udemy.com/full-django-tutorial/#lecture/63701/question/9902
>>>>>>> can i add my page for help. i need your help plz..
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Feb 19, 2013 at 3:39 PM, Thomas Weholt <
>>>>>>> thomas.weh...@gmail.com> wrote:
>>>>>>>
>>>>>>>> It means you haven't added any url matching / in your urlconfig, but
>>>>>>>> it's hard to give a good answer without a bit more information. Have
>>>>>>>> you completed the django tutorial which explains how these things
>>>>>>>> work?
>>>>>>>>
>>>>>>>> Thomas
>>>>>>>>
>>>>>>>> On Tue, Feb 19, 2013 at 11:04 AM, Avnesh Shakya <
>>>>>>>> avnesh.n...@gmail.com> wrote:
>>>>>>>> > Hello, I'm stuck in teplagte page......... error is occuring here
>>>>>>>> after
>>>>>>>> > runserver..
>>>>>>>> >
>>>>>>>> > error..
>>>>>>>> >
>>>>>>>> >  NoReverseMatch at / Reverse for '' with arguments '()' and
>>>>>>>> keyword
>>>>>>>> > arguments '{}' not found.
>>>>>>>> >
>>>>>>>> > I can't figure out why I'm getting the error, plz tell me, i have
>>>>>>>> totally
>>>>>>>> > confused here.
>>>>>>>> >
>>>>>>>> >
>>>>>>>> > thanks
>>>>>>>> >
>>>>>>>> > avnesh shakya
>>>>>>>> >
>>>>>>>> > --
>>>>>>>> > 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?hl=en.
>>>>>>>> > For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>>> >
>>>>>>>> >
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Mvh/Best regards,
>>>>>>>> Thomas Weholt
>>>>>>>> http://www.weholt.org
>>>>>>>>
>>>>>>>> --
>>>>>>>> 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?hl=en.
>>>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>  --
>>>>>> 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?hl=en
>>>>>> .
>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>  --
>>>>> 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?hl=en.
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>
>>>>>
>>>>>
>>>>
>>>>  --
>>>> 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?hl=en.
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>>
>>>>
>>>
>>>  --
>>> 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?hl=en.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>  --
>> 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?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Attachment: views.py
Description: Binary data

Reply via email to