Introduction to Django (GDays 2014)

25
Introduction to Django www.thoughtworks.com

description

 

Transcript of Introduction to Django (GDays 2014)

  • 1. Introduction to Django www.thoughtworks.com

2. Who Are We? Edem Kumodzi, Consultant! ThoughtWorks! @edemkumodzi Raindolf Owusu, App Developer! ThoughtWorks! @raindolf 3. What is Django? A high-level open source Web development framework Written in Python, for Python Developers Eases the pain of building dynamic websites Abstracts common problems of Web development Provides shortcuts for frequent programming tasks 4. Why should I learn Django? 5. Popular sites & apps built with Django 6. Features Built-in ORM (Object Relational Mapper) Simple but powerful URL system Built-in Template System l10n (Internationalisation) Cache System Built-in Authentication System Built-in Web Server (For Development) Automatic Admin Interface 7. DEMO! www.raindolf.com 8. Practical Session 9. Pre-requisites Python Django Sublime Text Terminal A Laptop :-) 10. Windows: Download Python at http:// www.python.org/download/releases/3.3.4/ Linux & Mac (Python is preinstalled) 11. Install PIP Linux & Mac: Type this in your terminal easy_install pip Windows: Get a standalone version of pip at http:// www.pip-installer.org/en/latest/installing.html#using- the-installer 12. Install Django: pip install Django Check installation: python => import django => django.VERSION 13. Creating your rst project 14. Creating a project What startproject created ? Development server python manage.py runserver 15. Whats Next? Go to urls.py Create a le called views.py 16. Creating APP 17. Model settings.py Terminal 18. Playing with the API 19. admin.py python manage.py runserver http://localhost:8000/admin 20. ! ! https://www.djangoproject.com/ https://www.udacity.com/course/viewer#!/c- cs101/l-48299949 References 21. Thank You! ! Questions? www.thoughtworks.com