Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question