diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2019-08-23 23:24:50 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2019-08-26 21:34:10 +0200 |
commit | c4c6ab0e925d8cfabb68d34a10a783cb854b63a0 (patch) | |
tree | 84895b9dd586594c380668875ede00ba4b8a928a /tests/django_test_app/models.py | |
parent | 5b9174aedaf9843ee5b3b6358461910e328e74d1 (diff) | |
download | semantic-version-c4c6ab0e925d8cfabb68d34a10a783cb854b63a0.tar.gz |
Add support for NPM-style version ranges.
The code follows closely the specification available at
https://docs.npmjs.com/misc/semver.html.
Despite similarities, the matching logic is fully separate from the
`native` code, since both might evolve at their own scales.
Diffstat (limited to 'tests/django_test_app/models.py')
-rw-r--r-- | tests/django_test_app/models.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/django_test_app/models.py b/tests/django_test_app/models.py index 3a43cfc..5f790b4 100644 --- a/tests/django_test_app/models.py +++ b/tests/django_test_app/models.py @@ -14,6 +14,7 @@ if django_loaded: class VersionModel(models.Model): version = semver_fields.VersionField(verbose_name='my version') spec = semver_fields.SpecField(verbose_name='my spec') + npm_spec = semver_fields.SpecField(syntax='npm', blank=True, verbose_name='npm spec') class PartialVersionModel(models.Model): partial = semver_fields.VersionField(partial=True, verbose_name='partial version') |