1 / 47

Web development django

We are one of the most reputed Training institutes in Ahmedabad, Pune & Navi Mumbai. We are providing, Live Project Training in All Programming Languages C, PHP, Java, Android, Python, Data Science, Software Testing, & Graphic Designing. We are Providing Training classes in with Live Projects. We have a team of professional Trainers, mentors, and industry experts who Continuously struggling to survey the current market and preparing India s youth to contribute to the growth of our country. After Training, We provide 100% assured job assistant after the training. Our Goal is your Career is our

Coding6
Download Presentation

Web development django

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Web framework What is a Web Framework? A web framework is a server-side application framework , that is designed to support the development of * dynamic websites * web applications * web services and * resources

  2. More about web Framework A Python web framework is a code library, • that makes the life of a web application developer much easier • • for building flexible, scalable and maintainable web applications. • A web development framework is a set of resources and tools for software developers to build and manage web applications, web services and websites.

  3. Why Django ? • Tight Integration between Components • Object-Relational Mapper (ORM) • Automatic Administration Interface Multi-Lingual Support

  4. Introduction to Django framework. There are following frameworks in Python. Django • CherryPy • pylons • Flask • Bottle • Pyramid • Cubic Web • GAE framework •

  5. What is Django Framework ? • Django is basically a high-level Python web application framework that enables the rapid development of web applications. • It achieves so with pragmatic, much cleaner design in comparison of other frameworks. • Django takes care of the difficult stuff so that you can concentrate on building your web applications.

  6. MVT Pattern • How does Django Work? Django follows the MVT design pattern (Model View Template). • • MVT stands for Model – View – Template. • MVT architecture is the software design pattern used by the Django web framework.

  7. Model • In Django, the data is delivered as an Object Relational Mapping (ORM) • which is a technique designed to make it easier to work with databases. • Django, with ORM, makes it easier to communicate with the database, without having to write complex SQL statements.

  8. View • A view is a function or method that takes • http requests as arguments • imports the relevant model(s) • and finds out what data to send to the template • and returns the final result. • The views are usually located in a file called views.py.

  9. Templates • A template is a file where you describe how the result should be represented. • Templates are often .html files, with HTML code describing the layout of a web page. but it can also be in other file formats to present other results, but here we will concentrate on .html files. • URLs • When a user requests a URL, Django decides which view it will send it to. • This is done in a file called urls.py.

  10. Installation • Django can be easily install using python's package manager. • before installation of django you must have python and pip. • first open the terminal and execute the following commands for installation. • pip install django

  11. Project • Create a project in django • open the terminal and navigate a folder in your system where you want to create a project. • Django-admin startproject djangoProject

  12. this command will create a project named "djangoProject" in your folder. • • and here is your first django project.

  13. Project • creating Home page using django framework. • open the terminal and navigate a folder in your system where you want to create a project. • django-admin startproject HomeProject

  14. • cd HomeProject • Create app of our project – python manage.py startapp myapp – code . – it will open the project in coding app in your system.

  15. Application Register

  16. • create a folder named "Templates" in Application. • After creating Templates create a new file named "home.html".

  17. • After creating a file make their view in views.py.

  18. • create a url for http response.

  19. • Then run your project using this commands • Open new terminal – python manage.py runserver – follow the link.

  20. And here is your project

  21. Creating a webApp

  22. • Creating navbar of webapp

  23. • Code for navbar

  24. • Adding data in web app using django models – Create a model in floder named “models.py”

  25. • Model Migrations – Open new terminal and execute the following commands – Python manage.py makemigrations

  26. • - python manage.py migrate

  27. Model Registration • Open a folder named “admin.py” in application – Import the created Model in admin.py.

  28. – Register the model

  29. • Import the model in views.py

  30. • Adding content using cards

  31. • Defined code for image & card

  32. Cards

  33. • Adding content

  34. • Footer for webapp

  35. • Creating footer for project

  36. Admin-panel in Django • Creating admin panel of webapp – Open new terminal and follow the given commands – Python manage.py createsuperuser

  37. Admin panel

  38. • Added data in panel

  39. • Adding dynamic data to web using MVT architecture.

  40. • Creating template for Page

  41. • Create html file in folder named “Templates” in application – And follow the code

  42. • Creating a view for template – Click to python file named views.py – And create the view for template

  43. • Getting URL for specific created http response(view) – Click to python file named Urls.py – Add views from application – And give a path

  44. Static • Adding Static files in web app – Click to settings.py and follow the defined code

  45. • Then move to urls.py and follow the steps for static image

  46. 304 Aditya Arcade, Nr. Choice Restaurant CG Road Ahmedabad Contact 9537344018 www.codingcloudinstitute.com Thank you

More Related