mirror of
https://github.com/fergalmoran/dss.api.git
synced 2026-02-21 15:14:04 +00:00
Update to django 1.8
This commit is contained in:
@@ -104,6 +104,15 @@ INSTALLED_APPS = (
|
||||
#'django_facebook',
|
||||
'django_extensions',
|
||||
'django_gravatar',
|
||||
|
||||
# TODO: remove
|
||||
'allauth',
|
||||
'allauth.account',
|
||||
'allauth.socialaccount',
|
||||
'allauth.socialaccount.providers.facebook',
|
||||
'allauth.socialaccount.providers.google',
|
||||
'allauth.socialaccount.providers.twitter',
|
||||
|
||||
'corsheaders',
|
||||
'sorl.thumbnail',
|
||||
'djcelery',
|
||||
@@ -111,19 +120,11 @@ INSTALLED_APPS = (
|
||||
'gunicorn',
|
||||
'spa.signals',
|
||||
'core',
|
||||
#'schedule',
|
||||
'django_user_agents',
|
||||
'storages',
|
||||
'social.apps.django_app.default',
|
||||
|
||||
# TODO: remove
|
||||
'allauth',
|
||||
'allauth.account',
|
||||
'allauth.socialaccount',
|
||||
'allauth.socialaccount.providers.facebook',
|
||||
'allauth.socialaccount.providers.google',
|
||||
'allauth.socialaccount.providers.twitter',
|
||||
'south',
|
||||
|
||||
|
||||
'dbbackup',
|
||||
'djrill',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Django==1.6.11
|
||||
Django==1.8.4
|
||||
django-extensions
|
||||
django-sendfile
|
||||
Werkzeug
|
||||
@@ -15,7 +15,6 @@ django-grappelli==2.5.7
|
||||
django-model_utils
|
||||
django-dbbackup
|
||||
django-user-agents
|
||||
south
|
||||
redis
|
||||
django-celery
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from django.db import models
|
||||
from django.db.models.loading import get_model
|
||||
from basemodel import BaseModel
|
||||
|
||||
|
||||
class _Lookup(BaseModel):
|
||||
description = models.CharField(max_length=100)
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ from dss import localsettings, settings
|
||||
class BaseModel(models.Model):
|
||||
logger = logging.getLogger('dss')
|
||||
|
||||
object_created = models.DateTimeField(auto_now_add=True, default=datetime.now())
|
||||
object_updated = models.DateTimeField(auto_now=True, default=datetime.now(), db_index=True)
|
||||
object_created = models.DateTimeField(auto_now_add=True)
|
||||
object_updated = models.DateTimeField(auto_now=True, db_index=True)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
@@ -14,7 +14,7 @@ class Comment(BaseModel):
|
||||
comment = models.CharField(max_length=1024)
|
||||
date_created = models.DateTimeField(auto_now_add=True)
|
||||
time_index = models.IntegerField(default=0)
|
||||
likes = models.ManyToManyField(UserProfile, related_name='liked_comments', blank=True, null=True)
|
||||
likes = models.ManyToManyField(UserProfile, related_name='liked_comments', blank=True)
|
||||
|
||||
def get_absolute_url(self):
|
||||
return '/comment/%i' % self.id
|
||||
|
||||
@@ -90,8 +90,8 @@ class Mix(BaseModel):
|
||||
genres = models.ManyToManyField(Genre)
|
||||
|
||||
# activity based stuff
|
||||
favourites = models.ManyToManyField(UserProfile, related_name='favourites', blank=True, null=True)
|
||||
likes = models.ManyToManyField(UserProfile, related_name='likes', blank=True, null=True)
|
||||
favourites = models.ManyToManyField(UserProfile, related_name='favourites', blank=True)
|
||||
likes = models.ManyToManyField(UserProfile, related_name='likes', blank=True)
|
||||
|
||||
def __unicode__(self):
|
||||
return self.title
|
||||
|
||||
@@ -21,7 +21,7 @@ class Release(BaseModel):
|
||||
release_description = models.TextField()
|
||||
release_image = models.ImageField(blank=True, upload_to=release_image_name)
|
||||
release_label = models.ForeignKey(Label)
|
||||
release_date = models.DateField(default=datetime.now())
|
||||
release_date = models.DateField(auto_now=True)
|
||||
|
||||
embed_code = models.TextField(blank=True)
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ class UserProfile(BaseModel):
|
||||
activity_sharing_twitter = BitField(flags=NOTIFICATION_CHOICES, default=0)
|
||||
email_notifications = BitField(flags=NOTIFICATION_CHOICES, default=0)
|
||||
|
||||
following = models.ManyToManyField('self', null=True, blank=True, symmetrical=False, related_name='followers')
|
||||
following = models.ManyToManyField('self', blank=True, symmetrical=False, related_name='followers')
|
||||
|
||||
# location properties
|
||||
city = models.CharField(max_length=100, blank=True, null=True)
|
||||
|
||||
Reference in New Issue
Block a user