Reusable package which adds an option to bulk import redirects from a csv file
Project description
Giant Redirect Import
A re-usable package which can be used in any project that requires a Redirect import via a CSV file.
This will include a basic form to upload a CSV file in the standard Redirect
app supplied via django.
Installation
To install with the package manager, run:
$ poetry add giant-redirect-import
You should then add "giant_redirect_import"
to the INSTALLED_APPS
in your settings file, this MUST be directly above django.contrib.redirects
.
In base.py
there should also be a REDIRECT_IMPORT_DEFAULT_SITE_ID
.
Configuration
This application exposes the following settings:
REDIRECT_IMPORT_DEFAULT_SITE_ID
is the default site id used when importing and creating the redirects, this is usually the same as the SITE_ID.
Preparing for release
In order to prep the package for a new release on TestPyPi and PyPi there is one key thing that you need to do. You need to update the version number in the pyproject.toml
.
This is so that the package can be published without running into version number conflicts. The version numbering must also follow the Semantic Version rules which can be found here https://semver.org/.
Publishing
Publishing a package with poetry is incredibly easy. Once you have checked that the version number has been updated (not the same as a previous version) then you only need to run two commands.
$ `poetry build`
will package the project up for you into a way that can be published.
$ `poetry publish`
will publish the package to PyPi. You will need to enter the username and password for the account which can be found in the company password manager
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
Built Distribution
File details
Details for the file giant_redirect_import-0.8.tar.gz
.
File metadata
- Download URL: giant_redirect_import-0.8.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.12.0 Darwin/23.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3803c5d3777eeef3374814054f5d5151c6f15e4d4d10a845df7bfb1397d2e4ea |
|
MD5 | ad150461658120a83e69a9d7cc0e9480 |
|
BLAKE2b-256 | 7ea9985e303837fd8f7be37e9ce065e8bb9d11792e3533c2f748284fadf5c599 |
File details
Details for the file giant_redirect_import-0.8-py3-none-any.whl
.
File metadata
- Download URL: giant_redirect_import-0.8-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.12.0 Darwin/23.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5ef0f8bdf1fdd9e1418ba4ff4ecb7481fb37198ad15f29d32480b59e001d56b |
|
MD5 | 3f95579fea495ac1a4fd13d4bf219cb8 |
|
BLAKE2b-256 | f4786f7a79c34251879bbd5fe6d99e4fe32a9691524c1df413fac99cb7b185eb |