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 8234571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:31:34+00:00 2026-06-07T18:31:34+00:00

I have a Django-CMS plugin which is used to display a list of objects.

  • 0

I have a Django-CMS plugin which is used to display a list of objects. The required functionality of the plugin is that the list is paginated and can be re-ordered based on properties of the objects in the list.

Handling this functionality with ajax is not an ideal solution in this particular case so I was planning on using django Paginator, which requires a ‘page’ querystring parameter, and passing a ‘order’ querystring parameter which I would then use to define the order of the queryset.

The problem is that I can’t see anyway of accessing the request object from within the plugins render function.

Does anyone know if it’s possible to access the request object from within the render function, or can suggest a workaround?

  • 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-06-07T18:31:35+00:00Added an answer on June 7, 2026 at 6:31 pm

    The CMSPluginBase’s render method takes a context object. You should be able to access the request via that object if your view is using a RequestContext instance.

    class MyCoolPlugin(CMSPluginBase):
    
        def render(self, context, instance, placeholder):
    
             #Do something with the request, like access the user
             current_user = context['request'].get('user', None)
             ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Django app that presents a list of items that you can add
I have Django project on Dreamhost server which has several views that returns Json
I have installed django-cms in my hosting. But there is a problem. That's when
I'm developing a CMS (with Django, but that doesn't matter) and have chosen GIT.
I have an existing django application, with which I need to integrate django-cms. Django-cms
I am learning django-cms. I tried to make custom plugin which was quite successful
I have a Django based CMS that uses Django's sites framework and Nginx/Apache/mod_wsgi virtual
I've implemented both django-cms and flatpages, but can not get tiny_mce to display in
I have a corporate website with django-cms and with a SQLite database that has
i have problem with results in django-cms and haystack search. I'm using django-cms-search plugin,

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.