We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I realised that the fact that the user having to generate their own slug when creating/editing their post is not good UX.
The text was updated successfully, but these errors were encountered:
After a bit of research I found the way to ensure the user doesn't have to write their own slug field.
I did this by importing slugify to my models.py from django.utils.text import slugify
from django.utils.text import slugify
I then added the following code to have the slug auto generate from the users post title.
def save(self, *args, **kwargs): self.slug = slugify(self.title) super(Post, self).save(*args, **kwargs)
Sorry, something went wrong.
jrdnbrkfld
No branches or pull requests
I realised that the fact that the user having to generate their own slug when creating/editing their post is not good UX.
The text was updated successfully, but these errors were encountered: