Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcanuy/django-slugs-example-app
A basic app to show how to add slugs to models
https://github.com/marcanuy/django-slugs-example-app
django django-application seo slugify url
Last synced: 8 days ago
JSON representation
A basic app to show how to add slugs to models
- Host: GitHub
- URL: https://github.com/marcanuy/django-slugs-example-app
- Owner: marcanuy
- License: mit
- Created: 2019-02-15T02:53:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-05-06T13:49:10.000Z (over 2 years ago)
- Last Synced: 2023-03-14T07:45:31.548Z (over 1 year ago)
- Topics: django, django-application, seo, slugify, url
- Language: Python
- Homepage: https://simpleit.rocks/python/django/generating-slugs-automatically-in-django-easy-solid-approaches/
- Size: 159 KB
- Stars: 12
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# django-slugs-example-app
A basic app to show how to generate slugs based in a model's field.This app shows the concepts explained at: https://simpleit.rocks/python/django/generating-slugs-automatically-in-django-easy-solid-approaches/
Demo: https://django-slugs-example-app.herokuapp.com/ (db reset daily)
# Installation
~~~ bash
python3 -m venv ~/.virtualenvs/django-slugs-example-app
source ~/.virtualenvs/django-slugs-example-app/bin/activate
pip install -r requirements.txt
./manage.py migrate
~~~Run example site: `./manage.py runserver`.
# Models
![models](models.png "models UML")
# URLs
~~~
/ blog.views.ComparatorListView article-list
/blog/-/ blog.views.ArticlePkAndSlugDetailView article-pk-slug-detail
/blog/ blog.views.ArticleUniqueSlugDetailView articleunique-slug
/blog/create blog.views.ComparatorFormView article-create
~~~