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

Uploaded Source

Built Distribution

django_short_url-1.1.6-py2.py3-none-any.whl (6.9 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: django-short-url-1.1.6.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.3

File hashes

Hashes for django-short-url-1.1.6.tar.gz
Algorithm Hash digest
SHA256 a82fba2a8418a88fb67b149aea297cd2c8ff036676786393e287b6f2a9483eb8
MD5 d07a271922524f544e6def00a65f099f
BLAKE2b-256 7db15e1e679955d340cb04e6f68422ad3376d617c4c4e651c452a89d7f41c306

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_short_url-1.1.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.3

File hashes

Hashes for django_short_url-1.1.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 db1e1e47e5b206556b74ba4c9916cd91b2a02a3486a21dac68a0f2966a6de39a
MD5 7ed6928cd9da22c1a7d6dd20c002d336
BLAKE2b-256 c18e8c8bcd54ac2dcd46122d7b0ee6d3ad5d3310c5b43a9ced29df4d03c5f4ec

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