In order to create a reusable app, you have to create a new 'templates'
folder in your app and place the the absolute path in the templates
directory in your settings.py. And then create the html files as concerned
with your app in the templates directory you created within the app.

Robin


On Tue, Sep 10, 2013 at 1:40 AM, asherakhet06 <francisco.demira...@gmail.com
> wrote:

> Hello.  I'm a rookie as well and I'm having exactly this same issue.
>  Trying to figure out what to do, but haven't been successful
> unfortunately.  Based on what I read (convention over configuration),  I
> understand that I should to make a poll_list.html file and store this in
> templates, to get my site to work.  Or should I just change the name of my
> index.html file in templates?  Am I missing something here? Thanks a lot
> guys.
>
> On Friday, July 26, 2013 8:20:26 PM UTC-4, Cate Liu wrote:
>>
>>
>> I am a new newbie to Django.  Great tutorial BTW.  I followed it to the T
>> and 99.9% worked.
>> Except the last step in the Advanced tutorial, the step 3 in 'Using your
>> own package'.
>> I could see http://127.0.0.1:8000/admin/ and create polls without any
>> problem.
>> But http://127.0.0.1:8000/polls/ would give me the following error.
>>
>> I see there are two problems.
>> 1. /Users/nnn/django_exercises/**mysite/templates/polls/index.**html is
>> the wrong location, it should be $$/django_polls/polls/**
>> templates/polls/index.html.
>> 2. What is polls/poll_list.html?  Nowhere in the tutorial ever created
>> this file, no?
>>
>> Thanks for any advice.
>>
>>
>> ------------------------------**------------------------------**
>> ------------------------------**----------------
>> TemplateDoesNotExist at /polls/
>>
>> polls/index.html, polls/poll_list.html
>>
>>  Request Method: GET  Request URL: http://127.0.0.1:8000/polls/  Django
>> Version: 1.5.1  Exception Type: TemplateDoesNotExist  Exception Value:
>>
>> polls/index.html, polls/poll_list.html
>>
>>  Exception Location: /Library/Python/2.7/site-**packages/django/template/
>> **loader.py in select_template, line 194  Python Executable:
>> /usr/bin/python  Python Version: 2.7.2  Python Path:
>>
>> ['/Users/nnn/django_exercises/**mysite',
>>  '/Users/nnn/py_pkg/lib/python/**django_polls-0.1-py2.7.egg',
>>  '/Users/nnn/py_pkg/lib/python'**,
>>  
>> '/System/Library/Frameworks/**Python.framework/Versions/2.7/**lib/python27.zip',
>>  
>> '/System/Library/Frameworks/**Python.framework/Versions/2.7/**lib/python2.7',
>>  
>> '/System/Library/Frameworks/**Python.framework/Versions/2.7/**lib/python2.7/plat-darwin',
>>  
>> '/System/Library/Frameworks/**Python.framework/Versions/2.7/**lib/python2.7/plat-mac',
>>  
>> '/System/Library/Frameworks/**Python.framework/Versions/2.7/**lib/python2.7/plat-mac/lib-**scriptpackages',
>>  
>> '/System/Library/Frameworks/**Python.framework/Versions/2.7/**Extras/lib/python',
>>  
>> '/System/Library/Frameworks/**Python.framework/Versions/2.7/**lib/python2.7/lib-tk',
>>  
>> '/System/Library/Frameworks/**Python.framework/Versions/2.7/**lib/python2.7/lib-old',
>>  
>> '/System/Library/Frameworks/**Python.framework/Versions/2.7/**lib/python2.7/lib-dynload',
>>  
>> '/System/Library/Frameworks/**Python.framework/Versions/2.7/**Extras/lib/python/PyObjC',
>>  '/Library/Python/2.7/site-**packages']
>>
>>  Server time: Fri, 26 Jul 2013 16:59:14 -0700
>>
>> Template-loader postmortem
>>
>> Django tried loading these templates, in this order:
>>
>>    - Using loader django.template.loaders.**filesystem.Loader:
>>       - /Users/nnn/django_exercises/**mysite/templates/polls/index.**html,
>>       polls/poll_list.html (File does not exist)
>>    - Using loader django.template.loaders.app_**directories.Loader:
>>       - 
>> /Library/Python/2.7/site-**packages/django/contrib/auth/**templates/polls/index.html,
>>       polls/poll_list.html (File does not exist)
>>       - 
>> /Library/Python/2.7/site-**packages/django/contrib/admin/**templates/polls/index.html,
>>       polls/poll_list.html (File does not exist)
>>
>>
>>  --
> 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.
> 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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to