Making a web application in django (part 1)

hello every one. i hope you have installed django. now we are going to make a web application using django.

1. make some space:

to create a web application, you need some space. make a directory of your choice. (i made /home/faysal/web-app/ for my application) now open command prompt (or terminal) and go to your project folder.

2. creating project:

i hope you installed django properly, or the following will not work.
when you are inside your project folder via command prompt, type, startproject django1

this will create a sub directory under your project folder called django1, go and spend some time to see what inside that directory. now there are some files –

* An empty file that tells Python that this directory should be considered a Python package. (Read more about packages in the official Python docs if you’re a Python beginner.)
* A command-line utility that lets you interact with this Django project in various ways. You can read all the details about in and
* Settings/configuration for this Django project. Django settings will tell you all about how settings work.
* The URL declarations for this Django project; a “table of contents” of your Django-powered site. You can read more about URLs in URL dispatcher.

3. lets make the server running:

if all are ok….. then inside the directory, type

python runserver

now open your web browser and go to the following url:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s