Re: Activate Admin Tutorial 2

2009-06-25 Thread Divesh Gidwani


On Jun 25, 4:49 pm, Karen Tracey  wrote:
> On Thu, Jun 25, 2009 at 4:29 PM, Divesh Gidwani  wrote:
>
> > Hey Guys,
>
> > I'm new to Django and computer programming and am currently following
> > a tutorial from this website:
>
> >http://www.zabada.com/tutorials/django-quick-start.php
>
> I wouldn't recommend that.  From a brief look that tutorial is based on
> Django 0.96, and unless you are supporting old code written for that level
> you do not want to be starting out with such an old base.  There are many
> things that changed between 0.96 and 1.0 in a backwards-incompatible way
> (one of which has led to your problem), you are much better off starting
> with 1.0.  Why not use the official Django tutorial, which is updated to
> match the current code (or you can use the version for the latest official
> release, depending on what level of Django you decide to go with):
>
> http://docs.djangoproject.com/en/dev/intro/tutorial01/#intro-tutorial01
>
> Karen

Hey Karen,

Thanks a ton for that. I used the activate admin way suggested in
tutorial 2 of the djangoproject website and that worked just great!

I'm sure this Django journey is not going to be very smooth, and i'll
keep having questions along the way, especially since this is my first
ever programming experience. Thanks to people like you, it becomes a
lot easier.

Thanks once again.

Divesh
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Activate Admin Tutorial 2

2009-06-25 Thread Karen Tracey
On Thu, Jun 25, 2009 at 4:29 PM, Divesh Gidwani  wrote:

>
> Hey Guys,
>
> I'm new to Django and computer programming and am currently following
> a tutorial from this website:
>
> http://www.zabada.com/tutorials/django-quick-start.php
>

I wouldn't recommend that.  From a brief look that tutorial is based on
Django 0.96, and unless you are supporting old code written for that level
you do not want to be starting out with such an old base.  There are many
things that changed between 0.96 and 1.0 in a backwards-incompatible way
(one of which has led to your problem), you are much better off starting
with 1.0.  Why not use the official Django tutorial, which is updated to
match the current code (or you can use the version for the latest official
release, depending on what level of Django you decide to go with):

http://docs.djangoproject.com/en/dev/intro/tutorial01/#intro-tutorial01

Karen

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Activate Admin Tutorial 2

2009-06-25 Thread Divesh Gidwani

Hey Guys,

I'm new to Django and computer programming and am currently following
a tutorial from this website:

http://www.zabada.com/tutorials/django-quick-start.php

Everything worked until the activate the admin part.

My code to activate the admin in my records/urls.py is as such:

from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
# Example:
# (r'^djangotest/', include('djangotest.foo.urls')),

# Uncomment the admin/doc line below and add
'django.contrib.admindocs'
# to INSTALLED_APPS to enable admin documentation:
(r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
(r'^admin/', include(divesh.records.urls)),
)

I don't exactly know what i'm doing, so please help.

divesh is my username
records is the app

This is the error i get when i try to runserver and display the page.
I am a newbie.

Traceback (most recent call last):

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/servers/basehttp.py", line 278, in
run
self.result = application(self.environ, self.start_response)

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/servers/basehttp.py", line 636, in
__call__
return self.application(environ, start_response)

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/handlers/wsgi.py", line 241, in
__call__
response = self.get_response(request)

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/handlers/base.py", line 73, in
get_response
response = middleware_method(request)

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/middleware/common.py", line 56, in
process_request
if (not _is_valid_path(request.path_info) and

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/middleware/common.py", line 142, in
_is_valid_path
urlresolvers.resolve(path)

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/urlresolvers.py", line 257, in
resolve
return get_resolver(urlconf).resolve(path)

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/urlresolvers.py", line 184, in
resolve
for pattern in self.url_patterns:

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/urlresolvers.py", line 208, in
_get_url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns",
self.urlconf_module)

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/urlresolvers.py", line 203, in
_get_urlconf_module
self._urlconf_module = import_module(self.urlconf_name)

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/utils/importlib.py", line 35, in
import_module
__import__(name)

  File "/Users/Divesh/djangotest/djangotest/../djangotest/urls.py",
line 16, in 
(r'^admin/', include(divesh.records.urls)),

NameError: name 'divesh' is not defined

Please help. thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---