Skip to main content

URL shortener Django app

Project description

django-short-links

URL / Link shortener web app.

Getting Started

Install links:

pip install django-short-links

Add links to INSTALLED_APPS. Make sure that django.contrib.auth installed, then add a new setting LINKS_SITE_NAME, in settings.py:

# settings.py

INSTALLED_APPS = [
    ...
    'links',
    'django.contrib.auth',
    ...
]

# Your server's IP address without trailing slash
LINKS_SITE_URL = 'https://your.domain.com'

Include links and django.contrib.auth.urls, in project's urls.py:

# urls.py

urlpatterns = [
    ...
    path('l/', include('links.urls')),
    path('accounts/', include('django.contrib.auth.urls')),
    ...
]

Run migrate:

python manage.py migrate

Now, you can open your browser at https://your.domain.com/l/.

I hope that you find this useful.

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_links-0.1.5.tar.gz (9.7 kB view hashes)

Uploaded Source

Built Distribution

django_short_links-0.1.5-py3-none-any.whl (18.2 kB view hashes)

Uploaded Python 3

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