Skip to main content

simple django app for sharing files over http / https.

Project description

django smart share

a simple django app for sharing files over http / https.

attention :

on test, not bug free. i just started this project for fun, so will be glad if you use and report issues on this project.

Requirements

  • python >= 3.5
  • django >= 2

Installation

install using pip:

pip install djangosmartshare

adding smartshare to INSTALLED_APPS in settings.py:

INSTALLED_APPS = [
    ...,
    'smartshare',
    ...,
]

including smartshare.urls in your project urls.py:

from django.urls import path, include

urlpatterns = [
    ...,
    path('', include('smartshare.urls')),
    ...,
]

running migrate for making related database tables:

python3 manage.py migrate

Features

you can simply share any directory on your local system over http / https, in short : just like a file browser.

in Location model, by adding a new location, system will check if the path exist, so you can have following permissions separated for 3 different user types per each Location object. Admins , Users ( mean normal users ) and Anonymouse Visitors ( public ) :

attention :

  1. if you share a directory, inside another shared directory, neither Base Directory nor Sub Directory will not change each other permissions. the deepest available Sub Directory Location object permissions will be used for each directory.
  2. the root path / is not available.
  3. only directories path are allowed to be shared, not files.
  4. commands will run as logged-in user on local system, so even if a permission like Can Delete be True, on a directory that need superuser sudo permission, the command will not effect, for security reasons.
permission description
Active wheather to show this directory for the allowed user or not.
Show Files user can view Files in directory. ( only view, nothing more )
Show Directories user can view Directories in directory.
Show Hidden Files same as Files, fore Hidden Files.
Show Hidden Directories same as Directories, for Hidden Directories
Can Download if this permission be True, user can download shared directory and it's subdirectories in compressed files as zip, tar, tar.gz and tar.bz2. an also user allowed to download any Files in directory and it's subdirectories.
Can Upload if this permission be True, user can upload Files in directory and it's subdirectories.
Can Delete if this permission be True, a Delete button will be showed for each subdirectories and files in directory, so user can delete them.
Can Create if this permission be True, an Add button will be showed for Directories and Files, so user can add new directory, or a file with it's content.

this app have a simple responsive front-end design, created using Bootstrap 4 framework. by default, needed static files are in static/css and static/js directories outside of app directory for avoiding duplication. if you are planning to uses this app make sure to include these files or replacing share/templates/base.html styles and scripts with Bootstrap 4 SDN.

this users are added for testing :

username password is superuser
admin adminadmin yes
user useruser no

TO DO

this Features are planned to be added in next version :

  • adding Run Command ability.
  • adding Copy and Move.
  • adding multi upload.
  • adding multi selecting files and directories ability for Download or Delete.
  • adding Preview and Edit abilities.
  • adding permissions for duplicated files and directories while adding or uploading.
  • changing dirs.html template for adding Upload, Delete, Add forms.
  • rewriting views definitions.
  • rewriting responsive template for a better UX / UI.

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

djangosmartshare-0.8.8.tar.gz (642.9 kB view details)

Uploaded Source

Built Distribution

djangosmartshare-0.8.8-py3-none-any.whl (656.8 kB view details)

Uploaded Python 3

File details

Details for the file djangosmartshare-0.8.8.tar.gz.

File metadata

  • Download URL: djangosmartshare-0.8.8.tar.gz
  • Upload date:
  • Size: 642.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6

File hashes

Hashes for djangosmartshare-0.8.8.tar.gz
Algorithm Hash digest
SHA256 58def0f08c1d94d759b0e2349a3a6be77452648f6d90c595a8d613f5dd671d06
MD5 9a005af04d3ef83abf3bb2f0ff95ff9d
BLAKE2b-256 636aa59db9b9ae70957e3808989c222719dfe52067dd0634e38115fe83c3cf82

See more details on using hashes here.

File details

Details for the file djangosmartshare-0.8.8-py3-none-any.whl.

File metadata

  • Download URL: djangosmartshare-0.8.8-py3-none-any.whl
  • Upload date:
  • Size: 656.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6

File hashes

Hashes for djangosmartshare-0.8.8-py3-none-any.whl
Algorithm Hash digest
SHA256 91276ebcb1f4125aab59be1eaf0306469e524270cc94e15baf81f0e094bd671b
MD5 38fbdddf168b5618254631dacbb7bbaa
BLAKE2b-256 19851ed2a6945a8af36ecb340008c8c180d6a21bef5c18e3fa6492cf6f29213a

See more details on using hashes here.

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