Django Admin Interface in Hindi – Django In Hindi

Python Django

Django Admin Interface in Hindi – Django In Hindi – Admin Interface Yani Ki Admin Panel Har Ek Web Project Ka Important Part Hota Hai, Isliye Aaj Django Me Admin Interface Ko Kaise Create Karte Hai, Ye Sab Dekhne Wale Hai |

Previous Post Me Hamne Django App Ko Create Kiya Tha, Is Post Me Ham Admin Interface Ko Create Karte Hai |

Django Admin Interface in Hindi

Waise Agar Koi Or Programming Me Dekha Jaye To Khud Hi Admin Panel Create Karna Padta Hai, Jaise Ki PHP Core Me |

And Django Ki Baat Kare To Admin Interface Create Karne Ke Liye To Django automatically generates Karta Hai admin UI Ko Or Hame Kuch Uske Liye Kuch cmd line Run Karni Padthi Hai |

Also Read – Django Introduction

Creating an Admin Interface In Django In Hindi

Django Me Admin Interface Depends Hota Hai django.countrib Module Par Or Django Admin Interface Ko Create Karne Se Pahle INSTALLED_APPS and MIDDLEWARE_CLASSES Hona Chahiye myproject/settings.py file me.

For INSTALLED_APPS make sure you have −

INSTALLED_APPS = (
   'django.contrib.admin',
   'django.contrib.auth',
   'django.contrib.contenttypes',
   'django.contrib.sessions',
   'django.contrib.messages',
   'django.contrib.staticfiles',
   'myapp',
)

For MIDDLEWARE_CLASSES −

MIDDLEWARE_CLASSES = (
   'django.contrib.sessions.middleware.SessionMiddleware',
   'django.middleware.common.CommonMiddleware',
   'django.middleware.csrf.CsrfViewMiddleware',
   'django.contrib.auth.middleware.AuthenticationMiddleware',
   'django.contrib.messages.middleware.MessageMiddleware',
   'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

Admin Interface Access Karne Se Pahle Aapko initiate Karna Padega Databse Me, Uske Liye Aap Niche cmd prompt me likh kar Enter Kar Sakte Hai |

$ python manage.py migrate

Ye Cmd Run Hoti Hi, Database Me admin interface ki tables ko Create Kar Dega |

Also Read – Dupolx Project In Django

Ab Abhi Tak Keval Aapne Admin Interface Create Kiya, Lekin Aapne Admin Interface Me Login Karne Ke Liye user And Password Create Nhi Kiya Hai, Uske User And Password Create Karne Ke LIye Aap Niche Diye Cmd Ko Run Kare |

$ python manage.py createsuperuser

Admin Interface Login Karne Ke Liye Hame myproject/urls.py me URL Ko Define Karna Padta Hai, Waise Default http://127.0.0.1:8000/admin Hi Aata Hai |

from django.contrib import admin
from django.urls import path

urlpatterns = [
    path('admin/', admin.site.urls),
]

Ye Sab Karne Ke Bad Aap Niche Diye Cmd Line Ko Likhar Enter Press Karna Hai |

$ python manage.py runserver

Isko Run Karne Ke Bad Aap Django Ka Server Istemal Kar Sakte Hai, Django Khud Ka Server Provide Karta Hai |

Validating models...

0 errors found
September 28, 2018 - 11:41:50
Django version 1.6.11, using settings 'myproject.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

Aap Dekh Sakte Hai Ki Hamara Project Run Ho Chuka Hai Aap Iska Output Niche Dekh Sakte Hai |

Output:

Also Read – IPLogger Website In Django

Leave a Reply

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