Re: Brief tutorial to get a django dev server up.

2010-01-28 Thread Shawn Milochik
Try typing 'python' (or the full path to your Python executable) before 
django-admin.py.

I'm guessing you're using Windows, and it's associating .py files with a text 
editor instead of the Python interpreter.

Shawn

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Brief tutorial to get a django dev server up.

2010-01-28 Thread Aly
Hello,
I've just instaled Django with this tutorial
http://i.justrealized.com/2008/04/08/how-to-install-python-and-django-in-windows-vista/.

My problem is when I execute django-admin.py startproject mysite , the
folder is not created, and the file django-admin.py is opened. What is
the problem?

I really need help, please.

Thanks in advance





On 11 ene, 22:54, spike  wrote:
> This is just a brief tutorial I wrote for myself without the intention
> of releasing, but I figure if I can help just 1 person get started,
> then why keep it to myself.
>
> Again, not to be passed off as anything more then notes I wrote one
> afternoon for my own understanding on a Windows machine.
>
> Hope this helps someone. Comments ARE welcome.
>
> ---
> When creating a project you’ll want to link it to a database. So
> we'll, install Python, then Django, then the database. Create the
> project, setup the database, then launch the development server. For
> ease we’ll go with SQLite.
>
> Django requires Python 2.3 or higher.
>
> Install Python. When the installation is complete, add Python to the
> system path so that it can be accessed from the command prompt. To do
> this access “Control Panel > System > Advanced > Environment
> Variables”. Select the “path” from the “System Variables” section and
> append the Python installation directory.
>
> Download and extract Django to the “C:\”. Then in the command prompt,
> “cd” to the extracted directory.
>
> To install Django run “(Django Directory) python setup.py install” or
> to manually install, copy the Django folder to the Lib > site-packages
> directory inside the Python directory.
>
> The last step to install, copydjango-admin.py from “(Django
> Directory) > django > bin” to either c:\ or the Python directory.
> After completed you will want to test the installation by running “c:
> \>pythondjango-admin.py --version”.
>
> Django supports many database systems like MySQL, PostgreSQL, and
> SQLite. Django has a database layer, which will interact with any
> supported & selected database.
>
> Python 2.5 or later comes with the SQLite module named, “sqlite3”.
> SQLite stores the database in a single file.
> To use MySQL you must install the MySQL driver, which is titled
> “MySQLdb”.
>
> Django comes with its own preconfigured webserver but does support
> Apache and Lighttpd.
>
> Now, to create a new project, run “django-admin.pystartproject
> (project title)”.
> This command will create a folder named after the project title you
> entered. Inside this folder will be 4 files: __init__.py, manage.py,
> settings.py and urls.py. The file functions are as follows:
> i.      __init__.py: This file tells python to treat this folder as a
> package.
> ii.     manage.py: This is the project admin file, similar todjango-admin.py. 
> So similar in fact they share the same code.
> iii.    settings.py: The main configuration file. Includes your database
> settings, site language and Django features as well as more advanced
> functions.
> iv.     urls.py: Configuration file. Maps the URLs with the Python
> functions that handle them.
>
> Open settings.py and set the database with “DATABASE_ENGINE”. For
> SQLite enter “sqlite3”.
>
> Next, name the database with “DATABASE_NAME”. Name it after your
> project with “db” at the end. Example: “bookmarksdb”. Now save your
> file.
>
> Almost done. Cd into the project directory then tell Django to create
> tables for the database with the command “python manage.py syncdb”.
>
> Create your Superuser account. This process will create the file
> titled after the database name. This file holds the application data.
>
> Now run the development server with “python manage.py runserver”. You
> can also change the default port from 8000 by appending your desired
> port to the command.
>
> Open your browser tohttp://127.0.0.1:8000/
>
> Done.
> ---

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Brief tutorial to get a django dev server up.

2010-01-11 Thread Ovnicraft
2010/1/11 spike 

> Wow. Just WOW.
>
> I'm sorry to say this but, your audacity is embarrassing.
>
> I will continue to post here.
>

Would be better if you talk about you problems, experience, etc with django
**here** and tutorials or whatever in your blog :).

Cristian,

