Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » need help following tutorial part 1 [RSS Feed]

#1 Jan. 29, 2011 18:40:46

P.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

need help following tutorial part 1


I'm kinda stuck and would greatly appreciate any help.

I followed these turorials and got Django to install. Was able to
import Django and print out the version correctly. I'm running
Apache2.2 on windows 7 with mod_wsgihttp://docs.djangoproject.com/en/1.2/intro/install/But moving forward to part 1, It says, cd to the directory and run the
command
django-admin.py startproject mysite

This is where I don't understand.
- running the command from cmd, it says django-admin.py is not
recognized as command.
- if I run python first, it says syntax error.

Am I missing something from the tutorial? Does the project need to be
in a particular folder in order for the .py file to be executable? Is
there anything else I need to add to windows other than adding C:
\Python27 to PATH?

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 29, 2011 18:44:23

Axel B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

need help following tutorial part 1


hm ... my windows times are over quite a while, BUT ...

1) try associating the .py extension with the python commandline
interpreter.
2) syntax error? send a screendump maybe, or your exact command line ... it
_should_ work without problems.

can you execute other simple python scripts?


cheers,
axel.




2011/1/29 Panupat <panup...@gmail.com>

> I'm kinda stuck and would greatly appreciate any help.
>
> I followed these turorials and got Django to install. Was able to
> import Django and print out the version correctly. I'm running
> Apache2.2 on windows 7 with mod_wsgi
>
>http://docs.djangoproject.com/en/1.2/intro/install/>
> But moving forward to part 1, It says, cd to the directory and run the
> command
> django-admin.py startproject mysite
>
> This is where I don't understand.
> - running the command from cmd, it says django-admin.py is not
> recognized as command.
> - if I run python first, it says syntax error.
>
> Am I missing something from the tutorial? Does the project need to be
> in a particular folder in order for the .py file to be executable? Is
> there anything else I need to add to windows other than adding C:
> \Python27 to PATH?
>
> --
> 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<django-users%2bunsubscr...@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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Jan. 29, 2011 18:59:52

P.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

need help following tutorial part 1


Hi Alex. Thank you for you suggestion.

It seems I can get the script to run if I type out the full path.

C:\Python27\Scripts\django-admin.py startprofect mysite

C:\Python27 is already added to my windows' PATH. Proably will need to
add C:\Python27\Scripts to it too.


On Jan 30, 1:44 am, Axel Bock <mr.axel.b...@gmail.com> wrote:
> hm ... my windows times are over quite a while, BUT ...
>
> 1) try associating the .py extension with the python commandline
> interpreter.
> 2) syntax error? send a screendump maybe, or your exact command line ... it
> _should_ work without problems.
>
> can you execute other simple python scripts?
>
> cheers,
> axel.
>
> 2011/1/29 Panupat <panup...@gmail.com>
>
> > I'm kinda stuck and would greatly appreciate any help.
>
> > I followed these turorials and got Django to install. Was able to
> > import Django and print out the version correctly. I'm running
> > Apache2.2 on windows 7 with mod_wsgi
>
> >http://docs.djangoproject.com/en/1.2/intro/install/>
> > But moving forward to part 1, It says, cd to the directory and run the
> > command
> > django-admin.py startproject mysite
>
> > This is where I don't understand.
> > - running the command from cmd, it says django-admin.py is not
> > recognized as command.
> > - if I run python first, it says syntax error.
>
> > Am I missing something from the tutorial? Does the project need to be
> > in a particular folder in order for the .py file to be executable? Is
> > there anything else I need to add to windows other than adding C:
> > \Python27 to PATH?
>

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#4 Jan. 29, 2011 19:06:08

Axel B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

need help following tutorial part 1


you should not. are you IN c:\...\scripts when you type in
"django-admin.py"? AFAIK windows adds the current directory always to the
path.

and it's AXEL ;)



2011/1/29 Panupat <panup...@gmail.com>

> Hi Alex. Thank you for you suggestion.
>
> It seems I can get the script to run if I type out the full path.
>
> C:\Python27\Scripts\django-admin.py startprofect mysite
>
> C:\Python27 is already added to my windows' PATH. Proably will need to
> add C:\Python27\Scripts to it too.
>
>
> On Jan 30, 1:44 am, Axel Bock <mr.axel.b...@gmail.com> wrote:
> > hm ... my windows times are over quite a while, BUT ...
> >
> > 1) try associating the .py extension with the python commandline
> > interpreter.
> > 2) syntax error? send a screendump maybe, or your exact command line ...
> it
> > _should_ work without problems.
> >
> > can you execute other simple python scripts?
> >
> > cheers,
> > axel.
> >
> > 2011/1/29 Panupat <panup...@gmail.com>
> >
> > > I'm kinda stuck and would greatly appreciate any help.
> >
> > > I followed these turorials and got Django to install. Was able to
> > > import Django and print out the version correctly. I'm running
> > > Apache2.2 on windows 7 with mod_wsgi
> >
> > >http://docs.djangoproject.com/en/1.2/intro/install/> >
> > > But moving forward to part 1, It says, cd to the directory and run the
> > > command
> > > django-admin.py startproject mysite
> >
> > > This is where I don't understand.
> > > - running the command from cmd, it says django-admin.py is not
> > > recognized as command.
> > > - if I run python first, it says syntax error.
> >
> > > Am I missing something from the tutorial? Does the project need to be
> > > in a particular folder in order for the .py file to be executable? Is
> > > there anything else I need to add to windows other than adding C:
> > > \Python27 to PATH?
> >
>
> --
> 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<django-users%2bunsubscr...@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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#5 Jan. 29, 2011 19:10:56

