django-file-explorer


Namedjango-file-explorer JSON
Version 1.6.1 PyPI version JSON
download
home_page
SummaryDjango app to explore directory.
upload_time2023-07-12 06:09:06
maintainer
docs_urlNone
authorTahir Rafique
requires_python
licenseMIT
keywords explorer file explorer directory explorer django explorer location explorer
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Django File Explorer

A django app to explore the host machine directory. 

It will provide following features:

1. Allow user login
2. Allow to set roles for user to delete and download directories.
3. Allow user to upload single file.

## Installation

Following command will help to install the package.

```bash
pip install django-file-explorer
```

## Setup

1. Add the app to **setting.py** file in **INSTALLED_APPS** section.

```python
INSTALLED_APPS = [
    ...
    'explorer.apps.ExplorerConfig',
]
```

2. If logging is required then add the following information to **settings.py** file:

```python
EXPLORER = {
    'log_dir': MEDIA_ROOT / 'logs',
    'log_file': MEDIA_ROOT / 'logs' / 'access.log'
}
```

**log_dir:** This is the path where multiple user log files will be created. Each file contain information about the single user.

**log_file:** Path to a file containing log information.

Following is the example of single log line.

```tex
[25/Feb/2023 12:44:43:PM] GET | 200 | <<username>> | <<action>> | <<volume>> | <<pageNumber>> | <<location>> | <<checkboxIdx>> |
```

2. Migrate the changes

```bash
python manage.py migrate
```

I you are managing DB separate then make following tables in database:

### explorer_action

| Name          | Position | Data type                | Length | Relation | Not NULL? | Type |
| ------------- | -------- | ------------------------ | ------ | -------- | --------- | ---- |
| id            | 1        | bigint                   |        | PK       | true      | None |
| name          | 2        | character varying        | 120    |          | true      | None |
| creation_date | 3        | timestamp with time zone |        |          | true      | None |

Add following **actions** to table:

1. download
2. delete
3. upload
4. unzip

**Note: All PK are auto incremental.**

### explorer_volume

| Name          | Position | Data type                | Length | Relation | Not NULL? | Type |
| ------------- | -------- | ------------------------ | ------ | -------- | --------- | ---- |
| id            | 1        | bigint                   |        | PK       | true      | None |
| name          | 2        | character varying        | 120    |          | true      | None |
| path          | 3        | character varying        | 2048   |          | true      | None |
| active        | 4        | boolean                  |        |          | true      | None |
| creation_date | 5        | timestamp with time zone |        |          | true      | None |

### explorer_userrole

| Name          | Position | Data type                | Length | Relation | Not NULL? | Type |
| ------------- | -------- | ------------------------ | ------ | -------- | --------- | ---- |
| id            | 1        | bigint                   |        | PK       | true      | None |
| creation_date | 2        | timestamp with time zone |        |          | true      | None |
| user_id       | 3        | integer                  |        | FK       | true      | None |
| volume_id     | 4        | bigint                   |        | FK       | true      | None |

Foreign Key Constraints

| Name      | Columns             | Referenced Table |
| --------- | ------------------- | ---------------- |
| user_id   | (user_id) -> (id)   | auth_user        |
| volume_id | (volume_id) -> (id) | explorer_volume  |

### explorer_userrole_actions

| Name        | Position | Data type | Length | Relation | Not NULL? | Type |
| ----------- | -------- | --------- | ------ | -------- | --------- | ---- |
| id          | 1        | bigint    |        | PK       | true      | None |
| userrole_id | 2        | bigint    |        | FK       | true      | None |
| action_id   | 3        | bigint    |        | FK       | true      | None |

Foreign Key Constraints

| Name        | Columns               | Referenced Table  |
| ----------- | --------------------- | ----------------- |
| userrole_id | (userrole_id) -> (id) | explorer_userrole |
| action_id   | (action_id) -> (id)   | explorer_action   |

3. Add URL to **urls.py** file.

