Skip to main content

A django file streaming application

Project description


Django file streaming application to provide download links without showing the real path to the served file. The links can be set to expire by date or by clicks. It is also possible to use it for counting clicks on a download link.


New BSD license


  • Tested with Django 1.2 / 1.3
  • Example project is included


  • Link expires by clicks (optional)
  • Link expires by time (optional)
  • Is usable for counting clicks



  • This app
  • Django itself, its redirects from django.contrib and its locale middleware.


Manual Installation

  • Download the file and unzip it.
  • Copy the folder in your project root.

Installation with pip

  • Type in your terminal:
:~$ pip install django-dynamic-link
  • With pip you can also uninstall it:
:~$ pip uninstall django-dynamic-link

Other possibilities

  • Open a terminal and change to the folder which contains the and then type:
:~$ python install

test your installation

Go to console and type:
:~$ python
>>> import dynamicLink
>>> dynamicLink.VERSION


  • Add “dynamicLink” to you installed apps in the settings file.
  • Make sure that:
    1. ‘django.middleware.locale.LocaleMiddleware’, is in your MIDDLEWARE_CLASSES.
    2. ‘django.contrib.redirects.middleware.RedirectFallbackMiddleware’, is in your MIDDLEWARE_CLASSES.
    3. ‘django.contrib.redirects’, is added to your INSTALLED_APPS.
    4. Your Admin is enabled (‘django.contrib.admin’, is in your INSTALLED_APPS.)
  • Add the following to your
    1. from dynamicLink import presettings
    2. (r’^w+/%s/’ % presettings.DYNAMIC_LINK_URL_BASE_COMPONENT, include(‘dynamicLink.urls’)),
  • Finally run:
:~$ python syncdb
:~$ python runserver

Make it custom

Use the global in your projects root to overwrite the applications presettings with the following variables.

    • Default: settings.MEDIA_ROOT
    • A path to a directory. From this point you can walk down the subdirectories to choose your files to serve.
    • Default: ‘serve’
    • A string that modifies your url serve path.
    • Example:


Open the admin interface and go to “Dynamiclink” section. The rest should be self-explanatory.


  • Zero value for link age means never expires.
  • Zero value for clicks means unlimited clicks.
  • If a link never expires you can use it for click counting.
  • Trough the action menu you can serve a site with several links.
  • The filename from the created links are only for human readability. You can delete or change this filenames in any way you want.

Example project

djang-dynamic-links ships with an example proect.

  1. First unpack the tar.gz
  2. Than move “dynamicLink” in to the “example” folder or install it (see install section).
  3. Run “python syncdb” and “python runserver”.
  4. Open a Browser, go to:

Project details

Download files

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

Files for django-dynamic-link, version 0.4.9
Filename, size File type Python version Upload date Hashes
Filename, size django-dynamic-link-0.4.9.tar.gz (63.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page