TheSundar / django-cron

Automatically exported from code.google.com/p/django-cron
MIT License
0 stars 0 forks source link

AttributeError: 'module' object has no attribute 'autodiscover' #27

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Put django_cron on your django project folder
2. Add 'django_cron' to your installed_apps
3. Add
import django_cron
django_cron.autodiscover()

to urls.py

What is the expected output? What do you see instead?
AttributeError: 'module' object has no attribute 'autodiscover'.

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by leonardo...@gmail.com on 7 Oct 2011 at 1:51

GoogleCodeExporter commented 9 years ago
I am too getting "AttributeError: 'module' object has no attribute 
'autodiscover'.". Can anyone help with a solution?

Original comment by Ami.Ben...@gmail.com on 22 Aug 2012 at 7:34

GoogleCodeExporter commented 9 years ago
Not sure if you guys still need this and I haven't tested it BUT I installed 
django_cron using easy-install and autodiscover was actually under:

django_cron.admin.admin.autodiscover()

I haven't checked to see if it DOES actually run (just getting set up). Just an 
FYI>

Original comment by barric.r...@gmail.com on 24 Sep 2012 at 1:18

GoogleCodeExporter commented 9 years ago
that location worked for me. cheers

Original comment by mbachw...@gmail.com on 22 Oct 2012 at 11:39

GoogleCodeExporter commented 9 years ago
Thats the wrong location. django_cron.admin.admin would just give you the 
default django admin auto discover.

Try editing the __init__.py and putting some logs where you see continues so 
you can see if there is an import error causing you not tou be able to execute 
the correct autodiscover

Original comment by digitalx...@gmail.com on 24 Oct 2012 at 12:20

GoogleCodeExporter commented 9 years ago
I'm getting this too, but __init__.py doesn't actually have any continues so 
I'm not sure how to debug it.

Original comment by dasmi...@gmail.com on 5 Nov 2012 at 11:23

GoogleCodeExporter commented 9 years ago
Your __init__.py should look like 
http://code.google.com/p/django-cron/source/browse/trunk/django_cron/__init__.py

Original comment by digitalx...@gmail.com on 5 Nov 2012 at 11:24

GoogleCodeExporter commented 9 years ago
Oh oh oh, I did a pip install, which does a completely different django-cron. 
My fault!

Original comment by dasmi...@gmail.com on 5 Nov 2012 at 11:26

GoogleCodeExporter commented 9 years ago
The two django_cron projects available are: 
https://code.google.com/p/django-cron and 
https://pypi.python.org/pypi/django-cron/

These are two different projects!

Original comment by pratik.p...@gmail.com on 30 Aug 2013 at 4:27