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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:18:41+00:00 2026-05-26T20:18:41+00:00

i dont know if this is possible, but i will explain what i want

  • 0

i dont know if this is possible, but i will explain what i want try !

I made a Context Processor that will load some user information.
I need know, in this context processor, if there is a variable named “group” in the vars list that will be passed to my view, and if is, i will load up more things.

The processor only receive a REQUEST object, and i think with ONLY this is not possible.

But, with REQUEST_PATH (from request) i could make some magic (w/ urls.py) and find the exact view and variable that was choose by django. Is there a simple way to do this (or maybe … a way ? 😀 ) ?

—- solution —-

The solution (using what yasar11732 say) is something like this:

x = resolve(request.META["PATH_INFO"])
if 'group_name' in x.kwargs
    do_domething()

Thanks ! 🙂

  • 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-26T20:18:41+00:00Added an answer on May 26, 2026 at 8:18 pm

    see: resolve() It does exactly what are you trying to do. Be aware that this function throws an 404 exception if it doesn’t find a match, so be ready to catch it.

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

Sidebar

Related Questions

I don't know if this is possible but will try to explain what I
I dont know if this possible But I have an ajax function in my
I don't know whether this is really possible, but I'm trying my best. If
I don't even know if this is even possible, but I thought I'd ask.
First let me say i dont know if this is possible the way im
I don't even know if this is possible. I want to do something like:
I dont know how doable this is but I'm working on a datatype for
sorry for this question, but i dont know where to search for it, or
I don't know if the title is clear but I'll try to explain it
I don't know the best way to ask this, but let me explain the

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.