Re: admin site not working, problem with urls.py?

2010-10-09 Thread binaryjohn
Hi Lisa,

The easiest way (I have found) to get the admin media in to your
project is to create a symbolic link inside your static media folder
to the admin/media subfolders. I believe there are three of them
(css,img, js). I hope this link helps
http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/#serving-media-files

-BJohn

On Oct 6, 9:51 am, Lisa  wrote:
> Hi,
> It seems you're right CSS isn't being served correctly, so what is the
> easiest way to
> include the css files, I'm using apache2 w/ a conf file and
> modpython...
>
> Thanks,
> Lisa
>
> On Oct 6, 11:36 am, Sandro Dutra  wrote:
>
> > Ah yeah, forget to comment this...
>
> > If you're using the django dev server to test your application, you'll have
> > to set where the static files are, you can do this with a builtin view:
> > django.views.static.serve.
>
> > 2010/10/6 Steve Holden 
>
> > > It's much more likely that your CSS style sheets are not being served
> > > correctly - you can check this by looking at the page's HTML source and
> > > then pasting the style sheet's URL into your browser's location bar.
>
> > > The Django 1.0 admin is a reasonably well-styled layout, so you
> > > certainly shouldn't be seeing anything "funky".
>
> > > regards
> > >  Steve
>
> > > On 10/6/2010 11:59 AM, Lisa Gandy wrote:
> > > > Thanks for the help,
> > > > This ended up working
> > > > (r'^admin/(.*)', admin.site.root)
>
> > > > Now, when I look at the admin panel, its really funky looking, it
> > > > definitely works, but its like its missing a template.
> > > > Do yout hink its b/c the version of django on teh server is old?
> > > > Its 1.0.4
>
> > > > If thats the problem, what is the easiest way to upgrade django on
> > > > Ubuntu 8.10?
>
> > > > Thanks!
> > > > Lisa
>
> > > > On Tue, Oct 5, 2010 at 6:34 PM, Sandro Dutra  > > > > wrote:
>
> > > >     You have to check if you enable the "admin" application on your
> > > >     settings.py.
>
> > > >     2010/10/5 Sithembewena Lloyd Dube  > > >     >
>
> > > >         Hey Lisa,
>
> > > >         Look at this line (supplied by you):
>
> > > >          # (r'^ccu/', include('ccu.foo.urls')),
>
> > > >         ^^ the line above is correct.
>
> > > >         Now, the line that's giving you trouble is:
>
> > > >          (r'^admin/', include(admin.site.urls)),
>
> > > >         ^^ spot the difference?
>
> > > >         I think you should use quotes around your argument to the
> > > >         include function. That function expects a string, I believe :)
>
> > > >         On Wed, Oct 6, 2010 at 12:01 AM, Lisa  > > >         > wrote:
>
> > > >             Hi all,
> > > >             I'm sure I have a pretty simple problem...
> > > >             here's my url.py file
>
> > > >             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'^ccu/', include('ccu.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'^stories/$','ccu_gen.views.all_stories'),
> > > >                (r'^stories/(?P\d+)/$',
> > > 'ccu_gen.views.one_story'),
> > > >                (r'^admin/', include(admin.site.urls)),
>
> > > >             )
>
> > > >             stories works fine, but for the admin url, I'm getting the
> > > error
> > > >             __import__() argument 1 must be string, not instancemethod
>
> > > >             any ideas?
>
> > > >             Thanks!
> > > --
> > > Steve Holden           +1 571 484 6266   +1 800 494 3119
> > > PyCon 2011 Atlanta March 9-17      http://us.pycon.org/
> > > See Python Video!      http://python.mirocommunity.org/
> > > Holden Web LLC                http://www.holdenweb.com/
>
> > > --
> > > DjangoCon US 2010 September 7-9http://djangocon.us/
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Django users" group.
> > > To post to this group, send email to django-us...@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.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.co

Re: admin site not working, problem with urls.py?

2010-10-06 Thread Lisa
Hi,
It seems you're right CSS isn't being served correctly, so what is the
easiest way to
include the css files, I'm using apache2 w/ a conf file and
modpython...

