Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6210847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:14:02+00:00 2026-05-24T06:14:02+00:00

I am new to django and I really like its modular construction so I

  • 0

I am new to django and I really like its modular construction so I decided to take advantage of it and put all the separated functionalities each in different app.

Now I need a way to switch on and off this apps by both user and admin.
The user options panel would look like this:


   [ ] blog
   ---------------------
   [ ] tagging  [BUY]

After checking “blog” option user would get the blog in his profile and after buying and checking “tagging” he would get tagging for the blog.


The admin panel would have an ability to show or hide an app from user panel.

I wonder if:

  1. there is an app which would help me switch on and off an app for specyfic user
  2. and if not –
    1. what would be a proper “architecture” for such django app?
    2. Can it be done dynamically in middleware or should it be done during login (check available apps from database, switch them on, redirect to user home page)?
    3. Any advices for such a task?

Thanks,
Robert

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T06:14:02+00:00Added an answer on May 24, 2026 at 6:14 am

    I haven’t heard of any such app… But I don’t expect it would be too hard to build.

    If I were doing it, I would put a permissions check in the entry points to each app. For example:

    check_app_permission = lambda request: permissions.check_app_permission("blog", request)
    
    def view_blog(request, …):
        check_app_permission(request)
        …
    

    (it might even be possible to do some magic and inject this check at the urls.py level…)

    Additionally, I would create a has_app_permission template tag:

    <div id="sidebar">
        {% if has_app_permission "blog" %}
            {% include "blog/sidebar_recent_posts.html" %}
        {% endif %}
    </div>
    

    Or similar.

    Finally, there are approximately a million ways you could implement the permission system… And without more information I wouldn’t be able to comment. The simplest, though, would be something like this:

    class App(Model):
        name = CharField(…)
    
    class AppPermission(object):
        app = ForeignKey(App)
        user = ForiegnKey(User)
    
    def user_has_permission(user, app_name):
        return AppPermission.objects.filter(app__name=app_name, user=user).exists()
    

    I would avoid trying to do this with middleware, because if I understand the problem correctly, I expect you will (or, at least, I expect I would) end up spending a bunch of time building a generic framework which, in the end, would just have checks similar to those above.

    Does that help? Is there something I can clarify?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm really new to Python and Django. I created a class in Python that
I'm totally new to django, and I'm using its documentation to get help on
I am new to the Django framework. On Django's admin index page I'd like
I'm new to Django, and am trying to set up a really simple Django
Alright, this is probably a really silly question but I am new to Python/Django
I would like to start using Django with MYSQL, instead of sqlite all the
I'm really new to django and I'm building a form and I need a
I'm new to django cms and I'm really lucky that I was able to
Disclaimer: I'm very new to Django. I must say that so far I really
I create a new Django app (not project) called Bussinesses, then add following class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.