Skip to main content

A Django app to conduct Web-based directory-tree.

Project description

# Directory-Tree

Directory Tree is a Django app to see all directory in media folder.

Detailed documentation is in the “docs” directory.

Quick start

  1. Add “directory_tree” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'directory_tree',
    ]
  2. Add MEDIA_URL and MEDIA_ROOT to your setting.py setting like this (Optional):

    BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    
    MEDIA_URL = '/media/'
    MEDIA_ROOT = str(BASE / 'media')
  3. Add media path in your project urls.py like this (Optional):

    from django.conf import settings
    from django.conf.urls.static import static
    
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
  4. Option if you want to see file have in a database ? setting like this in setting.py:

    DIRECTORY_TREE_MODEL_USE = True # default False
    DIRECTORY_TREE_MODEL = {
        TABLE_NAME: [list_field],
    }
  5. Include the directorty tree URLconf in your project urls.py like this:

    path('directory_tree/', include('directory_tree.urls')),
  6. Start the development server and visit http://127.0.0.1:8000/admin/ to login by admin user

  7. Visit http://127.0.0.1:8000/directory_tree/ to participate in the directory tree.

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-directory-tree-1.7.tar.gz (15.1 kB view details)

Uploaded Source

File details

Details for the file django-directory-tree-1.7.tar.gz.

File metadata

  • Download URL: django-directory-tree-1.7.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.7

File hashes

Hashes for django-directory-tree-1.7.tar.gz
Algorithm Hash digest
SHA256 3c91c189f7a849eff8b1f7a49b1641b0fd9fd14dd1dd551bf452d248d6612fde
MD5 31470a8743e24a6a575e1514763341fe
BLAKE2b-256 fff54e41586718589dd426afb8ed2a6732f0b66a95dedebc53d2725b780d8ca5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page