Your SlideShare is downloading. ×
Getting started with Django on Windows
Getting started with Django on Windows
Getting started with Django on Windows
Getting started with Django on Windows
Getting started with Django on Windows
Getting started with Django on Windows
Getting started with Django on Windows
Getting started with Django on Windows
Getting started with Django on Windows
Getting started with Django on Windows
Getting started with Django on Windows
Getting started with Django on Windows
Getting started with Django on Windows
Getting started with Django on Windows
Getting started with Django on Windows
Getting started with Django on Windows
Getting started with Django on Windows
Getting started with Django on Windows
Getting started with Django on Windows
Getting started with Django on Windows
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Getting started with Django on Windows

747

Published on

Django Book Ch2: Getting started - Windows version

Django Book Ch2: Getting started - Windows version

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
747
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Getting started with Djangoon WindowsMichelle Leu (flywindy)2013/05/28
  • 2. 2Agenda Before install Django1. (Optional) Install PowerShell (Download)2. Install Python3. (Optional) Install pip Install Django Run server
  • 3. 3Unlike most Unix systems and services,Windows does not require Python nativelyand thus does not pre-install a version ofPython.Install Python
  • 4. 4Step 1: Download Python The core Django framework works with anyPython version from 2.5 to 2.7, inclusive.1. Go to Python’s Download page.2. Click the link to download installer, it’s depends onyour windows system is 32-bit or 64-bit.3. The latest version: 2.7.532-bit64-bit
  • 5. 5Step 2: Run installer1. Click the file you downloaded, and run theinstaller.2. Select a directory for Python, for example Ichoose C disk.
  • 6. 6Step 3: Setup pathC:Python27;
  • 7. 7Step 4: Try it! “Hello world”1. Open “Python (command line)”, or open cmd(powershell) and input “python”2. Type print “Hello world”3. If output “Hello world”, it works.
  • 8. 8pip works on Unix/Linux, OS X, andWindows.(Optional) Install pip
  • 9. 9Install pip Option 11. Download the get-pip.py script2. Run it using Python C:> python get-pip.py Option 21. Download and install it.
  • 10. 10Requirements files1. Create a requirements file something like:2. If you save this in pip-requirements.txt, thenyou can type this on you commend line: pip install -r pip-requirements.txtDjango==1.4.5……
  • 11. 11If you are upgrading your installation ofDjango from a previous version, you willneed to uninstall the old Django versionbefore installing the new version.Install Django
  • 12. 12Install Django Installing an official release with pip $ pip install django (or use requirements file.) Installing an official release manually (ex:version 1.4.3)1. Go to Django’s download page.
  • 13. 13Install Django2. Click “Django-1.4.3.tar.gz” to download.3. Unzip this file to get the folder called “Django-1.4.3”.4. Open your commend line, cd into the folder,and input “python setup.py install” to installsetup.py, and you will see it’s installing now!
  • 14. 14Step 3: Try it!1. In cmd or powershell, input “python” then youcan open Python’s command line.2. Input “import django”, and “django.VERSION”,you can see the version, that means djangoalready installed.Version: 1.4.5
  • 15. 15Step 4: setup path1. Go to “Environment Variables” again, edit“Path” variable, add value“;C:Python27Scripts”, click “OK” to save.2. Test it: open cmd(powershell), input “django-admin.py” then you will see some options, it’sworks.
  • 16. 16Create new django project
  • 17. 17Step 1: create project We use “django-admin.py startproject[projectname]” to create project, for examplethe project name is “mysite”.1. Open cmd(powershell), go to the folder thatyou want to put project, input “django-admin.py startproject mysite” ,then you cansee the new project already in your folder.
  • 18. 18Step 2: run server1. In your project, input “python manage.pyrunserver”, if see “Development server isrunning at http://127.0.0.1:8000/”,then go tothe link, you can see “It worked!”.
  • 19. 19Reference Using Python on Windows The Django Book Django doc Unofficial Windows Binaries for PythonExtension Packages (ex: pip or PIL…) Pip requirements files
  • 20. Thanks for your listening :)

×