It sounds like it's still the problem of django-admin.py not being in your
path.  In order to script a file like this from any directory, the os needs
to know about the script - which is done by adding it to your path.
On Unix, we generally make links to these files in /usr/local, on Windows,
you could try adding the file to environment variables. Specifically, you
would add:
C:\Python26\Lib\site-package\django\bin\django-admin.py
You can try this link for an explanation of how to edit the environment
variables:
http://www.computerhope.com/issues/ch000549.htm

Cheers,
Dan

On Mon, Mar 2, 2009 at 11:38 PM, kkaste <finnka...@gmail.com> wrote:

>
> Thank you for your quick response (and your patience). The following
> command worked:
> C:\Python26\Lib\site-package\django\bin> django-admin.py startproject
> mysite
> It created C:\Python26\Lib\site-package\django\bin\mysite containing
> the necessary files. The \django\bin subdirectory contains the file
> django-admin.py. This appears to be the only subdirectory where the
> django-admin.py command will work.
>
> If I cd into the subdirectory \django\test then the django-admin.py
> command gives an error. The tutorial seemed to indicate I could cd
> just about anywhere to set up the mysite subdirectory. However I
> appear to be stuck in the bin subdirectory. I guess I shouldn't
> complain.
> C:\Python26\Lib\site-package\django\test> django-admin.py startproject
> mysite
> 'django-admin.py' is not recognized as an internal or external
> command....
>
> Thanks for your valuable help, Alex!
> kkaste
>
> On Mar 2, 8:07 pm, Alex Gaynor <alex.gay...@gmail.com> wrote:
> > On Mon, Mar 2, 2009 at 11:05 PM, kkaste <finnka...@gmail.com> wrote:
> >
> > > Thanks for your quick response. Once I switched from the DOS command
> > > line to the Python prompt I got "import django" to work. The next dumb
> > > mistake I am making comes when I type django-admin.py startproject
> > > mysite at the Python prompt. I get the following error:
> > > File "<stdin>", line 1
> > > django-admin.py startproject scripts
> > >                                        ^
> > > SyntaxError: invalid syntax
> >
> > > Do I need to create something before I do this command?
> >
> > > Thanks in advance for any help you can provide.
> > > kkaste
> >
> > > On Mar 2, 5:24 pm, Alex Gaynor <alex.gay...@gmail.com> wrote:
> > > > On Mon, Mar 2, 2009 at 8:20 PM, kkaste <finnka...@gmail.com> wrote:
> >
> > > > > I followed the instructions for installing django. Apparently this
> was
> > > > > successful because I have a folder named django under the site-
> > > > > packages folder of Python26, and a file named django-admin.py in
> the
> > > > > bin folder under that. So with that success under my belt, I
> followed
> > > > > the prompts on the django website and moved on to the tutorial. The
> > > > > instructions are "From the command line, cd into a directory where
> > > > > you’d like to store your code, then run the command django-admin.py
> > > > > startproject mysite." I did that but I get the following error:
> 'djano-
> > > > > admin.py' is not recognized as an internal or external command...
> So I
> > > > > tried the following command: import django. Again I got the error:
> > > > > 'import' is not recognized as an internal or external command...
> >
> > > > > I know I must be doing something dumb, but I don't know what. I am
> > > > > coming from ColdFusion trying to learn Django. I am not used to
> using
> > > > > the DOS command line. Am I executing these commands from the wrong
> > > > > directory? Please be kind to my ignorance. If your answer includes
> > > > > terms like "system path", or anything else that is not plain
> English,
> > > > > please try to give me a full explanation.
> >
> > > > > Much appreciated,
> > > > > kkaste
> >
> > > > You're problem is that you're typing commands liek import django at
> the
> > > DOS
> > > > command, instead of at the Python prompt.  Any command prefixed with
> >>>
> > > > means it needs to be executed in a python shell.  The reason you
> can't do
> > > > django-admin.py is because it's not on your PATH, someone more
> familiar
> > > with
> > > > windows could tell you how to alter that, but for now you can get to
> it
> > > by
> > > > providing it's fully qualified location.
> >
> > > > Alex
> >
> > > > --
> > > > "I disapprove of what you say, but I will defend to the death your
> right
> > > to
> > > > say it." --Voltaire
> > > > "The people's good is the highest law."--Cicero
> >
> > django-admin.py is a python script, so you run it from the windows shell.
> >
> > Alex
> >
> > --
> > "I disapprove of what you say, but I will defend to the death your right
> to
> > say it." --Voltaire
> > "The people's good is the highest law."--Cicero
> >
>

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

Reply via email to