Skip to main content

Django URL or Relative URL Field

This package extends default Django URLField to support relative URLs.

Installation

  1. Install the python package django-url-or-relative-url-field from pip:

    pip install django-url-or-relative-url-field

    Alternatively, you can install download or clone this repo and call pip install -e ..

  2. Add to INSTALLED_APPS in your settings.py:

    'url_or_relative_url_field',

Usage

Add field to the model:

from django.db import models
from url_or_relative_url_field.fields import URLOrRelativeURLField

class Redirect(models.Model):
   url = URLOrRelativeURLField()

Now your model will accept both absolute and relative URLs into the url field.

Metadata

Release files for django-url-or-relative-url-field 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-url-or-relative-url-field 0.2.0
File Size Uploaded
django-url-or-relative-url-field-0.2.0.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-url-or-relative-url-field 0.2.0
File Interpreter ABI Platform
django_url_or_relative_url_field-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.8 kB

Release files / django-url-or-relative-url-field-0.2.0.tar.gz

Download URL django-url-or-relative-url-field-0.2.0.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
aa28b5a7f11b132b1714ac609f981f9ec664e495ecbfa13c6adda1ab8ae88464
BLAKE2b-256 checksum
How to use checksums
3fec2b7f2ec6de479a56672310b06ab7cf5d66964a3d3de9c797cc05441129eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.7 Darwin/21.1.0

Release files / django_url_or_relative_url_field-0.2.0-py3-none-any.whl

Download URL django_url_or_relative_url_field-0.2.0-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42a26d04afdd079fb5b5d3a0adadaf748916d7a5865d383a29fb16a42070b8b1
BLAKE2b-256 checksum
How to use checksums
6dfefefbd05c0d6c3351886d4c67b41969faf79c3f479d3419754cc607630e7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.7 Darwin/21.1.0

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page