Re: installing django extensions

2012-08-16 Thread Alexis Roda

Al 16/08/12 19:16, En/na Sells, Fred ha escrit:

Thanks, that last post was the clue I needed. I have 2 independent, active 
django projects and was erroneously editing the settings.py in the wrong 
project.  Just plain old stupid error, but I may have not seen it for days 
without all your help.  Thanks and apologies for taking up your time.



This mistake sounds familiar :)


Regards

--
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: installing django extensions

2012-08-16 Thread Sells, Fred
Thanks, that last post was the clue I needed. I have 2 independent, active 
django projects and was erroneously editing the settings.py in the wrong 
project.  Just plain old stupid error, but I may have not seen it for days 
without all your help.  Thanks and apologies for taking up your time.

-- 
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: installing django extensions

2012-08-16 Thread Alexis Roda

Al 16/08/12 17:20, En/na Sells, Fred ha escrit:

It seems to import OK, see below:

more manage.bat

\alltools\python26\python manage.py %1 %2 %3 %4 %5

C:\all\projects\AccTherapySchedulerServer\AccTherapySite>manage shell

C:\all\projects\AccTherapySchedulerServer\AccTherapySite>\alltools\python26\python
 manage.py shell
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)


import django_extensions
dir(django_extensions)

['VERSION', '__builtins__', '__doc__', '__file__', '__name__', '__package__', 
'__path__', '__version__', 'str_version']

django_extensions.VERSION

(0, 9)



however if I run manage help I see the following which does not 
seem like it has extensions--
Available subcommand
   cleanup
   compilemessages

...

   test
   testserver
   validate


right, django-extensions' commands are missing.


Now this is a W7 system I use for development FWIW.


I have no experience developing on w7. I have tested it on linux with a 
clean virtualenv (python 2.6.2, django 1.3 and django-extensions 0.9) 
and it works fine.


If I run 'python' by itself I can get the django commands but not the 
d-e ones:


$ python
Python 2.6.2 (r262:71600, May 21 2009, 18:30:52)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from django.core.management import get_commands
>>> get_commands().keys()
['compilemessages', 'dumpdata', 'startproject', 'sqlcustom',
...
'loaddata', 'cleanup', 'sqlindexes']


If I run 'python manage.py shell' I get both django and d-e commands:

$ python manage.py shell
Python 2.6.2 (r262:71600, May 21 2009, 18:30:52)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from django.core.management import get_commands
>>> get_commands().keys()
['show_urls', 'generate_secret_key', 'set_fake_passwords',
...
'describe_form', 'cleanup', 'sqlindexes']


That makes me believe that the problem is somewhat related with the 
settings not being (properly) loaded. Could you try:


$ python manage.py shell
Python 2.6.2 (r262:71600, May 21 2009, 18:30:52)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from django.conf import settings
>>> settings.INSTALLED_APPS
['django.contrib.auth', 'django.contrib.contenttypes', 
'django.contrib.sessions', 'django.contrib.sites', 
'django.contrib.messages', 'django.contrib.staticfiles', 
'django_extensions']

>>> import os
>>> os.environ["DJANGO_SETTINGS_MODULE"]
'foo.settings'


I expect that you'll get an ImportError exception (your environment is 
not properly configured) or that 'django_extensions' is missing (the 
wrong settings.py is being loaded).




Regards

--
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: installing django extensions

2012-08-16 Thread Sells, Fred
It seems to import OK, see below:
>more manage.bat
\alltools\python26\python manage.py %1 %2 %3 %4 %5

C:\all\projects\AccTherapySchedulerServer\AccTherapySite>manage shell

C:\all\projects\AccTherapySchedulerServer\AccTherapySite>\alltools\python26\python
 manage.py shell
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>>
>>> import django_extensions
>>> dir(django_extensions)
['VERSION', '__builtins__', '__doc__', '__file__', '__name__', '__package__', 
'__path__', '__version__', 'str_version']
>>> django_extensions.VERSION
(0, 9)
>>>
however if I run manage help I see the following which does not 
seem like it has extensions--
Available subcommand
  cleanup
  compilemessages
  createcachetable
  dbshell
  diffsettings
  dumpdata
  flush
  inspectdb
  loaddata
  makemessages
  reset
  runfcgi
  runserver
  shell
  sql
  sqlall
  sqlclear
  sqlcustom
  sqlflush
  sqlindexes
  sqlinitialdata
  sqlreset
  sqlsequencereset
  startapp
  syncdb
  test
  testserver
  validate

Now this is a W7 system I use for development FWIW.

===

-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Amyth Arora
Sent: Thursday, August 16, 2012 11:10 AM
To: django-users@googlegroups.com
Subject: Re: installing django extensions

As Alexis said,

Try importing it in a shell and see what response you get, the INSTALLED_APPS 
dictionary is correct , seems more like a corrupt installation of 
django_extentions.

