Skip to main content

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

Local setup

From root directory run:

1. $ `poetry shell`
2. $ `poetry install`
3. $ `export DJANGO_SETTINGS_MODULE=example_project.settings`

Then cd into example_project

$ ` django-admin runserver`

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

giant_redirect_import-1.1.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

giant_redirect_import-1.1.1-py2.py3-none-any.whl (5.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file giant_redirect_import-1.1.1.tar.gz.

File metadata

  • Download URL: giant_redirect_import-1.1.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.7.2 Linux/6.8.0-78-generic

File hashes

Hashes for giant_redirect_import-1.1.1.tar.gz
Algorithm Hash digest
SHA256 2c8479d6adb72ad4efa4dc0cfd690d459e74ea3240a8d65ed4b05a037cacdfd5
MD5 9b6e3e7493b31f797589d35e8d7e1c95
BLAKE2b-256 64309e75c446e739f01eefad79872673acf9b6344ad6a3955b3df58c26f473be

See more details on using hashes here.

File details

Details for the file giant_redirect_import-1.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for giant_redirect_import-1.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 59a16805e3932f9728fe4228dcd7d173ef81c7ff147eb2bc88d395e966464bce
MD5 4e9a46e1c24fc63a038c231065a9831e
BLAKE2b-256 270ee1c9337a967f3c757ce31da402bd779c653f6db03705bfb809a5a0a838f9

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