10+ Common Django Terms

Django is one of the most popular Python frameworks used for web development. It’s a free and open-source web framework that helps you build complex, robust, and powerful web applications quickly. Django has an active developer community which means there are always new features being added to it. This blog post will help you learn important Django terms so your app can be as cool as possible!

  • Framework: A framework consists list of reuseable modules and defines a structure for applications. Django is a web framework that helps developers build Python applications.
  • Creating Application: Django provides everything needed to start building an application. To create your first project, open up the terminal and type `django-admin startproject mysite`. This will give you all of the default files for your app like models, views, templates, etc.
  • Apps: A Django insllation can host multiple apps. Django is an MVC framework and each part of the app has a default name.
  • Views: The views are what create the HTML for your app. They can be customized to fit any design needs that you might have like a blog or contact form.
  • Model: A model is how Django stores information on the database level – their equivalent of tables in SQL databases. Models define attributes which then map to columns on your table structure (aka schema).
  • Migrations: When creating models, sometimes there are changes in your database tables which need to be updated after changing model definitions. This can typically be done using SQL commands but with migrations it’s done automatically by typing `python manage.py makemigrations` into terminal and then running `python manage.py migrate`.
  • Creating Superuser: To set up a Django project, you’ll need to create an administrative user account. This can be done by typing `python manage.py createsuperuser` into the terminal
  • Templates: Templates are HTML files with some bits of code that allow them to interact with data from your app and display it in the browser. Templates make it easy to build pages without having to write too much code by hand such as looping through data in a list of items, displaying buttons and icons, etc.
  • URL dispatcher: When someone navigates their way through your site’s pages, URL dispatches determine which view function will be called for each page or section on the website. If they’re requesting something like /blog/, then blog_post_view() is called but if they request something like /about/, about_page() would be run instead. The most common format used for URLs in Django is `/path_to_view()`, which will be called when someone navigates to that particular URL.
  • Forms: A form in Django, also known as a “form class,” can do more than just create input boxes and text areas. Forms are used for web forms (like login forms) but they’re also heavily used by Django’s admin interface.
  • QuerySets: A QuerySet is a list of objects. You can use them to filter and order data from the database, read it.

Leave a Comment

Your email address will not be published.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.