Tech C**P
15 subscribers
161 photos
9 videos
59 files
304 links
مدرس و برنامه نویس پایتون و لینوکس @alirezastack
Download Telegram
Django has an admin panel that does lots of tedious works that if you had to create yourself, it wouldn't be an easy t
ask. In this part we try to build the admin panel from ground up.

First of all an admin panel needs an admin user. So create one first:
$ python manage.py createsuperuser
Username (leave blank to use 'fc'): alireza
Email address: a***@***.com
Password:
Password (again):
Superuser created successfully.


Ok after creating the admin user, run the developement server:
$ python manage.py runserver


Now point your URL to http://127.0.0.1:8000/admin/. You should see the login page in the next post. Login and see th
e administrator page of Django.

#python #django #admin #dashboard #createsuperuser #django_part6
Tech C**P
Django has an admin panel that does lots of tedious works that if you had to create yourself, it wouldn't be an easy t ask. In this part we try to build the admin panel from ground up. First of all an admin panel needs an admin user. So create one first:…
Django has an admin panel that does lots of tedious works that if you had to create yourself, it wouldn't be an easy task. In this part we try to build the admin panel from ground up.

First of all an admin panel needs an admin user. So create one first:
$ python manage.py createsuperuser
Username (leave blank to use 'fc'): alireza
Email address: a***@***.com
Password:
Password (again):
Superuser created successfully.


Ok after creating the admin user, run the developement server:
$ python manage.py runserver


Now point your URL to http://127.0.0.1:8000/admin/. You should see the login page in the next post. Login and see the administrator page of Django.

#python #django #admin #dashboard #createsuperuser #django_part6


Now to see polls in admin page, you need to register you models. open polls/admin.py:
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.contrib import admin

from .models import Question
admin.site.register(Question)


Last 2 lines are added to register the Question model as picture below: