Pages

5/22/2016

creating python django project

If you installed and configured python django you can create django project .

for that create a folder any where in you system and open you terminal navigate to that folder and type the django command django-admin startproject projectname  for example django-admin startproject firstdjangoproject     


This command will create a folder firstdjangoproject        , navigate inside to the project folder . You can see file structure of django project

I will explain each of this files in detail for now lets run the application

for running the application need to type this command in your terminal

python manage.py runserver  

Ignore the migration exception , we can see the application running at localhost port 8000, 8000 is the default port . Now open your web browser and type address http://127.0.0.1:8000 and you can see

if you see this your django application is up and running and you are good to go.
press ctrl+c keys to stop the server.

No comments:

Post a Comment

widget

installing perl dancer in ubuntu

For installing perl dancer you need curl utility for installing curl ,   sudo apt-get install curl Now we can install Perl-Dancer by thi...