URL / Link shortener web app.
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_URL
, 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.