P.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

need help following tutorial part 1


Oh Axel, sorry about that ^_^;

The tutorial said I should cd to the directory I want to start my
project.
So no I wasn't in C:\Python27\Scripts when I typed the command

On Jan 30, 2:05 am, Axel Bock <mr.axel.b...@gmail.com> wrote:
> you should not. are you IN c:\...\scripts when you type in
> "django-admin.py"? AFAIK windows adds the current directory always to the
> path.
>
> and it's AXEL ;)
>
> 2011/1/29 Panupat <panup...@gmail.com>
>
> > Hi Alex. Thank you for you suggestion.
>
> > It seems I can get the script to run if I type out the full path.
>
> > C:\Python27\Scripts\django-admin.py startprofect mysite
>
> > C:\Python27 is already added to my windows' PATH. Proably will need to
> > add C:\Python27\Scripts to it too.
>
> > On Jan 30, 1:44 am, Axel Bock <mr.axel.b...@gmail.com> wrote:
> > > hm ... my windows times are over quite a while, BUT ...
>
> > > 1) try associating the .py extension with the python commandline
> > > interpreter.
> > > 2) syntax error? send a screendump maybe, or your exact command line ...
> > it
> > > _should_ work without problems.
>
> > > can you execute other simple python scripts?
>
> > > cheers,
> > > axel.
>
> > > 2011/1/29 Panupat <panup...@gmail.com>
>
> > > > I'm kinda stuck and would greatly appreciate any help.
>
> > > > I followed these turorials and got Django to install. Was able to
> > > > import Django and print out the version correctly. I'm running
> > > > Apache2.2 on windows 7 with mod_wsgi
>
> > > >http://docs.djangoproject.com/en/1.2/intro/install/>
> > > > But moving forward to part 1, It says, cd to the directory and run the
> > > > command
> > > > django-admin.py startproject mysite
>
> > > > This is where I don't understand.
> > > > - running the command from cmd, it says django-admin.py is not
> > > > recognized as command.
> > > > - if I run python first, it says syntax error.
>
> > > > Am I missing something from the tutorial? Does the project need to be
> > > > in a particular folder in order for the .py file to be executable? Is
> > > > there anything else I need to add to windows other than adding C:
> > > > \Python27 to PATH?
>

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#6 Jan. 29, 2011 19:11:14

Andre T.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

need help following tutorial part 1


Quick and dirty solution:
python django-admin.py startproject mysite

or

Add C:\PathToYourDjangoInstall\Scripts\ to your PATH environment variable.
This can be done in one of two ways.

#1 (EASIER)
Open 'System Properties' (hit WindowsKey + PauseBreak, or right-click on My
Computer and select 'Properties').
Switch to the 'Advanced' tab, click on 'Environment Variables' on the bottom
of the dialog.
Find PATH on the 'System Variables' list, double-click.
append C:\PathToYourDjangoInstall\Scripts\ to the 'Variable Value'. Don't
forget to add a semi-colon.


#2 (BETTER)
Download and install virtualenv (http://pypi.python.org/pypi/virtualenv)
Follow instructions to create a virtual environment in, say,
C:\django\virtual\
Create a 'mydjango.bat' batch file anywhere in your computer that sets the
PATH for you according to that virtual environment.
Create a shortcut pointing to: %windir%\system32\CMD.EXE /K
"C:\SomePath\mydjango.bat"
Run it whenever you want to work within that environment.


I personally use a variation of #2.

Sincerely,
André Terra


On Sat, Jan 29, 2011 at 16:44, Axel Bock <mr.axel.b...@gmail.com> wrote:

> hm ... my windows times are over quite a while, BUT ...
>
> 1) try associating the .py extension with the python commandline
> interpreter.
> 2) syntax error? send a screendump maybe, or your exact command line ... it
> _should_ work without problems.
>
> can you execute other simple python scripts?
>
>
> cheers,
> axel.
>
>
>
>
> 2011/1/29 Panupat <panup...@gmail.com>
>
> I'm kinda stuck and would greatly appreciate any help.
>>
>> I followed these turorials and got Django to install. Was able to
>> import Django and print out the version correctly. I'm running
>> Apache2.2 on windows 7 with mod_wsgi
>>
>>http://docs.djangoproject.com/en/1.2/intro/install/>>
>> But moving forward to part 1, It says, cd to the directory and run the
>> command
>> django-admin.py startproject mysite
>>
>> This is where I don't understand.
>> - running the command from cmd, it says django-admin.py is not
>> recognized as command.
>> - if I run python first, it says syntax error.
>>
>> Am I missing something from the tutorial? Does the project need to be
>> in a particular folder in order for the .py file to be executable? Is
>> there anything else I need to add to windows other than adding C:
>> \Python27 to PATH?
>>
>> --
>> 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<django-users%2bunsubscr...@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<django-users%2bunsubscr...@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 athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 19th of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support