Tutorial 8: ToDo List App (stuck at point 11)

Tutorial used: http://www.lightbird.net/dbe/todo_list.html

Steps taken (without screenshots):

1. load virtualenv ‘pinax-env’ <tutorial 7>:
- (pinax-env) ( source bin/activate )
- Python 2.7.3 ( GCC 4.2.1 ) <to check: ‘import sys‘ –> ‘sys.version‘ >
- iPython 0.13.1 < to check: ‘ipython‘ >
- django 1.4.3 < to check: ‘import django‘ –> ‘django.VERSION‘ >
- pinax 0.9a2 < to check: ‘import pinax‘ –> ‘pinax.VERSION‘ >

2. create a new project <tutorial 4 part 1>:
- ( django-admin.py startproject dbetutorial )

3. load project in eclipse to use as editor (with powerful code completion) <tutorial 5>:
- (Eclipse) File > Import > Existing Folder as Project (Web Project) > Browse > (~/dbetutorial)
- (dbetutorial) > right-click > PyDev > set as Django Project

4. setup database <back to tutorial 4>:
- edit settings.py
- set DATABASES *care has to be taken to include the complete path
Screen Shot 2013-01-08 at 12.41.44 AM
- set TIME_ZONE
Screen Shot 2013-01-08 at 12.30.57 AM
-  ( python manage.py syncdb )

5. activate admin <part of tutorial 4 part 2> (optional usually but required here)
- uncomment ‘django.contrib.admin‘ in settings.py > INSTALLED_APPS
- uncomment the 3 lines (not admin/doc line) in dbetutorial/urls.py

6. start the todo app <part of tutorial 4 part 1>
- ( python manage.py startapp todo )

7. create the models for ‘todo items’ <back to this tutorial 4 part 1>
- edit todo/models.py
- include appname ‘todo’ in settings.py > INSTALLED_APPS
- remember to import ‘models’ and ‘admin’
Screen Shot 2013-01-08 at 11.26.34 PM

Screen Shot 2013-01-08 at 5.15.31 PM

8. activate the models for ‘todo items’ <part of tutorial 4 part 1>
- sneakpeak with ( python manage.py sql todo )
- ( python manage.py syncdb )

9. customize admin: allow admin to add multiple items using ‘admin.TabularInline’
- edit todo/models.py
Screen Shot 2013-01-08 at 11.50.02 PM

- ( python manage.py reset todo )
- ( python manage.py syncdb )

10. customize admin: change the way admin (template) view looks
- copy (and edit to your liking) admin templates from the root django template directory,
/Library/Python/2.7/site-packages/django/contrib/admin/templates/admin‘:
>  ‘base_site.html‘ to ‘/Users/kyletan/Documents/eclipsejunoworkspace/dbetutorial/templates/admin/base_site.html‘  (edit this to your liking)
>  ‘change_list.html‘ to ‘/Users/kyletan/Documents/eclipsejunoworkspace/dbetutorial/templates/admin/todo/item/change_list.html

- add the template path to ‘settings.py‘ > TEMPLATE_DIRS:
Screen Shot 2013-01-09 at 12.24.28 AM

- for ‘base_site.html‘, I changed the name of the admin:
Screen Shot 2013-01-09 at 12.21.02 AM
- for ‘change_list.html‘, I followed the tutorial and added a url link to admin/todo/datetime/add/:
Screen Shot 2013-01-09 at 12.52.33 AM
- note that for django 1.4.3 quotation is required for: ‘admin:todo_datetime_add’
- read more about using url tag in django templating language here

11. changing save redirect
no idea what the code is trying to do but i just followed the tutorial and made the edits to todo/models.py

12. marking task as done
 < got stuck at this part for a couple of hours without getting any progress ?:
with the limited information from the tutorial, i changed:
1. dbetutorial/dbetutorial/urls.py:
Screen Shot 2013-01-10 at 12.03.35 AM

2. dbetutorial/todo/models.py:
Screen Shot 2013-01-10 at 12.04.29 AM

3. dbetutorial/todo/views.py
Screen Shot 2013-01-10 at 12.05.13 AM

and the error was:
Screen Shot 2013-01-10 at 12.06.22 AM

( gonna skip this tutorial for the time being… i believe this is a url issue but i am unable to pinpoint how to solve it yet… i will proceed to other tutorials and come back again.. )

anyone who can help please feel free to contact me

About these ads
This entry was posted in Help I am stuck!, Tutorials. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s