Skip to main content

A DB Independent Custom Django Field for storing Version numbers for fast indexing

Project description

django-versionfield

PyPI version PyPi downloads

Installation

  • Install django-versionfield
	pip install django-versionfield
  • Add to INSTALLED_APPS
    INSTALLED_APPS = [ 
    ...
    'versionfield',
    ...    
    ]   

Usage:

    from versionfield import VersionField

    class SomeModel(models.Model):
        version = VersionField()

Sample Queries:

    SomeModel.objects.filter(version__gt="1.0.0")
    SomeModel.objects.filter(version__gt="1.0")

Widget

    from versionfield.widgets import VersionWidget
    
    class SomeForm(ModelForm):
        some_field = VersionField(widget = VersionWidget)

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

django-versionfield-1.0.3.tar.gz (411.3 kB view hashes)

Uploaded Source

Built Distribution

django_versionfield-1.0.3-py3-none-any.whl (414.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page