We are social media platforms where users share his experience, stay up-to-date and grow their knowledge.
You can chat with your friends and make new friends.

Basic Django commands:

Jan. 13, 2023

1 min read

We, who use django, we should have the proper knowledge of django commands. By these following commands, we can install django, install specific version of django, check which version's django is installed in our device etc.

  • To install Django Latest Version:

    pip install django
  • To install specific Django Version:

    Pip install django==3.9
  • To upgrade Django Version:

    pip install --upgrade django
  • To check Django Version: ⇒

    django-admin --version
  • To uninstall Django:

    pip uninstall django

To set custom name in admin site objects:

We have to edit on, when a class is declared, after that inside the class, we have to make a self function to return as string:

def __str__(self):
    if self.custom:
        return str(self.custom)
        return "Unnamed"    //Default is "None"
django web Thanks For reading

Add your response

Login Required