Django

Jasper Frumau jasperfrumau at gmail.com
Sat Jan 23 02:19:39 PST 2010


On Sat, Jan 23, 2010 at 12:39 PM, Scott Haneda <talklists at newgeo.com> wrote:

> On Jan 22, 2010, at 11:09 PM, Jasper Frumau wrote:
>
>
> I am not sure how the command can not be found, since it was called
> implicitly.  How about we try a few other things, keeping in mind, I know
> nothing about django.
>
> Though this is interesting:
> http://dl.dropbox.com/u/340087/drops/01.23.10/django-9cc2b400-011835.png
> If google auto complete is any indication that others are having the same
> issue, and I can estimate that those "others" are more than likely not ports
> users, this seems to be a Django issue.
>
> The first hit in google:
> http://code.djangoproject.com/wiki/InstallationPitfalls
>

Yes, should have founf that one myself. Read stuff @
http://docs.djangoproject.com/en/dev/intro/install/

>
> I am not sure I agree with that solution.  Even though you do not have the
> Django bin in your path, we called it direct.  Lets try a different method:
> $cd /opt/local/lib/python2.4/site-packages/django/bin/
> $ls -la
> What does that report? Just the line for 'django-admin.py' will suffice, I
> want to see the permissions.
>

Been Googling some and reading some more and joined Django on IRC Free node.
They said the python that comes with $python is not the one Django is
installed under and recommended to Google for related issues. Well here is
the result you asked:

Jaspers-MacBook-Pro:bin jasper$ cd
/opt/local/lib/python2.4/site-packages/django/bin/
Jaspers-MacBook-Pro:bin jasper$ ls -la
total 88
-rwxr-xr-x   2 root  admin   128 Dec 30  2006 django-admin.py

I chmod +x django-admin already, but the command still does not work. I
guess that is because of a Python - Django issue..


> While in the above bin directory, assuming the file is +x, so the rwx's in
> the first column, end in an 'x', what happens when you run:
> $sudo ./django-admin.py
>
> If the file is not executable:
> $cd /opt/local/lib/python2.4/site-packages/django/bin/
> $sudo cp django-admin.py django-admin.fix.py
> $sudo chmod +x django-admin.fix.py
>
> Also strange, this trac note states the same about the PATH:
> http://code.djangoproject.com/ticket/4679
>

Read it briefly and realized there is probably still a path issue..

>
> Looking over some more notes, it does look as though people are symbolic
> linking their Django stuff into some place that their PATH looks.  You may
> want to give this a try, since of the above links, and two more, that is
> working for them:
>
> sudo ln -s
> /opt/local/lib/python2.4/site-packages/django/bin/django-admin.py
> /opt/local/bin/
>

Yes, sounds better than deleting python and installing it where Django looks
for it... OK, made the soft link:
$ sudo ln -s
/opt/local/lib/python2.4/site-packages/django/bin/django-admin.py
/opt/local/bin/
Password:


>
> >> then add the django bin to your path, which is probably in one of the do
>

Edit ~/.Profile and added the path:
$ grep PATH ~/.Profile
# MacPorts Installer addition on 2009-10-20_at_13:11:20: adding an
appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
export
PATH=/opt/local/bin:opt/local/sbin:/opt/local/lib/python2.4/site-packages/django/bin:$PATH

And:

$ django-admin.py
Type 'django-admin.py help' for usage.

Daniel and Scott you are  heroes!!! Thanks a lot! Learned a lot about $PATH,
soft links and other stuff today.
Again Thanks! I appreciate it!

>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20100123/78c6f958/attachment.html>


More information about the macports-users mailing list