Re: [Django] #11147: manage.py doesn't work with settings directory in pydev

2009-05-20 Thread Django
#11147: manage.py doesn't work with settings directory in pydev
--+-
  Reporter:  Leo  | Owner:  nobody
Status:  closed   | Milestone:  1.1   
 Component:  django-admin.py  |   Version:  SVN   
Resolution:  invalid  |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by Leo):

 Thanks for all of the feedback. The workaround suggested by kmtracey is
 fine for now. From an more theoretical standpoint, its just a bandaid,
 since 'src' is already on the pythonpath and is not an importable package
 (/lib/site-packages wouldn't have an `__init__.py` either) but that's just
 a handwavy argument.

 jacob: It doesn't actually go up two directories. It assumes 'src' is the
 project name and attempts to import it (which doesn't work in the existing
 case since its a root pythonpath and not a package).

 What ramiro says makes a lot of sense here, since I'm not using a project
 I shouldn't expect manage.py to work - although it would be nice if it did
 :-)

 The one small qualm I have here is that if we assume a project layout,
 manage.py will always be in the project directory and that directory is
 available on the pythonpath since its the cwd when manage.py is run.
 There's probably use cases that I'm totally not aware of but from the ones
 I understand there's no need to explicitly import the project package.

 Regardless, I'm fine with either abandoning manage.py going forward (since
 we're not using projects) or putting the `__init__.py` files in for now.

 Thanks again for the comments.

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



Re: [Django] #11147: manage.py doesn't work with settings directory in pydev

2009-05-20 Thread Django
#11147: manage.py doesn't work with settings directory in pydev
--+-
  Reporter:  Leo  | Owner:  nobody
Status:  closed   | Milestone:  1.1   
 Component:  django-admin.py  |   Version:  SVN   
Resolution:  invalid  |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by kmtracey):

 Leo, I don't understand why you can't just put an `__init__.py` in the
 `src` directory?  Fine, so Pydev doesn't do it automagically but it's easy
 enough to add one.  Then everything works.  I also don't see that this
 structure is mandated by Pydev -- you do not have to use the Eclipse/Pydev
 default `src` directory structure, it's just the default.  You can easily
 override and use your own source tree structure.  But given that you want
 to use that structure, what's the problem with putting an `__init__.py`
 file in the root?

 `__init__.py` wasn't needed in the root when you used a settings directory
 prior to r10751 because the code was incorrectly figuring the 'project'
 dir WAS the settings dir.  And things like `startapp` would create
 subdirectories in the settings dir, instead of the root project dir.  Now
 the project dir is being figured out correctly, it needs an `__init__.py`
 file.

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



Re: [Django] #11147: manage.py doesn't work with settings directory in pydev

2009-05-20 Thread Django
#11147: manage.py doesn't work with settings directory in pydev
--+-
  Reporter:  Leo  | Owner:  nobody
Status:  closed   | Milestone:  1.1   
 Component:  django-admin.py  |   Version:  SVN   
Resolution:  invalid  |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by jacob):

  * status:  reopened => closed
  * resolution:  => invalid

Comment:

 I'm fairly sure this is a PyDev bug because looking at the code there's no
 way it'll step up *two* directories (it just calls `os.path.dirname`).

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



Re: [Django] #11147: manage.py doesn't work with settings directory in pydev

2009-05-19 Thread Django
#11147: manage.py doesn't work with settings directory in pydev
--+-
  Reporter:  Leo  | Owner:  nobody
Status:  reopened | Milestone:  1.1   
 Component:  django-admin.py  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by ramiro):

 Replying to [comment:3 Leo]:
 > This isn't a support question. Running without a project module is
 perfectly normal and even advocated by James Bennett -
 http://www.b-list.org/weblog/2007/nov/09/projects/

 Problem is that if you are using `manage.py` then you are using a project.

 If you really don't want to use a project do what that article (and other
 similar blog posts) suggest: Set up things manually so all you apps, your
 settings and your main URL map (usually `urls.py`) are in you Python path
 and use you Django's `django-admin` (or similar home-made script) instead.

 > The change mentioned in the ticket breaks the ability to do this, hence
 its a regression, hence this ticket.

 I'd say that if that worked before it was a another problem and the r10751
 corrected it.

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



Re: [Django] #11147: manage.py doesn't work with settings directory in pydev

2009-05-19 Thread Django
#11147: manage.py doesn't work with settings directory in pydev
--+-
  Reporter:  Leo  | Owner:  nobody
Status:  reopened | Milestone:  1.1   
 Component:  django-admin.py  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by Leo):

  * status:  closed => reopened
  * resolution:  invalid =>

Comment:

 This isn't a support question. Running without a project module is
 perfectly normal and even advocated by James Bennett -
 http://www.b-list.org/weblog/2007/nov/09/projects/

 The change mentioned in the ticket breaks the ability to do this, hence
 its a regression, hence this ticket.

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



Re: [Django] #11147: manage.py doesn't work with settings directory in pydev

2009-05-19 Thread Django
#11147: manage.py doesn't work with settings directory in pydev
--+-
  Reporter:  Leo  | Owner:  nobody
Status:  closed   | Milestone:  1.1   
 Component:  django-admin.py  |   Version:  SVN   
Resolution:  invalid  |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by dc):

  * status:  new => closed
  * resolution:  => invalid

Comment:

 Django project is a normal python module and you must have __init__.py in
 it.

 Please don't use trac for asking for the support questions, use either
 #django on freenode or django-users mailing list.

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



Re: [Django] #11147: manage.py doesn't work with settings directory in pydev

2009-05-18 Thread Django
#11147: manage.py doesn't work with settings directory in pydev
--+-
  Reporter:  Leo  | Owner:  nobody
Status:  new  | Milestone:  1.1   
 Component:  django-admin.py  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by Leo):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 To clarify, this happens when I try to do `manage.py runserver`

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



[Django] #11147: manage.py doesn't work with settings directory in pydev

2009-05-18 Thread Django
#11147: manage.py doesn't work with settings directory in pydev
-+--
 Reporter:  Leo  |   Owner:  nobody
   Status:  new  |   Milestone:  1.1   
Component:  django-admin.py  | Version:  SVN   
 Keywords:   |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 The fix for #9751 - r10751 - completely broken manage.py for our
 configuration (things are set up this way for pydev):
 {{{
 /src/
  |-- app1
  |   |-- __init__.py
  |   |-- models.py
  |-- app2
  |   |-- __init__.py
  |   |-- models.py
  |-- manage.py
  |-- settings
  |   |-- __init__.py
  |   |-- settings_dev.py
  |   |-- settings_prod.py
  `-- urls.py
 }}}

 I now get the following failure - it looks like django is trying to go up
 a directory too high:
 {{{
 Traceback (most recent call last):
   File "C:\ws\fuzzy\EvoHeart2\src\manage.py", line 12, in 
 execute_manager(settings)
   File "C:\Python25\lib\site-packages\django\core\management\__init__.py",
 line 360, in execute_manager
 setup_environ(settings_mod)
   File "C:\Python25\lib\site-packages\django\core\management\__init__.py",
 line 343, in setup_environ
 project_module = import_module(project_name)
   File "C:\Python25\lib\site-packages\django\utils\importlib.py", line 35,
 in import_module
 __import__(name)
 ImportError: No module named src
 }}}

 PyDev doesn't put an `__init__.py` in the root src directory and it seems
 like there shouldn't be one there (it's a directory on the PYTHONPATH).

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