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

Uploaded Source

Built Distribution

django_short_url-1.1.1-py2.py3-none-any.whl (6.3 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for django-short-url-1.1.1.tar.gz
Algorithm Hash digest
SHA256 474933c994e45391383ac574c905b6dd2a1c2eb0d4cfb0828d02675b7bc0c4b0
MD5 d96754c769f78b1d648cb490337d4f89
BLAKE2b-256 5845eec669ce954b0df1868b3d0690c54aa3a07f41431820ead5f7cb58d34b88

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_short_url-1.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 27812e5fc6ce90c3d41daea0cac69e2f060007beec00d33414d9dc14c08a38e8
MD5 693b0971d27617251477451d3254b044
BLAKE2b-256 76ece9f07508cae2466087f767e99235427c8b8254186c8ab3bed6cffddd0fab

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