Thanks,
Lisa

On Oct 6, 11:36 am, Sandro Dutra  wrote:
> Ah yeah, forget to comment this...
>
> If you're using the django dev server to test your application, you'll have
> to set where the static files are, you can do this with a builtin view:
> django.views.static.serve.
>
> 2010/10/6 Steve Holden 
>
> > It's much more likely that your CSS style sheets are not being served
> > correctly - you can check this by looking at the page's HTML source and
> > then pasting the style sheet's URL into your browser's location bar.
>
> > The Django 1.0 admin is a reasonably well-styled layout, so you
> > certainly shouldn't be seeing anything "funky".
>
> > regards
> >  Steve
>
> > On 10/6/2010 11:59 AM, Lisa Gandy wrote:
> > > Thanks for the help,
> > > This ended up working
> > > (r'^admin/(.*)', admin.site.root)
>
> > > Now, when I look at the admin panel, its really funky looking, it
> > > definitely works, but its like its missing a template.
> > > Do yout hink its b/c the version of django on teh server is old?
> > > Its 1.0.4
>
> > > If thats the problem, what is the easiest way to upgrade django on
> > > Ubuntu 8.10?
>
> > > Thanks!
> > > Lisa
>
> > > On Tue, Oct 5, 2010 at 6:34 PM, Sandro Dutra  > > > wrote:
>
> > >     You have to check if you enable the "admin" application on your
> > >     settings.py.
>
> > >     2010/10/5 Sithembewena Lloyd Dube  > >     >
>
> > >         Hey Lisa,
>
> > >         Look at this line (supplied by you):
>
> > >          # (r'^ccu/', include('ccu.foo.urls')),
>
> > >         ^^ the line above is correct.
>
> > >         Now, the line that's giving you trouble is:
>
> > >          (r'^admin/', include(admin.site.urls)),
>
> > >         ^^ spot the difference?
>
> > >         I think you should use quotes around your argument to the
> > >         include function. That function expects a string, I believe :)
>
> > >         On Wed, Oct 6, 2010 at 12:01 AM, Lisa  > >         > wrote:
>
> > >             Hi all,
> > >             I'm sure I have a pretty simple problem...
> > >             here's my url.py file
>
> > >             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'^ccu/', include('ccu.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'^stories/$','ccu_gen.views.all_stories'),
> > >                (r'^stories/(?P\d+)/$',
> > 'ccu_gen.views.one_story'),
> > >                (r'^admin/', include(admin.site.urls)),
>
> > >             )
>
> > >             stories works fine, but for the admin url, I'm getting the
> > error
> > >             __import__() argument 1 must be string, not instancemethod
>
> > >             any ideas?
>
> > >             Thanks!
> > --
> > Steve Holden           +1 571 484 6266   +1 800 494 3119
> > PyCon 2011 Atlanta March 9-17      http://us.pycon.org/
> > See Python Video!      http://python.mirocommunity.org/
> > Holden Web LLC                http://www.holdenweb.com/
>
> > --
> > DjangoCon US 2010 September 7-9http://djangocon.us/
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-us...@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.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: admin site not working, problem with urls.py?

2010-10-06 Thread Sandro Dutra
Ah yeah, forget to comment this...

If you're using the django dev server to test your application, you'll have
to set where the static files are, you can do this with a builtin view:
django.views.static.serve.

2010/10/6 Steve Holden 

