Skip to main content

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.0.4.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

django_short_url-1.0.4-py2.py3-none-any.whl (6.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-short-url-1.0.4.tar.gz.

File metadata

File hashes

Hashes for django-short-url-1.0.4.tar.gz
Algorithm Hash digest
SHA256 0a34f181798f7ee4bd95a04b5b97135ffad647e926db834b92f35efcdc05bffe
MD5 c63e547ae802c1b498da668c785ea3a2
BLAKE2b-256 ddcfe750cb652ab00dc1b1e4167dbbfd4a238af63775648286ef52a2ab03ef73

See more details on using hashes here.

File details

Details for the file django_short_url-1.0.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_short_url-1.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bbe1da445871c5818fb3d3e5a6359f067bc73ee22f80c562d797cf3937122900
MD5 828a1771edace93bfad429d07ef29910
BLAKE2b-256 9217f36453fe63ce3b9c50c9fd879a49e5efe8b918bc97ae1e350fb191bb04fa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page