manishy635 / django-cron

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

Failed to integrate into application #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. add "from cron import Cron" to your models.py
2. define a class for the job inheriting from Cron.
3. do a "manage.py syncdb" or similar.

What is the expected output?
Expected normal functionality.

What do you see instead?
./manage syncdb --noinput #--verbosity=2
Traceback (most recent call last):
  File "./manage", line 11, in <module>
    execute_manager(settings)
  File
"/usr/lib/python2.5/site-packages/django/core/management/__init__.py", line
340, in execute_manager
    utility.execute()
  File
"/usr/lib/python2.5/site-packages/django/core/management/__init__.py", line
295, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.5/site-packages/django/core/management/base.py",
line 195, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.5/site-packages/django/core/management/base.py",
line 221, in execute
    self.validate()
  File "/usr/lib/python2.5/site-packages/django/core/management/base.py",
line 249, in validate
    num_errors = get_validation_errors(s, app)
  File
"/usr/lib/python2.5/site-packages/django/core/management/validation.py",
line 28, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/usr/lib/python2.5/site-packages/django/db/models/loading.py", line
128, in get_app_errors
    self._populate()
  File "/usr/lib/python2.5/site-packages/django/db/models/loading.py", line
57, in _populate
    self.load_app(app_name, True)
  File "/usr/lib/python2.5/site-packages/django/db/models/loading.py", line
72, in load_app
    mod = __import__(app_name, {}, {}, ['models'])
  File "/home/stava/proj/bfact/build/models.py", line 10, in <module>
    from cron import Cron
  File "/usr/lib/python2.5/site-packages/cron/__init__.py", line 1, in <module>
    from apps.cron.base import Cron
ImportError: No module named apps.cron.base

What version of the product are you using? On what operating system?
Latest from trunk, revision 4.

Please provide any additional information below.
This could be due to lack of knowledge (due to lack of documentation).
Maybe I'm not using this addon they way I should.

Original issue reported on code.google.com by st...@linadd.org on 24 Oct 2008 at 6:57

GoogleCodeExporter commented 8 years ago
Ahh, my guess is you have the Cron app directly on your python path as seems to 
be 
community standard and the code I have in SVN uses my standard which is to have 
all 
apps in an apps directory which is on the python path. So you will need to edit 
the 
imports.

NOTE: I have not updated this app since well before django 1.0 came out. I am 
actually working on a rewrite of the app that should be ready for release by 
the end 
of the week, so you might want to wait till then

Original comment by digitalx...@gmail.com on 24 Oct 2008 at 7:03

GoogleCodeExporter commented 8 years ago
It would be good for me if django-cron could be used like a normal app. I don't 
like
messing with paths as it complicates deployment. 

Original comment by andybak on 18 Nov 2008 at 10:49

GoogleCodeExporter commented 8 years ago
Can you give some type of installation guidance?  I cannot get this app to work 
for
the life of me.

Original comment by michael....@gmail.com on 19 Nov 2008 at 6:31

GoogleCodeExporter commented 8 years ago
Ok I change all it's imports to follow the community standard instead of the 
way I do 
things and updated the main page for how to install the app

Original comment by digitalx...@gmail.com on 19 Nov 2008 at 7:59