django-onetimelink


Namedjango-onetimelink JSON
Version 3.2 PyPI version JSON
download
home_pagehttps://github.com/HiroshiFuu/django-onetimelink
SummaryA django one-time file streaming application
upload_time2023-05-10 11:41:26
maintainer
docs_urlNone
authorFENG Hao
requires_python
licenseBSD
keywords django one-time file link serve
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ===========
Description
===========

A Django file streaming application to provide download links that only valid for one time click. Ispired by django-dynamic-link.

**License**

    BSD-3-Clause license

**Notes**

    * Tested with Django 2.2
    * Tested with Django 3.1

========
Features
========

    * One-time only download link 

============
Installation
============

**Dependences**

    * This app only

**Installation**

    *Installation with pip (recommended)*

        *Pip will download and install the package and take care of all the dependences.
        If you havn't pip on your system then install setuptools first after that run "easy_install pip".
        After that you can use pip in your terminal window.*

        * Use the stable release (recommended)::

            pip install django-onetimelink

        * With pip you can also uninstall::

            pip uninstall django-onetimelink

**test your installation**

    Go to console and type::

        python

    ... then type::
    
        >>> import onetimelink
        >>> onetimelink.CKINST()
        >>> help(onetimelink)
        >>> exit()
    
=====
Setup
=====
    
    * Add "onetimelink" to you installed apps in the settings file.
    * Make sure that:

        1.  Your Admin is enabled ('django.contrib.admin', is in your INSTALLED_APPS).
        2.  'django.contrib.auth.context_processors.auth', (also for admin) is in TEMPLATE_CONTEXT_PROCESSORS.
        3.  'django.core.context_processors.request', is in TEMPLATE_CONTEXT_PROCESSORS.

    * Add the following to your urls.py:

        1.  from django.conf.urls import include, url
        2.  from onetimelink import presettings
        3.  url(r'%s/' % presettings.DYNAMIC_LINK_URL_BASE_COMPONENT, include('onetimelink.urls')),
        
    * Finally run::
    
        python manage.py makemigrations
        python manage.py migrate
        python manage.py runserver

**Make it custom**

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

    DYNAMIC_LINK_MEDIA

        - Default: settings.MEDIA_ROOT
        - A path to a directory. From this point you can walk down the subdirectories to choose your files to serve.

    DYNAMIC_LINK_URL_BASE_COMPONENT
    
        - Default: 'OneTimeLink'
        - A string that modifies your url serve path.
        - Example: www.example.com/DYNAMIC_LINK_URL_BASE_COMPONENT/link/3839hd8HKl3/example.zip.

    DYNAMIC_LINK_UPLOAD_TO
    
        - Default: ''
        - Uploaded files base directory.

    DYNAMIC_LINK_SCHEMA_PROTO
    
        - Default: 'http'
        - HTTP Schema Protocal.

=====
Usage
=====

Open the admin interface and go to "OneTimeLink" section. The rest should be self-explanatory.

**Hints**

    * Upload Files to upload the file to DYNAMIC_LINK_MEDIA
    * The filename from the in Upload Files is only for human readability. You can delete or change these filenames in any way you want.
    * Through the action button you can serve a site with all the files from Upload Files.

==========
Changelogs
==========

**2021-03-24**

    * Add setting for schema protocol
    * Prefix links with FORCE_SCRIPT_NAME

**2021-03-25**

    * Fix several bugs
    * Do NOT use previous versions of this package

**2021-06-08**

    * Fix search bug in admin
    * clean up code
    * Do NOT use previous versions of this package

**2022-02-04**

    * Add setting to override HTTP Host
    * clean up code
    * Fix several bugs
    * Do NOT use previous versions of this package

**2022-09-27**

    * Add DYNAMIC_LINK_USE_FORCE_SCRIPT_NAME setting
    * Add HTTP Host override setting
    * Fix several bugs
    * clean up code
    * Do NOT use previous versions of this package