On Thu, Aug 16, 2012 at 6:53 PM, Sells, Fred <fred.se...@adventistcare.org> 
wrote:
> I'm running python2.6 and django 1.3
>
>
>
> I've installed django_extensions using easy_install  and verified it 
> as shown.
>
> Directory of C:\alltools\python26\Lib\site-packages
>
>
>
> 08/16/2012  07:59 AM  .
>
> 08/16/2012  07:59 AM  ..
>
> 03/12/2012  11:19 AM  django
>
> 05/28/2011  10:47 AM 1,255 Django-1.3-py2.6.egg-info
>
> 08/16/2012  07:59 AM  django_extensions-0.9-py2.6.egg
>
>
>
> And via python as shown below
>
> C:\alltools\python26>python
>
> Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit 
> (Intel)] on win32
>
> Type "help", "copyright", "credits" or "license" for more information.
>
>>>> import django_extensions
>
>>>> dir(django_extensions)
>
> ['VERSION', '__builtins__', '__doc__', '__file__', '__name__', 
> '__package__', '__path__', '__version__', 'str_version']
>
>
>
> I think my problem is in my settings.py file which I configured as 
> shown based on the video 
> http://ericholscher.com/blog/2008/sep/12/screencast-django-command-ext
> ensions/ I have googled for the correct notation, but with no success 
> and the following just "feels" wrong.  I suspect I'm mixing "old" and 
> new configuration styles based on older documentation but have found 
> nothing better.
>
>
>
> INSTALLED_APPS = (
>
> #'django.contrib.auth',
>
> 'django.contrib.contenttypes',
>
> 'django.contrib.sessions',
>
> 'django.contrib.sites',
>
> 'django.contrib.messages',
>
> 'django_extensions',
>
>   ... my stuff
>
>
>
> When I try to use the extensions, they are not there and manage help 
> just shows the normal default commands
>
>
>
> :\all\projects\AccTherapySchedulerServer\AccTherapySite>\alltools\pyth
> on26\python manage.py graph_models -a -g -o test.png
>
> nknown command: 'graph_models'
>
> --
> 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.



--
Best Regards,

Amyth Arora
+91856363
+918800212140

--
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.


-- 
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: installing django extensions

2012-08-16 Thread Amyth Arora
As Alexis said,

Try importing it in a shell and see what response you get, the
INSTALLED_APPS dictionary is correct , seems more like a corrupt
installation of django_extentions.

On Thu, Aug 16, 2012 at 6:53 PM, Sells, Fred
 wrote:
> I’m running python2.6 and django 1.3
>
>
>
> I’ve installed django_extensions using easy_install  and verified it as
> shown.
>
> Directory of C:\alltools\python26\Lib\site-packages
>
>
>
> 08/16/2012  07:59 AM  .
>
> 08/16/2012  07:59 AM  ..
>
> 03/12/2012  11:19 AM  django
>
> 05/28/2011  10:47 AM 1,255 Django-1.3-py2.6.egg-info
>
> 08/16/2012  07:59 AM  django_extensions-0.9-py2.6.egg
>
>
>
> And via python as shown below
>
> C:\alltools\python26>python
>
> Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)]
> on win32
>
> Type "help", "copyright", "credits" or "license" for more information.
>
 import django_extensions
>
 dir(django_extensions)
>
> ['VERSION', '__builtins__', '__doc__', '__file__', '__name__',
> '__package__', '__path__', '__version__', 'str_version']
>
>
>
> I think my problem is in my settings.py file which I configured as shown
> based on the video
> http://ericholscher.com/blog/2008/sep/12/screencast-django-command-extensions/
> I have googled for the correct notation, but with no success and the
> following just “feels” wrong.  I suspect I’m mixing “old” and new
> configuration styles based on older documentation but have found nothing
> better.
>
>
>
> INSTALLED_APPS = (
>
> #'django.contrib.auth',
>
> 'django.contrib.contenttypes',
>
> 'django.contrib.sessions',
>
> 'django.contrib.sites',
>
> 'django.contrib.messages',
>
> 'django_extensions',
>
>   … my stuff
>
>
>
> When I try to use the extensions, they are not there and manage help just
> shows the normal default commands
>
>
>
> :\all\projects\AccTherapySchedulerServer\AccTherapySite>\alltools\python26\python
> manage.py graph_models -a -g -o test.png
>
> nknown command: 'graph_models'
>
> --
> 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.



-- 
Best Regards,

Amyth Arora
+91856363
+918800212140

-- 
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: installing django extensions

2012-08-16 Thread Alexis Roda

Al 16/08/12 15:23, En/na Sells, Fred ha escrit:


C:\alltools\python26>python

Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit
(Intel)] on win32

Type "help", "copyright", "credits" or "license" for more information.


>> import django_extensions



>> dir(django_extensions)


['VERSION', '__builtins__', '__doc__', '__file__', '__name__',
'__package__', '__path__', '__version__', 'str_version']


Your INSTALLED_APPS snippet looks right to me.

What happens if you import 'django_extensions' from 'manage.py shell' ?

...>\alltools\python26\python manage.py shell
...
>> import django_extensions
>> dir(django_extensions)


Regards

--
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.



installing django extensions

2012-08-16 Thread Sells, Fred
I'm running python2.6 and django 1.3

I've installed django_extensions using easy_install  and verified it as shown.
Directory of C:\alltools\python26\Lib\site-packages

08/16/2012  07:59 AM  .
08/16/2012  07:59 AM  ..
03/12/2012  11:19 AM  django
05/28/2011  10:47 AM 1,255 Django-1.3-py2.6.egg-info
08/16/2012  07:59 AM  django_extensions-0.9-py2.6.egg

And via python as shown below
C:\alltools\python26>python
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import django_extensions
>>> dir(django_extensions)
['VERSION', '__builtins__', '__doc__', '__file__', '__name__', '__package__', 
'__path__', '__version__', 'str_version']

I think my problem is in my settings.py file which I configured as shown based 
on the video 
http://ericholscher.com/blog/2008/sep/12/screencast-django-command-extensions/  
I have googled for the correct notation, but with no success and the following 
just "feels" wrong.  I suspect I'm mixing "old" and new configuration styles 
based on older documentation but have found nothing better.

INSTALLED_APPS = (
#'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django_extensions',
  ... my stuff

When I try to use the extensions, they are not there and manage help just shows 
the normal default commands

:\all\projects\AccTherapySchedulerServer\AccTherapySite>\alltools\python26\python
 manage.py graph_models -a -g -o test.png
nknown command: 'graph_models'

-- 
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.