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.6.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for django_short_url-1.1.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db1e1e47e5b206556b74ba4c9916cd91b2a02a3486a21dac68a0f2966a6de39a |
|
MD5 | 7ed6928cd9da22c1a7d6dd20c002d336 |
|
BLAKE2b-256 | c18e8c8bcd54ac2dcd46122d7b0ee6d3ad5d3310c5b43a9ced29df4d03c5f4ec |