Answer the question
In order to leave comments, you need to log in
How to create a bike in django?
I want to figure out how the admin panel and other applications are arranged out of the box, and in connection with this, questions arose
1) is it possible not to use solutions from the django box, that is, to create a bicycle
2) is it possible somewhere to peep how these solutions are implemented, for example, the admin panel to create it again )
3) I think if you answer questions 1 and 2, then it makes no sense, but still I’ll ask what algorithm for creating an admin panel from scratch based on django
* yes, I know about Flask, but I don’t want to learn a new framework yet, I want to understand django
Answer the question
In order to leave comments, you need to log in
1. It is possible, but not necessary
2. The code of all django is open, the admin code is also there, but you will not master it.
It is not clear why you need to cycle solutions out of the box, for starters, learn how to simply create sites using the capabilities of django.
It seems to me that people consistently do not understand why and who needs an admin panel in Django. Django is built around its own ORM. This abstraction layer allows you not to work with the database with pure SQL. The problem arises when (during development or operation) you want direct access to records in the database.
The admin panel is a way to organize such "direct" (quotes because it's still through the ORM) access to records. Plus, you can hang some tools on it that the developer would like to have at hand. Forcibly reset the user's password, delete a certain number of records, etc. Purely programming chips that are in demand in the development process.
The whole design revolves around the fact that the developers of the admin panel did not know what kind of database structure you would have. Therefore, there is a lot built on magic. But general solutions will never replace specialized ones.
If you need to give (selected) users access to some admin functions to manage the site - write an admin panel specifically for them.
No need to use django.contrib.admin for this, no need to modify or replace it . Admin Dzhangi separately - other flies separately.
Look at https://github.com/oscarmlage/django-cruds-adminlte for example... And the template is habitually admin and most of the typical operations are automated.
Search djangopackages.org for something. By the way, most of the Admin Interface section is either just skins that customize the look or is abandoned.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question