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

  • Home
  • SEARCH
  • 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 48241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:14:57+00:00 2026-05-10T16:14:57+00:00

Can i print out a url /admin/manage/products/add of a certain view in a template?

  • 0

Can i print out a url /admin/manage/products/add of a certain view in a template?

Here is the rule i want to create a link for

(r'^manage/products/add/$', create_object, {'model': Product, 'post_save_redirect': ''}), 

I would like to have /manage/products/add in a template without hardcoding it. How can i do this?

Edit: I am not using the default admin (well, i am but it is at another url), this is my own

  • 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. 2026-05-10T16:14:57+00:00Added an answer on May 10, 2026 at 4:14 pm

    You can use get_absolute_url, but that will only work for a particular object. Since your object hasn’t been created yet, it won’t work in this case.

    You want to use named URL patterns. Here’s a quick intro:

    Change the line in your urls.py to:

    (r'^manage/products/add/$', create_object, {'model': Product, 'post_save_redirect': ''}, 'create-product'), 

    Then, in your template you use this to display the URL:

    {% url create-product %} 

    If you’re using Django 1.5 or higher you need this:

    {% url 'create-product' %} 

    You can do some more powerful things with named URL patterns, they’re very handy. Note that they are only in the development version (and also 1.0).

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

Sidebar

Ask A Question

Stats

  • Questions 62k
  • Answers 62k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer First of all, you should make it a bit more… May 11, 2026 at 10:16 am
  • added an answer The VM Spec: The Class File Format and the The… May 11, 2026 at 10:16 am
  • added an answer With text (or other) files and open source you can… May 11, 2026 at 10:16 am

Related Questions

Can i print out a url /admin/manage/products/add of a certain view in a template?
Is there a way I can access (for printout) a list of sub +
I like to print out software requirements so I can easily mark them up,
Can anyone point me out, how can I parse/evaluate HQL and get map where
I want to try out SICP with Python. Can any one point to materials
How can I print a message to the error console, preferably including a variable?
How can I print a plain list of all files that were part of
When I print "\[\e[34m\]sometext" I get some text in blue, but can I specify
How can I elegantly print the date in RFC822 format in Perl?
How can I get line numbers to print in Visual Studio 2005 when printing

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.