Django WeChat Short URL
Project description
Django WeChat Short URL
Installation
pip install django-short-url
Usage
from django_short_url.views import get_surl def xxx(request): surl = get_surl(lurl)
Urls.py
urlpatterns = [ url(r'^s/', include('django_short_url.urls', namespace='django_short_url')), ]
or:
urlpatterns = [ url(r'^(?P<surl>\w+)', surl_views.short_url_redirect, name='short_url_redirect'), ]
Settings.py
INSTALLED_APPS = ( ... 'django_short_url', ... ) # Redirect url when short url not exists DJANGO_SHORT_URL_REDIRECT_URL = ''
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-short-url-1.1.4.tar.gz
.
File metadata
- Download URL: django-short-url-1.1.4.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/18.5 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cd5e7b2987b4c37f50bd02d16939c87740267032943dfd9982730831e8fe44b |
|
MD5 | 569ddc397d74515c58ce5d2181f93798 |
|
BLAKE2b-256 | a44f7092de7d0a491fbcfa7f1a453461cfcb8533568923b342d8e663d8af7d55 |
File details
Details for the file django_short_url-1.1.4-py2.py3-none-any.whl
.
File metadata
- Download URL: django_short_url-1.1.4-py2.py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/18.5 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | caf23ee3cffd987b9eb989a8c5f803e56623e43c9dc47b1123a692da33c2d3cc |
|
MD5 | 5c6b934cc1f7f646f6658e25c59ed1f4 |
|
BLAKE2b-256 | b2b3ca14aafb806844edf7cb28885f2effa42e9e4730b2bed6f258dfd9cb38ca |