Pageview restrictions in Django-cms

I was just starting to use django-cms to create a website, and I was generally impressed that you can make windows with it.

However, I want to restrict the viewing of certain pages so that only registered users with a specific attribute or credential can view restricted pages.

The way I intend to continue is as follows:

  • Introduce a credential system (with an expiration date) for users - is there a package that already exists for this, or do I need to write my own?
  • Specify the page category attribute for all blog pages.
  • Provide a mapping mechanism from the page category to the credentials required to view the page
  • Insert logic to verify that the current user has the required credentials to view the requested page before displaying the page (if the user has the required credentials) or directing the user to another page if the user does not have the required credentials.

My question is twofold:

A. Is the decomposition problem described above a good way to implement the solution - or is it the best way that involves using existing packages without reusing the wheel (if so, which packages to use)?

B. , -, , , , .. / .

[[ ]]

symfony 1.x, , , Symfony 1.x

, Symfony , . Django ?

+4

Source: https://habr.com/ru/post/1664748/


All Articles