Posts Tagged with 'Django'

Python | Print String N times >>> s = 'Python' >>> n = 5 >>> print(s * n) PythonPythonPythonPythonPython  

Last updated 2 years, 3 months ago | 856 views

Tags:- Python Django

Python | Return multiple values from functions >>> def A(): return 2, 3, 4 >>> a, b, c = A() >>> print(a, b, c) 2 3 4  

Last updated 2 years, 3 months ago | 768 views

Tags:- Python Django

Python | Join all items of a list to convert into a single string >>> x = ["Python", "Online", "Training"] >>> print(" ".join(x)) Python Online Training  

Last updated 2 years, 3 months ago | 696 views

Tags:- Python Django

Python | Reversing a String >>> x = 'PythonWorld' >>> print(x[: : -1]) dlroWnohtyP  

Last updated 2 years, 3 months ago | 756 views

Tags:- Python Django

 Python | In-place swapping of two numbers >>> a, b = 10, 20 >>> print(a, b) 10 20 >>> a, b = b, a >>> print(a, b) 20 10  

Last updated 2 years, 3 months ago | 769 views

Tags:- Python Django

In Django, static files are the files that serve the purpose of additional purposes such as images, CSS, or JavaScript files. Static files managed by “django.contrib.staticfiles”. There are three main things to  set up static …

Last updated 2 years, 3 months ago | 737 views

Tags:- Django

Compared to other frameworks, Django offers more code reusability. As Django is a combination of apps, copying those apps from one directory to another with some tweaks to the settings.py file won't need much time …

Last updated 2 years, 3 months ago | 927 views

Tags:- Django

Django follows a Model-View -Template (MVT) architecture which is a variant of the MVC architecture.  Model: Logical data structure behind the entire app and signified by a database. A model is used in Django to …

Last updated 2 years, 3 months ago | 858 views

Tags:- Django

Django | Set up Database We need to edit the setting.py file present in the project, which contains all the settings related to the project. By default Django comes with an SQLite database; The  SQLite database …

Last updated 2 years, 3 months ago | 839 views

Tags:- Django

List the inheritance styles in Django There are three possible inheritance styles in Django, and they are: Abstract Base Classes: This is used when we want to make the parent class hold the information which …

Last updated 2 years, 3 months ago | 857 views

Tags:- Django

Django | Set up environment variables in Django   1. Install Django Environ In your terminal, inside the project directory, type: $ pip install django-environ 2. Import environ in settings.py import environ 3. Initialise environ …

Last updated 2 years, 4 months ago | 928 views

Tags:- Django

Some of the more well-known companies that make use of Django are:’ Instagram Mozilla Firefox Reddit YouTube Disqus Bitbucket Spotify NASA Pinterest Eventbrite, etc.

Last updated 2 years, 6 months ago | 1040 views

Tags:- Django

Django | Features  Features available in Django are Optimized for SEO Extremely fast A loaded framework that features authentications, content administrations and RSS feeds Exceptionally scalable to meet the heaviest traffic demand Highly secure Versatility, …

Last updated 2 years, 6 months ago | 887 views

Tags:- Django

Django | Request/Response Cycle Whenever a request is received by the Django server. The Request is processed by various middlewares and is passed to the URL Router. Then, the server looks for a matching URL in the urlpatterns …

Last updated 2 years, 6 months ago | 1005 views

Tags:- Django

Django | Meta Class A Meta class is simply an inner class that provides metadata about the outer class in Django. It defines such things as available permissions, associated database table name, singular and plural versions …

Last updated 2 years, 6 months ago | 1027 views

Tags:- Django