> It's much more likely that your CSS style sheets are not being served
> correctly - you can check this by looking at the page's HTML source and
> then pasting the style sheet's URL into your browser's location bar.
>
> The Django 1.0 admin is a reasonably well-styled layout, so you
> certainly shouldn't be seeing anything "funky".
>
> regards
>  Steve
>
> On 10/6/2010 11:59 AM, Lisa Gandy wrote:
> > Thanks for the help,
> > This ended up working
> > (r'^admin/(.*)', admin.site.root)
> >
> > Now, when I look at the admin panel, its really funky looking, it
> > definitely works, but its like its missing a template.
> > Do yout hink its b/c the version of django on teh server is old?
> > Its 1.0.4
> >
> > If thats the problem, what is the easiest way to upgrade django on
> > Ubuntu 8.10?
> >
> > Thanks!
> > Lisa
> >
> >
> > On Tue, Oct 5, 2010 at 6:34 PM, Sandro Dutra  > > wrote:
> >
> > You have to check if you enable the "admin" application on your
> > settings.py.
> >
> > 2010/10/5 Sithembewena Lloyd Dube  > >
> >
> > Hey Lisa,
> >
> > Look at this line (supplied by you):
> >
> >
> >  # (r'^ccu/', include('ccu.foo.urls')),
> >
> > ^^ the line above is correct.
> >
> > Now, the line that's giving you trouble is:
> >
> >  (r'^admin/', include(admin.site.urls)),
> >
> > ^^ spot the difference?
> >
> > I think you should use quotes around your argument to the
> > include function. That function expects a string, I believe :)
> >
> >
> >
> > On Wed, Oct 6, 2010 at 12:01 AM, Lisa  > > wrote:
> >
> > Hi all,
> > I'm sure I have a pretty simple problem...
> > here's my url.py file
> >
> > 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'^ccu/', include('ccu.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'^stories/$','ccu_gen.views.all_stories'),
> >(r'^stories/(?P\d+)/$',
> 'ccu_gen.views.one_story'),
> >(r'^admin/', include(admin.site.urls)),
> >
> > )
> >
> > stories works fine, but for the admin url, I'm getting the
> error
> > __import__() argument 1 must be string, not instancemethod
> >
> > any ideas?
> >
> > Thanks!
> --
> Steve Holden   +1 571 484 6266   +1 800 494 3119
> PyCon 2011 Atlanta March 9-17   http://us.pycon.org/
> See Python Video!   http://python.mirocommunity.org/
> Holden Web LLC http://www.holdenweb.com/
>
> --
> DjangoCon US 2010 September 7-9 http://djangocon.us/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: admin site not working, problem with urls.py?

2010-10-06 Thread Steve Holden
It's much more likely that your CSS style sheets are not being served
correctly - you can check this by looking at the page's HTML source and
then pasting the style sheet's URL into your browser's location bar.

The Django 1.0 admin is a reasonably well-styled layout, so you
certainly shouldn't be seeing anything "funky".

regards
 Steve

On 10/6/2010 11:59 AM, Lisa Gandy wrote:
> Thanks for the help,
> This ended up working
> (r'^admin/(.*)', admin.site.root)
> 
> Now, when I look at the admin panel, its really funky looking, it
> definitely works, but its like its missing a template.
> Do yout hink its b/c the version of django on teh server is old?
> Its 1.0.4
> 
> If thats the problem, what is the easiest way to upgrade django on
> Ubuntu 8.10?
> 
> Thanks!
> Lisa
> 
> 
> On Tue, Oct 5, 2010 at 6:34 PM, Sandro Dutra  > wrote:
> 
> You have to check if you enable the "admin" application on your
> settings.py.
> 
> 2010/10/5 Sithembewena Lloyd Dube  >
> 
> Hey Lisa,
> 
> Look at this line (supplied by you):
> 
> 
>  # (r'^ccu/', include('ccu.foo.urls')),
> 
> ^^ the line above is correct.
> 
> Now, the line that's giving you trouble is:
> 
>  (r'^admin/', include(admin.site.urls)),
> 
> ^^ spot the difference?
> 
> I think you should use quotes around your argument to the
> include function. That function expects a string, I believe :)
> 
> 
> 
> On Wed, Oct 6, 2010 at 12:01 AM, Lisa  > wrote:
> 
> Hi all,
> I'm sure I have a pretty simple problem...
> here's my url.py file
> 
> 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'^ccu/', include('ccu.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'^stories/$','ccu_gen.views.all_stories'),
>(r'^stories/(?P\d+)/$', 'ccu_gen.views.one_story'),
>(r'^admin/', include(admin.site.urls)),
> 
> )
> 
> stories works fine, but for the admin url, I'm getting the error
> __import__() argument 1 must be string, not instancemethod
> 
> any ideas?
> 
> Thanks!
-- 
Steve Holden   +1 571 484 6266   +1 800 494 3119
PyCon 2011 Atlanta March 9-17   http://us.pycon.org/
See Python Video!   http://python.mirocommunity.org/
Holden Web LLC http://www.holdenweb.com/

