Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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 = ''

Release History

This version
History Node

1.0.3

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
django_short_url-1.0.3-py2.py3-none-any.whl
(7.4 kB) Copy SHA256 Hash SHA256
Wheel py2.py3 Jan 7, 2018
django-short-url-1.0.3.tar.gz
(3.8 kB) Copy SHA256 Hash SHA256
Source None Jan 7, 2018

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting