Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit 67662e9

Browse files
authored
Merge pull request #2 from waveaccounting/add-app-label
Add meta app-label
2 parents 47f41ce + 55295bf commit 67662e9

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Change Log
22

3-
## v 0.4.0
3+
## v 0.4.1
44

5+
* Add `meta app_label`
6+
7+
## ~v 0.4.0 - Deprecated~
8+
9+
* *Won't install, does not set `APP_LABEL`*
510
* Supports Django up to Django 1.11.
611
* Breaking change – May not support Django 1.7 (untested). Use v 0.3.7 if necessary.

djangoratings/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os.path
22
import warnings
33

4-
__version__ = (0, 4, 0)
4+
__version__ = (0, 4, 1)
55

66
def _get_git_revision(path):
77
revision_file = os.path.join(path, 'refs', 'heads', 'master')

djangoratings/managers.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ def delete(self, *args, **kwargs):
3030

3131

3232
class VoteManager(Manager):
33+
34+
class Meta:
35+
app_label = 'djangoratings'
36+
3337
def get_query_set(self):
3438
return VoteQuerySet(self.model)
3539

@@ -48,6 +52,10 @@ def get_for_user_in_bulk(self, objects, user):
4852

4953

5054
class SimilarUserManager(Manager):
55+
56+
class Meta:
57+
app_label = 'djangoratings'
58+
5159
def get_recommendations(self, user, model_class, min_score=1):
5260
from djangoratings.models import Vote, IgnoredObject
5361

djangoratings/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class Vote(models.Model):
3333
content_object = GenericForeignKey()
3434

3535
class Meta:
36+
app_label = 'djangoratings'
3637
unique_together = (('content_type', 'object_id', 'key', 'user', 'ip_address', 'cookie'))
3738

3839
def __unicode__(self):
@@ -64,6 +65,7 @@ class Score(models.Model):
6465
content_object = GenericForeignKey()
6566

6667
class Meta:
68+
app_label = 'djangoratings'
6769
unique_together = (('content_type', 'object_id', 'key'),)
6870

6971
def __unicode__(self):
@@ -79,6 +81,7 @@ class SimilarUser(models.Model):
7981
objects = SimilarUserManager()
8082

8183
class Meta:
84+
app_label = 'djangoratings'
8285
unique_together = (('from_user', 'to_user'),)
8386

8487
def __unicode__(self):
@@ -92,6 +95,7 @@ class IgnoredObject(models.Model):
9295
content_object = GenericForeignKey()
9396

9497
class Meta:
98+
app_label = 'djangoratings'
9599
unique_together = (('content_type', 'object_id'),)
96100

97101
def __unicode__(self):

0 commit comments

Comments
 (0)