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

Uploaded Python 3

File details

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

File metadata

  • Download URL: giant_redirect_import-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.tar.gz
Algorithm Hash digest
SHA256 705e5578495f3e8cf24a312fb08a4c24b410fe86307aa1e2ce85b5a4c7e27579
MD5 958b41146ed7e09f9db130ac56b12122
BLAKE2b-256 587b11a79f46ccec97f2a5e8f05fb7d9ba919410fbe757c1eb79d939e362bb9e

See more details on using hashes here.

File details

Details for the file giant_redirect_import-1.1-py3-none-any.whl.

File metadata

  • Download URL: giant_redirect_import-1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • 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-py3-none-any.whl
Algorithm Hash digest
SHA256 6136ddbec4cd25399dbc71c97af7a1adf9827043016e3013f781ef1e28c24aca
MD5 13eca5f1311bf06952ffc6bcce1ba81c
BLAKE2b-256 43c1488a4cc9b43d8e180de63bd9ac2c89a43ba5224720ec73b488b1fdef3b54

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