Z
Z
z0rgoyok2015-04-05 23:15:01
Django
z0rgoyok, 2015-04-05 23:15:01

How to add import to django admin?

There is a django-admin panel, models, everything is as it should be. I need to add imports from another site (parsing), saving data to my model objects. I want to see all this in the admin panel by clicking the "Import" button, with updated progress. Where to dig?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Guest007, 2015-04-06
@z0rgoyok

There is some confusion.
1) You write a parser that parses another site and enters everything into your database in accordance with the models
2) Attach a button to the admin panel to call it. To taste, you can add a call with the URLs of the marked sites.
Homework with an asterisk: queue it all up at Celery.
Profit!
If the first item is already working, then look for the second item according to the words django admin actions. For example, here: djbook.ru/rel1.7/ref/contrib/admin/actions.html Well, the decorations of the admin panel such as the progress bar - Google really helps.

U
un1t, 2015-04-06
@un1t

You can use something like django-admin-tools
or just override the admin template yourself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question