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
django-short-url-1.1.4.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for django_short_url-1.1.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | caf23ee3cffd987b9eb989a8c5f803e56623e43c9dc47b1123a692da33c2d3cc |
|
MD5 | 5c6b934cc1f7f646f6658e25c59ed1f4 |
|
BLAKE2b-256 | b2b3ca14aafb806844edf7cb28885f2effa42e9e4730b2bed6f258dfd9cb38ca |