7
7
7a-6662020-01-03 12:44:14
Django
7a-666, 2020-01-03 12:44:14

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

3 answer(s)
D
Dr. Bacon, 2020-01-03
@7a-666

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.

D
Dmitry Sviridov, 2020-01-03
@dimuska139

  1. Can. I don't use Django admin, I made my admin with React
  2. Find an example of any application on React on Github and in the same place an example of any application with django-rest-framework
  3. In a good way, you need to use the standard Django admin panel if your site is on Django (because it saves a lot of time), but if you decide to make your own (for example, on React), then you write the API using django-rest-framework and write the admin panel itself on React, which will interact with this API.

A
Alexey Guest007, 2020-01-03
@Guest007

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 question

Ask a Question

731 491 924 answers to any question