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

Uploaded Source

Built Distribution

django_short_url-1.1.3-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.3.tar.gz.

File metadata

  • Download URL: django-short-url-1.1.3.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/2.7.12+

File hashes

Hashes for django-short-url-1.1.3.tar.gz
Algorithm Hash digest
SHA256 7a0e51d13ac9f6acb1aade13d26da666a17f1b91a36c215b263400540a3ef1cc
MD5 af275c6eb39acae58b5bb5eb654626d3
BLAKE2b-256 da5f87df7ec647a78e0bb8b69c3cc00a26482b159ea03f79779ee2488be27e22

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_short_url-1.1.3-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.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/2.7.12+

File hashes

Hashes for django_short_url-1.1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8dc60ce4639d51c10dfd9974481347bfff5d521c3e66a44076f64cf724c057b7
MD5 203cf8256f91a46847bcb83cd63d7624
BLAKE2b-256 fbad80ac0aa539df32617a772db8880ede492bf07e1303de9a1cab383e0b6553

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