Files
deb-python-semantic-version/docs/django.rst
Raphaël Barrois 5550834eae Normalize docs to docs/ (Closes #5).
Also normalize the package layout.

Thanks @jdowner-gb & tleach for the report.
2013-12-23 20:48:57 +01:00

928 B

Interaction with Django

semantic_version.django_fields

The python-semanticversion package provides two custom fields for Django:

  • VersionField: stores a semantic_version.Version object
  • SpecField: stores a semantic_version.Spec object

Those fields are django.db.models.CharField subclasses, with their ~django.db.models.CharField.max_length defaulting to 200.

Stores a semantic_version.Version as its string representation.

partial

Boolean; whether ~semantic_version.Version.partial versions are allowed.

coerce

Boolean; whether passed in values should be coerced into a semver string before storing.

Stores a semantic_version.Spec as its comma-separated string representation.