-- 
DjangoCon US 2010 September 7-9 http://djangocon.us/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: admin site not working, problem with urls.py?

2010-10-06 Thread Sandro Dutra
Your Django version is really outdated.

I think you can update using the Update Manager or calling the terminal and
typing:

sudo apt-get update

This command will resync the packages with the current version on distro
repository.

Alternatively you can update via python setuptools, using the command:

easy_install --upgrade django

After this you can try:

import django
django.VERSION

and see if you're on the last stable release.

2010/10/6 Lisa Gandy 

> Thanks for the help,
> This ended up working
> (r'^admin/(.*)', admin.site.root)
>
> Now, when I look at the admin panel, its really funky looking, it
> definitely works, but its like its missing a template.
> Do yout hink its b/c the version of django on teh server is old?
> Its 1.0.4
>
> If thats the problem, what is the easiest way to upgrade django on Ubuntu
> 8.10?
>
> Thanks!
> Lisa
>
>
> On Tue, Oct 5, 2010 at 6:34 PM, Sandro Dutra  wrote:
>
>>  You have to check if you enable the "admin" application on your
>> settings.py.
>>
>> 2010/10/5 Sithembewena Lloyd Dube 
>>
>> Hey Lisa,
>>>
>>> Look at this line (supplied by you):
>>>
>>>
>>>  # (r'^ccu/', include('ccu.foo.urls')),
>>>
>>> ^^ the line above is correct.
>>>
>>> Now, the line that's giving you trouble is:
>>>
>>>  (r'^admin/', include(admin.site.urls)),
>>>
>>> ^^ spot the difference?
>>>
>>> I think you should use quotes around your argument to the include
>>> function. That function expects a string, I believe :)
>>>
>>>
>>>
>>> On Wed, Oct 6, 2010 at 12:01 AM, Lisa  wrote:
>>>
 Hi all,
 I'm sure I have a pretty simple problem...
 here's my url.py file

 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'^ccu/', include('ccu.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'^stories/$','ccu_gen.views.all_stories'),
(r'^stories/(?P\d+)/$', 'ccu_gen.views.one_story'),
(r'^admin/', include(admin.site.urls)),

 )

 stories works fine, but for the admin url, I'm getting the error
 __import__() argument 1 must be string, not instancemethod

 any ideas?

 Thanks!

 --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To post to this group, send email to django-us...@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.


>>>
>>>
>>> --
>>> Regards,
>>> Sithembewena Lloyd Dube
>>> http://www.lloyddube.com
>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Django users" group.
>>> To post to this group, send email to django-us...@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.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-us...@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.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@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.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: admin site not working, problem with urls.py?

2010-10-06 Thread Lisa Gandy
Thanks for the help,
This ended up working
(r'^admin/(.*)', admin.site.root)

Now, when I look at the admin panel, its really funky looking, it definitely
works, but its like its missing a template.
Do yout hink its b/c the version of django on teh server is old?
Its 1.0.4

If thats the problem, what is the easiest way to upgrade django on Ubuntu
8.10?

Thanks!
Lisa


On Tue, Oct 5, 2010 at 6:34 PM, Sandro Dutra  wrote:

