Django Project vs App

Vision secrets django

Table of Contents

There is a lot of confusion when newcomers try to understand Django definition of an ‘App’ . In this post we’ll examine the Three major concepts of Django architecture.

  1. Project
  2. Apps
  3. 3rd party packages

Project

A Django project is your entire application that you want to build and there is only ever one project and many ‘apps’. it consist of all your configuration files, setting files. lets look at the example.

Example : suppose we want to create a project let say quiz project and in this quiz project we need some functionality like user authentication, blog.

Installation of Django

Lets create the quiz project.

# command to create project
django-admin startproject quiz

we have created the project now lets add those functionalities what we have defined above. but for adding those functionalities to our project we need to create an apps . just like in WordPress we install the plugins whenever we want to add some functionalities to our website/project/application.

Apps

A Django App is like plugin for our project which provide with us particular functionality so that we can make our project more elegant. and for our quiz project we are going to create two apps blog and registration.

# command to create an app in Django

# blog app
python manage.py startapp blog

# registration app
python manage.py startapp registration

Note : In Django whenever we want to add some functionalities to our project we create an apps.

3rd Party Packages

3rd party package is a plain old Django application that has been designed to be pluggable into any existing project with the Python packaging tools. You can see a tutorial on this here. It takes just a few additional steps.

This is a case where we can see the power of separating out functionality into smaller apps. It’s far easier to share them either within a larger project, within a company, or to make public like a 3rd Party Package.

Conclusion

Django apps may seem like overkill when you’re starting out but they provide much needed structure and flexibility to any Django web application.

2 thoughts on “Django Project vs App”

  1. Pingback: Customizing (Colors) Django Admin Panel | Django Vision Secrets

  2. Pingback: Custom User Model In Django | Uncategorized Vision Secrets

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
Vision Secrets