Skip to content

vera 1.0 beta 2

Pre-release
Pre-release
Compare
Choose a tag to compare
@sheppard sheppard released this 08 Nov 22:04
· 15 commits to master since this release

vera 1.0 beta 2 brings a project reorganization to work around issues with swappable models and migrations (see openwisp/django-swappable-models#12). The models have been grouped into three apps without default migrations. Once you have determined which models you want to override (if any), run ./manage.py makemigrations to have the appropriate vera migrations generated for you.

The models have been renamed as follows:

Old Name New App New Name Notes
vera.Site vera.params params.Site BaseSite is now an IdentifiedModel.
vera.ReportType vera.params params.ReportType
vera.Parameter vera.params params.Parameter
vera.Event vera.series series.Event
vera.Report vera.series series.Report
vera.Result vera.results results.Result A new ValueValidator automatically checks Parameter.is_numeric
vera.EventResult vera.results results.EventResult

The old models (and their base implementations) can be accessed from vera.base_models:

from vera.base_models import BaseSite
class MySite(BaseSite)
   # ...

# settings.py
WQ_SITE_MODEL = "myapp.MySite"

The vera.models module now serves as a shortcut to access the currently active version of each of the seven models.

from vera.models import Site
from myapp.models import MySite
assert(Site == MySite)

Be sure to update your settings:

 INSTALLED_APPS = (
-    "vera",
+    "vera.params",
+    "vera.series",
+    "vera.results",
 )