Skip to main content

Django WeChat Short URL

Project description

django-short-url

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

from django.conf.urls import include, url
from django_short_url import views as surl_views

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

Uploaded Source

Built Distribution

django_short_url-1.1.7-py2.py3-none-any.whl (7.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: django-short-url-1.1.7.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for django-short-url-1.1.7.tar.gz
Algorithm Hash digest
SHA256 db1f76cd45e61b125551f7fd25bb6437665192a2d387001ac449905715c5ed85
MD5 0116652fd4288c350d4e6512c8a9d091
BLAKE2b-256 f7a324716eaca0c6384d6df2ed1e0c916b5d26480b7796fabddff87d1a385c4f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_short_url-1.1.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 359561eb82b5fda16834518f203fc941c907de0524eede5cd4de821825d95dbb
MD5 8e74f98c867cc0669da053ebcd5e2883
BLAKE2b-256 513b2a4b6c3d74d45e2ad3d9ac05fb2d429c5d1b312fa230dbc04504d260407b

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