> You have to check if you enable the "admin" application on your
> settings.py.
>
> 2010/10/5 Sithembewena Lloyd Dube 
>
> Hey Lisa,
>>
>> Look at this line (supplied by you):
>>
>>
>>  # (r'^ccu/', include('ccu.foo.urls')),
>>
>> ^^ the line above is correct.
>>
>> Now, the line that's giving you trouble is:
>>
>>  (r'^admin/', include(admin.site.urls)),
>>
>> ^^ spot the difference?
>>
>> I think you should use quotes around your argument to the include
>> function. That function expects a string, I believe :)
>>
>>
>>
>> On Wed, Oct 6, 2010 at 12:01 AM, Lisa  wrote:
>>
>>> Hi all,
>>> I'm sure I have a pretty simple problem...
>>> here's my url.py file
>>>
>>> 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'^ccu/', include('ccu.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'^stories/$','ccu_gen.views.all_stories'),
>>>(r'^stories/(?P\d+)/$', 'ccu_gen.views.one_story'),
>>>(r'^admin/', include(admin.site.urls)),
>>>
>>> )
>>>
>>> stories works fine, but for the admin url, I'm getting the error
>>> __import__() argument 1 must be string, not instancemethod
>>>
>>> any ideas?
>>>
>>> Thanks!
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Django users" group.
>>> To post to this group, send email to django-us...@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.
>>>
>>>
>>
>>
>> --
>> Regards,
>> Sithembewena Lloyd Dube
>> http://www.lloyddube.com
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-us...@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.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@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.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: admin site not working, problem with urls.py?

2010-10-05 Thread Sandro Dutra
You have to check if you enable the "admin" application on your settings.py.

2010/10/5 Sithembewena Lloyd Dube 

> Hey Lisa,
>
> Look at this line (supplied by you):
>
>
>  # (r'^ccu/', include('ccu.foo.urls')),
>
> ^^ the line above is correct.
>
> Now, the line that's giving you trouble is:
>
>  (r'^admin/', include(admin.site.urls)),
>
> ^^ spot the difference?
>
> I think you should use quotes around your argument to the include function.
> That function expects a string, I believe :)
>
>
>
> On Wed, Oct 6, 2010 at 12:01 AM, Lisa  wrote:
>
>> Hi all,
>> I'm sure I have a pretty simple problem...
>> here's my url.py file
>>
>> 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'^ccu/', include('ccu.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'^stories/$','ccu_gen.views.all_stories'),
>>(r'^stories/(?P\d+)/$', 'ccu_gen.views.one_story'),
>>(r'^admin/', include(admin.site.urls)),
>>
>> )
>>
>> stories works fine, but for the admin url, I'm getting the error
>> __import__() argument 1 must be string, not instancemethod
>>
>> any ideas?
>>
>> Thanks!
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-us...@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.
>>
>>
>
>
> --
> Regards,
> Sithembewena Lloyd Dube
> http://www.lloyddube.com
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@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.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: admin site not working, problem with urls.py?

2010-10-05 Thread Sithembewena Lloyd Dube
Hey Lisa,

Look at this line (supplied by you):

 # (r'^ccu/', include('ccu.foo.urls')),

^^ the line above is correct.

Now, the line that's giving you trouble is:
 (r'^admin/', include(admin.site.urls)),

^^ spot the difference?

I think you should use quotes around your argument to the include function.
That function expects a string, I believe :)


On Wed, Oct 6, 2010 at 12:01 AM, Lisa  wrote:

> Hi all,
> I'm sure I have a pretty simple problem...
> here's my url.py file
>
> 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'^ccu/', include('ccu.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'^stories/$','ccu_gen.views.all_stories'),
>(r'^stories/(?P\d+)/$', 'ccu_gen.views.one_story'),
>(r'^admin/', include(admin.site.urls)),
>
> )
>
> stories works fine, but for the admin url, I'm getting the error
> __import__() argument 1 must be string, not instancemethod
>
> any ideas?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@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.
>
>


-- 
Regards,
Sithembewena Lloyd Dube
http://www.lloyddube.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: admin site not working, problem with urls.py?

2010-10-05 Thread Tran Cao Thai
hope this helps : http://botland.oebfare.com/logger/django/2009/2/14/15/

The conversation is very funny also :D

On Wed, Oct 6, 2010 at 9:01 AM, Lisa  wrote:
> Hi all,
> I'm sure I have a pretty simple problem...
> here's my url.py file
>
> 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'^ccu/', include('ccu.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'^stories/$','ccu_gen.views.all_stories'),
>    (r'^stories/(?P\d+)/$', 'ccu_gen.views.one_story'),
>    (r'^admin/', include(admin.site.urls)),
>
> )
>
> stories works fine, but for the admin url, I'm getting the error
> __import__() argument 1 must be string, not instancemethod
>
> any ideas?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.