**2022-10-31**

    * Add support for Django 4
    * Remove support for Python 3.6, 3.7 as Django 4 requires min 3.8
    * Do NOT use previous versions of this package

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/HiroshiFuu/django-onetimelink",
    "name": "django-onetimelink",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "django one-time file link serve",
    "author": "FENG Hao",
    "author_email": "hiroshifuu@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/c2/97/75f55031203f2fd2c96e96a04110728f6418d01009be22419ae215eff2f6/django-onetimelink-3.2.tar.gz",
    "platform": null,
    "description": "===========\r\nDescription\r\n===========\r\n\r\nA Django file streaming application to provide download links that only valid for one time click. Ispired by django-dynamic-link.\r\n\r\n**License**\r\n\r\n    BSD-3-Clause license\r\n\r\n**Notes**\r\n\r\n    * Tested with Django 2.2\r\n    * Tested with Django 3.1\r\n\r\n========\r\nFeatures\r\n========\r\n\r\n    * One-time only download link \r\n\r\n============\r\nInstallation\r\n============\r\n\r\n**Dependences**\r\n\r\n    * This app only\r\n\r\n**Installation**\r\n\r\n    *Installation with pip (recommended)*\r\n\r\n        *Pip will download and install the package and take care of all the dependences.\r\n        If you havn't pip on your system then install setuptools first after that run \"easy_install pip\".\r\n        After that you can use pip in your terminal window.*\r\n\r\n        * Use the stable release (recommended)::\r\n\r\n            pip install django-onetimelink\r\n\r\n        * With pip you can also uninstall::\r\n\r\n            pip uninstall django-onetimelink\r\n\r\n**test your installation**\r\n\r\n    Go to console and type::\r\n\r\n        python\r\n\r\n    ... then type::\r\n    \r\n        >>> import onetimelink\r\n        >>> onetimelink.CKINST()\r\n        >>> help(onetimelink)\r\n        >>> exit()\r\n    \r\n=====\r\nSetup\r\n=====\r\n    \r\n    * Add \"onetimelink\" to you installed apps in the settings file.\r\n    * Make sure that:\r\n\r\n        1.  Your Admin is enabled ('django.contrib.admin', is in your INSTALLED_APPS).\r\n        2.  'django.contrib.auth.context_processors.auth', (also for admin) is in TEMPLATE_CONTEXT_PROCESSORS.\r\n        3.  'django.core.context_processors.request', is in TEMPLATE_CONTEXT_PROCESSORS.\r\n\r\n    * Add the following to your urls.py:\r\n\r\n        1.  from django.conf.urls import include, url\r\n        2.  from onetimelink import presettings\r\n        3.  url(r'%s/' % presettings.DYNAMIC_LINK_URL_BASE_COMPONENT, include('onetimelink.urls')),\r\n        \r\n    * Finally run::\r\n    \r\n        python manage.py makemigrations\r\n        python manage.py migrate\r\n        python manage.py runserver\r\n\r\n**Make it custom**\r\n\r\n    Use the global settings.py in your projects root to overwrite the applications presettings with the following variables.\r\n\r\n    DYNAMIC_LINK_MEDIA\r\n\r\n        - Default: settings.MEDIA_ROOT\r\n        - A path to a directory. From this point you can walk down the subdirectories to choose your files to serve.\r\n\r\n    DYNAMIC_LINK_URL_BASE_COMPONENT\r\n    \r\n        - Default: 'OneTimeLink'\r\n        - A string that modifies your url serve path.\r\n        - Example: www.example.com/DYNAMIC_LINK_URL_BASE_COMPONENT/link/3839hd8HKl3/example.zip.\r\n\r\n    DYNAMIC_LINK_UPLOAD_TO\r\n    \r\n        - Default: ''\r\n        - Uploaded files base directory.\r\n\r\n    DYNAMIC_LINK_SCHEMA_PROTO\r\n    \r\n        - Default: 'http'\r\n        - HTTP Schema Protocal.\r\n\r\n=====\r\nUsage\r\n=====\r\n\r\nOpen the admin interface and go to \"OneTimeLink\" section. The rest should be self-explanatory.\r\n\r\n**Hints**\r\n\r\n    * Upload Files to upload the file to DYNAMIC_LINK_MEDIA\r\n    * The filename from the in Upload Files is only for human readability. You can delete or change these filenames in any way you want.\r\n    * Through the action button you can serve a site with all the files from Upload Files.\r\n\r\n==========\r\nChangelogs\r\n==========\r\n\r\n**2021-03-24**\r\n\r\n    * Add setting for schema protocol\r\n    * Prefix links with FORCE_SCRIPT_NAME\r\n\r\n**2021-03-25**\r\n\r\n    * Fix several bugs\r\n    * Do NOT use previous versions of this package\r\n\r\n**2021-06-08**\r\n\r\n    * Fix search bug in admin\r\n    * clean up code\r\n    * Do NOT use previous versions of this package\r\n\r\n**2022-02-04**\r\n\r\n    * Add setting to override HTTP Host\r\n    * clean up code\r\n    * Fix several bugs\r\n    * Do NOT use previous versions of this package\r\n\r\n**2022-09-27**\r\n\r\n    * Add DYNAMIC_LINK_USE_FORCE_SCRIPT_NAME setting\r\n    * Add HTTP Host override setting\r\n    * Fix several bugs\r\n    * clean up code\r\n    * Do NOT use previous versions of this package\r\n\r\n**2022-10-31**\r\n\r\n    * Add support for Django 4\r\n    * Remove support for Python 3.6, 3.7 as Django 4 requires min 3.8\r\n    * Do NOT use previous versions of this package\r\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "A django one-time file streaming application",
    "version": "3.2",
    "project_urls": {
        "Download": "https://pypi.python.org/pypi/django-onetimelink",
        "Homepage": "https://github.com/HiroshiFuu/django-onetimelink"
    },
    "split_keywords": [
        "django",
        "one-time",
        "file",
        "link",
        "serve"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c29775f55031203f2fd2c96e96a04110728f6418d01009be22419ae215eff2f6",
                "md5": "345528e6ce358744ee433a940e27a626",
                "sha256": "4a71c0a1c77ee7c78a7f92e6a2cb9567f591c76eaa8e87bf888a6249bcff8e0f"
            },
            "downloads": -1,
            "filename": "django-onetimelink-3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "345528e6ce358744ee433a940e27a626",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 98019,
            "upload_time": "2023-05-10T11:41:26",
            "upload_time_iso_8601": "2023-05-10T11:41:26.476521Z",
            "url": "https://files.pythonhosted.org/packages/c2/97/75f55031203f2fd2c96e96a04110728f6418d01009be22419ae215eff2f6/django-onetimelink-3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-10 11:41:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "HiroshiFuu",
    "github_project": "django-onetimelink",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "django-onetimelink"
}
        
Elapsed time: 0.19057s