>
> Thank you.
>
> On Jan 11, 3:38 pm, Daniel Roseman  wrote:
> > On Jan 11, 10:27 pm, spike  wrote:
> >
> >
> > If you're planning on making a series of posts, can I beg you to
> > please not post them here, but to get a blog and put them there? It's
> > great that you have written this stuff, but Google Groups is not a
> > great place for keeping things for posterity. You can always post a
> > link here back to the new blog.
> >
> > --
> > DR.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@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.
>
>
>
>


-- 
Cristian Salamea
CEO GnuThink Software Labs
Software Libre / Open Source
(+593-8) 4-36-44-48
-- 

You received this message because you are subscribed to the Google Groups "Django users" group.

To post to this group, send email to django-us...@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: Brief tutorial to get a django dev server up.

2010-01-11 Thread spike
Wow. Just WOW.

I'm sorry to say this but, your audacity is embarrassing.

I will continue to post here.

Thank you.

On Jan 11, 3:38 pm, Daniel Roseman  wrote:
> On Jan 11, 10:27 pm, spike  wrote:
>
>
> If you're planning on making a series of posts, can I beg you to
> please not post them here, but to get a blog and put them there? It's
> great that you have written this stuff, but Google Groups is not a
> great place for keeping things for posterity. You can always post a
> link here back to the new blog.
>
> --
> DR.
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Brief tutorial to get a django dev server up.

2010-01-11 Thread spike
Wow.

On Jan 11, 3:38 pm, Daniel Roseman  wrote:
> On Jan 11, 10:27 pm, spike  wrote:
>
>
> If you're planning on making a series of posts, can I beg you to
> please not post them here, but to get a blog and put them there? It's
> great that you have written this stuff, but Google Groups is not a
> great place for keeping things for posterity. You can always post a
> link here back to the new blog.
>
> --
> DR.
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Brief tutorial to get a django dev server up.

2010-01-11 Thread Daniel Roseman
On Jan 11, 10:27 pm, spike  wrote:
> Good points. Anyone looking for information of this nature after
> reading this thread is sure to find information that helps. I write
> this as a Django novice, hoping that the process of writing tutorials
> for myself as I learn and submitting them to the community for some
> amount of review will push me further, faster.
>
> Thank you for the comments, hopefully you'll read my next post
> tomorrow and have more good info.

If you're planning on making a series of posts, can I beg you to
please not post them here, but to get a blog and put them there? It's
great that you have written this stuff, but Google Groups is not a
great place for keeping things for posterity. You can always post a
link here back to the new blog.

--
DR.
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Brief tutorial to get a django dev server up.

2010-01-11 Thread spike
Good points. Anyone looking for information of this nature after
reading this thread is sure to find information that helps. I write
this as a Django novice, hoping that the process of writing tutorials
for myself as I learn and submitting them to the community for some
amount of review will push me further, faster.

Thank you for the comments, hopefully you'll read my next post
tomorrow and have more good info.

On Jan 11, 2:11 pm, Shawn Milochik  wrote:
> A lot of this tutorial duplicates information in the official Django 
> tutorial. However, the official tutorial doesn't do any special hand-holding 
> for Windows users. Perhaps it would be helpful if you referred people to the 
> Django site for the tutorial, and gave all the Windows-specific stuff you've 
> had to figure out on your own to help out other Windows 
> users.http://docs.djangoproject.com/en/dev/intro/tutorial01/
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Brief tutorial to get a django dev server up.

2010-01-11 Thread Shawn Milochik
Since you asked for comments:

The Django core developers are looking to discontinue Python 2.3 support soon, 
so it's a good idea to recommend 2.4 as the minimum, or state which version of 
Django requires Python 2.3 or higher.

Just a personal preference, but I wouldn't recommend downloading and 
decompressing software to the root of the OS partition. It just clutters things 
up.

Instead of copying django-admin.py, add its folder to the PATH, or just specify 
the full path when running it, since you'll only do that very rarely.

You mention that Django comes with its own Web server in addition to supporting 
Apache and others. Technically, this is true, but it's very important to note 
that the built-in server is for development purposes only, because (among other 
reasons) it has not been tested or designed for security. It was never meant 
for production use, just development.

A lot of this tutorial duplicates information in the official Django tutorial. 
However, the official tutorial doesn't do any special hand-holding for Windows 
users. Perhaps it would be helpful if you referred people to the Django site 
for the tutorial, and gave all the Windows-specific stuff you've had to figure 
out on your own to help out other Windows users.
http://docs.djangoproject.com/en/dev/intro/tutorial01/

Shawn


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.