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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:59:40+00:00 2026-05-16T06:59:40+00:00

So this is almost a duplicate of this question , except that I do

  • 0

So this is almost a duplicate of this question, except that I do want to use the slug for lookup.

My URLs look like this:

http://url.com/county/place-name

The unique combination of ‘county’ and ‘place-name’ is used to look up the database object, except that ‘place-name’ is stored in the database as ‘Place Name’.

So if I don’t store place-name in the database as a separate slug field, I would need to de-slugify it first, and only then then do lookup.

Is de-slugification safe/possible in Django? Or would I be better off adding a place-name slug field to my database, and populating it whenever a new object gets added?

  • 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-16T06:59:41+00:00Added an answer on May 16, 2026 at 6:59 am

    I’d always save it to the database if it’s used for lookup: Broken URLs are to be avoided, just in case you need to change the placename. If later you need for any reason to change the slugification algorithm, at least old data won’t break. Etc.

    If you need to change slugs later, you can at least deal with the migration while still having the old slugs saved.

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

Sidebar

Related Questions

Apologies, this is almost certainly a duplicate of this question but as that one
Duplicate post, see: When do you use the "this" keyword? On almost every project
This is almost a duplicate question, but I really didn't understand the answer given
This is almost certainly a very silly question, but for some reason I'm having
This one is almost a philosophical question: is it bad to access and/or set
I'm sorry if it's a duplicate of some question but this is specific on
Possible Duplicate: Why there are no ++ and — operators in Python? This question
This has almost certainly been asked here before, so apologies if it's a duplicate.
I can only imagine I'm not searching correctly; this seems like an obvious question
This is not a duplicate of the JS library to simulate Internet Explorer? question

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.