```python
from django.urls import include

urlpatterns = [
    ...
    path('explorer/', include('explorer.urls'), name='explorer')
]
```

Add **volumes** to database by specifying its name and path. After that define the user roles for specific volume in **user roles** table.

## Run

Go to explorer url **SERVER:PORT/explorer** and explore the volumes.

## Author

**Tahir Rafique**

## Releases

| Date      | Version | Summary                                                      |
| --------- | ------- | ------------------------------------------------------------ |
| 12-Jul-23 | v1.6.1  | Adding local bootstrap 4.6.2 files. This will correct the wrong appearance of UI when there is no Internet connection. |
| 4-Jul-23  | v1.6.0  | Adding file unzip option.                                    |
| 16-Jun-23 | v1.5.0  | Separating vscode icons from this app.                       |

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "django-file-explorer",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "explorer,file explorer,directory explorer,django explorer,location explorer",
    "author": "Tahir Rafique",
    "author_email": "tahirrafiqueasad@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/18/f5/aa71f6842ee4f5389bd113a5369df4d073903484c14ae82fc982c33e052c/django-file-explorer-1.6.1.tar.gz",
    "platform": null,
    "description": "# Django File Explorer\n\nA django app to explore the host machine directory. \n\nIt will provide following features:\n\n1. Allow user login\n2. Allow to set roles for user to delete and download directories.\n3. Allow user to upload single file.\n\n## Installation\n\nFollowing command will help to install the package.\n\n```bash\npip install django-file-explorer\n```\n\n## Setup\n\n1. Add the app to **setting.py** file in **INSTALLED_APPS** section.\n\n```python\nINSTALLED_APPS = [\n    ...\n    'explorer.apps.ExplorerConfig',\n]\n```\n\n2. If logging is required then add the following information to **settings.py** file:\n\n```python\nEXPLORER = {\n    'log_dir': MEDIA_ROOT / 'logs',\n    'log_file': MEDIA_ROOT / 'logs' / 'access.log'\n}\n```\n\n**log_dir:** This is the path where multiple user log files will be created. Each file contain information about the single user.\n\n**log_file:** Path to a file containing log information.\n\nFollowing is the example of single log line.\n\n```tex\n[25/Feb/2023 12:44:43:PM] GET | 200 | <<username>> | <<action>> | <<volume>> | <<pageNumber>> | <<location>> | <<checkboxIdx>> |\n```\n\n2. Migrate the changes\n\n```bash\npython manage.py migrate\n```\n\nI you are managing DB separate then make following tables in database:\n\n### explorer_action\n\n| Name          | Position | Data type                | Length | Relation | Not NULL? | Type |\n| ------------- | -------- | ------------------------ | ------ | -------- | --------- | ---- |\n| id            | 1        | bigint                   |        | PK       | true      | None |\n| name          | 2        | character varying        | 120    |          | true      | None |\n| creation_date | 3        | timestamp with time zone |        |          | true      | None |\n\nAdd following **actions** to table:\n\n1. download\n2. delete\n3. upload\n4. unzip\n\n**Note: All PK are auto incremental.**\n\n### explorer_volume\n\n| Name          | Position | Data type                | Length | Relation | Not NULL? | Type |\n| ------------- | -------- | ------------------------ | ------ | -------- | --------- | ---- |\n| id            | 1        | bigint                   |        | PK       | true      | None |\n| name          | 2        | character varying        | 120    |          | true      | None |\n| path          | 3        | character varying        | 2048   |          | true      | None |\n| active        | 4        | boolean                  |        |          | true      | None |\n| creation_date | 5        | timestamp with time zone |        |          | true      | None |\n\n### explorer_userrole\n\n| Name          | Position | Data type                | Length | Relation | Not NULL? | Type |\n| ------------- | -------- | ------------------------ | ------ | -------- | --------- | ---- |\n| id            | 1        | bigint                   |        | PK       | true      | None |\n| creation_date | 2        | timestamp with time zone |        |          | true      | None |\n| user_id       | 3        | integer                  |        | FK       | true      | None |\n| volume_id     | 4        | bigint                   |        | FK       | true      | None |\n\nForeign Key Constraints\n\n| Name      | Columns             | Referenced Table |\n| --------- | ------------------- | ---------------- |\n| user_id   | (user_id) -> (id)   | auth_user        |\n| volume_id | (volume_id) -> (id) | explorer_volume  |\n\n### explorer_userrole_actions\n\n| Name        | Position | Data type | Length | Relation | Not NULL? | Type |\n| ----------- | -------- | --------- | ------ | -------- | --------- | ---- |\n| id          | 1        | bigint    |        | PK       | true      | None |\n| userrole_id | 2        | bigint    |        | FK       | true      | None |\n| action_id   | 3        | bigint    |        | FK       | true      | None |\n\nForeign Key Constraints\n\n| Name        | Columns               | Referenced Table  |\n| ----------- | --------------------- | ----------------- |\n| userrole_id | (userrole_id) -> (id) | explorer_userrole |\n| action_id   | (action_id) -> (id)   | explorer_action   |\n\n3. Add URL to **urls.py** file.\n\n```python\nfrom django.urls import include\n\nurlpatterns = [\n    ...\n    path('explorer/', include('explorer.urls'), name='explorer')\n]\n```\n\nAdd **volumes** to database by specifying its name and path. After that define the user roles for specific volume in **user roles** table.\n\n## Run\n\nGo to explorer url **SERVER:PORT/explorer** and explore the volumes.\n\n## Author\n\n**Tahir Rafique**\n\n## Releases\n\n| Date      | Version | Summary                                                      |\n| --------- | ------- | ------------------------------------------------------------ |\n| 12-Jul-23 | v1.6.1  | Adding local bootstrap 4.6.2 files. This will correct the wrong appearance of UI when there is no Internet connection. |\n| 4-Jul-23  | v1.6.0  | Adding file unzip option.                                    |\n| 16-Jun-23 | v1.5.0  | Separating vscode icons from this app.                       |\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Django app to explore directory.",
    "version": "1.6.1",
    "project_urls": null,
    "split_keywords": [
        "explorer",
        "file explorer",
        "directory explorer",
        "django explorer",
        "location explorer"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bc39d4f4ad19d99897195b92334ac1bec15a74eebd8d8823721e3005d2dca77e",
                "md5": "3bcff9012004f3d0840aaf07b7d7bd08",
                "sha256": "fcabb5bc96bc2b394692c7043b0343a3ed6a12190fabdab190200fc9c978a8ce"
            },
            "downloads": -1,
            "filename": "django_file_explorer-1.6.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3bcff9012004f3d0840aaf07b7d7bd08",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 82956,
            "upload_time": "2023-07-12T06:09:03",
            "upload_time_iso_8601": "2023-07-12T06:09:03.865610Z",
            "url": "https://files.pythonhosted.org/packages/bc/39/d4f4ad19d99897195b92334ac1bec15a74eebd8d8823721e3005d2dca77e/django_file_explorer-1.6.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "18f5aa71f6842ee4f5389bd113a5369df4d073903484c14ae82fc982c33e052c",
                "md5": "2150f2bd57a90105fe9b6b84fa91a44e",
                "sha256": "67d42f5fb6ea407bfc53465bffe9c183f36d18f981edd8f228fa5de334562681"
            },
            "downloads": -1,
            "filename": "django-file-explorer-1.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "2150f2bd57a90105fe9b6b84fa91a44e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 69156,
            "upload_time": "2023-07-12T06:09:06",
            "upload_time_iso_8601": "2023-07-12T06:09:06.536561Z",
            "url": "https://files.pythonhosted.org/packages/18/f5/aa71f6842ee4f5389bd113a5369df4d073903484c14ae82fc982c33e052c/django-file-explorer-1.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-12 06:09:06",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "django-file-explorer"
}
        
Elapsed time: 0.11026s