Coder Social home page Coder Social logo

django_tutorial's Introduction

Django Tutorial to Learn

Tutorial followed from Django documentation and Tango with Django Book.

Practice repository with basic commands to work with Django Framework

Tutorial followed from tangowithdjango

Steps followed while working with this project:

  1. install virtual environment and enable it
  2. install Django
  3. install other required libraries inside the venv
  4. start new django project
  5. add a new app to the project
  6. Create a view
  7. Create url mappings
  8. Add templates to views
  9. Add static files to HTML
  10. Setup media dir
  11. Creating Models
  12. Creating and migrating the databases
    • Setup Database and Create Superuser
    • Creating / Updating Models / Tables
  13. Run population script for the databases created
  14. Import models in views and create views for data to be returned to tempate
  15. Display data in template from context object in view
  16. Learnt about slugify to get clean urls.

There are five main steps that you must undertake to create a data driven webpage in Django:

  • First, import the models you wish to use into your application’s views.py file.
  • Within the view you wish to use, query the model to get the data you want to present.
  • Pass the results from your model into the template’s context.
  • Setup your template to present the data to the user in whatever way you wish.
  • If you have not done so already, map a URL to your view.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.