Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove date from URL #32

Closed
carltongibson opened this issue Mar 1, 2016 · 3 comments
Closed

Remove date from URL #32

carltongibson opened this issue Mar 1, 2016 · 3 comments

Comments

@carltongibson
Copy link
Contributor

I'd like to serve posts without the date in the URL. Something like:

    url(
        regex=r'^(?P<blog_slug>[-\w]+)/(?P<slug>[-\w]+)/$',
        view=EntryPageServe.as_view(),
        name='entry_age_serve_slug_only'
    )

I add this and adjust EntryPageServe and BlogRoutes etc but I keep getting a 404.

What am I missing? How can I get the URL to serve the matching Entry?

Thanks.

@carltongibson
Copy link
Contributor Author

My 404s were caused by an incorrect blog_slug 😳

@robnardo
Copy link

Hi @carltongibson - i am having trouble removing the date in the URL - changing the links on Puput from /blog/2018/10/23/my-post-slug to /blog/my-post-slug i was wondering if you could please help? What are all the changes to make this happen?

@robnardo
Copy link

@carltongibson - no worries.. i figured it out.. i changed <blog_slug> to <blog_path> in your code. seems to work now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants