U
U
Underground27132020-02-29 23:25:20
Django
Underground2713, 2020-02-29 23:25:20

How in Django to restrict access to the user for some time?

The question is how it is possible, using Django, to set access to pages to the user for a while.
That is, a specific user1 set access for 1 month. And then after the expiration date, either continue access or prohibit viewing some pages.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Mamonov, 2020-02-29
@Underground2713

As an option - make a table in the database (model) with the fields: user_id, page_id
, can_access_till (the date until which the user has access to this page)
Well, obsolete entries from this table can be deleted by cron, say, once a day, at night.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question