How to create a basic website with Python on Django

  • Published on

  • View

  • Download

Embed Size (px)


<ul><li>1.HOW TO CREATE A BASIC WEBSITE WITH PYTHON ON DJANGO </li></ul> <p>2. Python? 3. That was a joke! 4. Ideology behind name: A television series Monty Python's Flying Circus 5. Python; Open source Interpreted Interactive Object Oriented Clear syntax High-level programming language Batteries included 6. Django? 7. High-level Python Web Framework MTV instead of MVC Built-in ORM (Object relational Mapper) Simple but powerful URL Patterns Built-in Authentication System Automatic Admin Interface 8. No more spaghetti code! 9. Python ( pip ( 10. Lets start to work First; $pip install virtualenv virtualenv devfestwoman Activate virtual environment $pip freeze $pip install Django 11. Creating a project $ startproject devfestwoman Lets look at what startproject created: devfestwoman/ devfestwoman/ 12. $python runserver Browse 13. Now, shoot a glance to devfestwoman/ 14. We need to create the tables in the database before we can use them $python syncdb 15. Working with applications $python startapp core 16. Lets look at what startapp created: core/ 17. Creating models 18. add the app to $python syncdb 19. Enter the admin site Browse localhost:8000/admin Register your models on 20. Write the first view declare a URLconf Write your view 21. Showing your data First, create a directory called templates in your core directory and write your first template. 22. $python runserver Browse 23. Thank you for your attendance 24. Me on web Linkedin; trk=nav_responsive_tab_profile Github Armaan Ersz 03.05.2014 </p>