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.2.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.2-py2.py3-none-any.whl (5.9 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: giant_redirect_import-1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 68ba5dce9f64e432a1e218bcf7a909dcfd3b76c64c6e95cf02ed6432db0c904f
MD5 e8b9044133c256a1797d73a0f6b04294
BLAKE2b-256 c9ae0b754b07ca76e566daa58573b62cbe7236267d7c78fe8c85b8c94252fca6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for giant_redirect_import-1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c5c9cc1739fa100a729a3714362ba161c71b709ff6412042111f492dcaec62ef
MD5 0b0c672fb3726d7d2217255052e08d6a
BLAKE2b-256 c55ff5ea8a000e6b94e4a589c734713dccd9fdd4cdec4852725c402e0007dd9c

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