Z
Z
zelsky2015-07-01 10:38:08
Django
zelsky, 2015-07-01 10:38:08

Copying from table to Django table?

I thought to implement "offer news" as in contact in my blog.
There are two identical models, and you need to copy from one table to another when you click on the button in the admin panel. (The offer of news in the admin panel in the form of a table) Here you need to add a button for copying from table to table. The button will be as a separate field next to each entry for quick transfer.
I'm not asking you to do it for me. I ask to advise where to dig?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Valery Ryaboshapko, 2015-07-01
@zelsky

I propose not to produce entities, but to add the status field to the “news” object and make “proposed” one of the options for acceptable statuses. Accordingly, the acceptance of news is simply a change in status, a change in one field in the database.

Z
zelsky, 2015-07-01
@zelsky

sim3x @sim3x
BlastPy:
just a checkbox in the admin panel
in the model
is_checked = models.BooleanField(default=False)
the user posted the news
admin checked or not
and in the view we filter the news with is_checked=True

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question