Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tobias Lorenz
committed
Apr 12, 2016
1 parent
1cc1f5a
commit 159830f
Showing
16 changed files
with
183 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
*.egg-info/ | ||
*.pyc | ||
*coverage/ | ||
.tox/ | ||
.coverage | ||
app_media/ | ||
app_static/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
=== (ongoing) === | ||
|
||
- prepared app for Python 3.5 | ||
|
||
=== 1.9.3 === | ||
|
||
- prepared app for Django 1.9 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Django Review | ||
============ | ||
============= | ||
|
||
A reusable Django app that lets users write reviews for any model | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,5 @@ | ||
django | ||
django-nose | ||
coverage | ||
django-coverage | ||
ipdb | ||
flake8 | ||
fabric | ||
mixer | ||
mock | ||
django-user-media | ||
django-hvad | ||
Pillow | ||
django-libs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.9.5 on 2016-04-12 15:03 | ||
from __future__ import unicode_literals | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('contenttypes', '0002_remove_content_type_name'), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Rating', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('value', models.CharField(blank=True, choices=[(b'5', b'5'), (b'4', b'4'), (b'3', b'3'), (b'2', b'2'), (b'1', b'1')], max_length=20, null=True, verbose_name='Value')), | ||
], | ||
options={ | ||
'ordering': ['category', 'review'], | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='RatingCategory', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('identifier', models.SlugField(blank=True, max_length=32, verbose_name='Identifier')), | ||
('counts_for_average', models.BooleanField(default=True, verbose_name='Counts for average rating')), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='RatingCategoryChoice', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('value', models.CharField(blank=True, max_length=20, null=True, verbose_name='Value')), | ||
('ratingcategory', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='choices', to='review.RatingCategory', verbose_name='Rating category')), | ||
], | ||
options={ | ||
'ordering': ('-value',), | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='RatingCategoryChoiceTranslation', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('label', models.CharField(max_length=128, verbose_name='Label')), | ||
('language_code', models.CharField(db_index=True, max_length=15)), | ||
('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='review.RatingCategoryChoice')), | ||
], | ||
options={ | ||
'managed': True, | ||
'abstract': False, | ||
'db_table': 'review_ratingcategorychoice_translation', | ||
'db_tablespace': '', | ||
'default_permissions': (), | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='RatingCategoryTranslation', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=256)), | ||
('question', models.CharField(blank=True, max_length=512, null=True)), | ||
('language_code', models.CharField(db_index=True, max_length=15)), | ||
('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='review.RatingCategory')), | ||
], | ||
options={ | ||
'managed': True, | ||
'abstract': False, | ||
'db_table': 'review_ratingcategory_translation', | ||
'db_tablespace': '', | ||
'default_permissions': (), | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Review', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('object_id', models.PositiveIntegerField()), | ||
('content', models.TextField(blank=True, max_length=1024, verbose_name='Content')), | ||
('language', models.CharField(blank=True, max_length=5, verbose_name='Language')), | ||
('creation_date', models.DateTimeField(auto_now_add=True, verbose_name='Creation date')), | ||
('average_rating', models.FloatField(default=0, verbose_name='Average rating')), | ||
('extra_object_id', models.PositiveIntegerField(blank=True, null=True)), | ||
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')), | ||
('extra_content_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='reviews_attached', to='contenttypes.ContentType')), | ||
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User')), | ||
], | ||
options={ | ||
'ordering': ['-creation_date'], | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='ReviewExtraInfo', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('type', models.CharField(max_length=256, verbose_name='Type')), | ||
('object_id', models.PositiveIntegerField()), | ||
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')), | ||
('review', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='review.Review', verbose_name='Review')), | ||
], | ||
options={ | ||
'ordering': ['type'], | ||
}, | ||
), | ||
migrations.AddField( | ||
model_name='rating', | ||
name='category', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='review.RatingCategory', verbose_name='Category'), | ||
), | ||
migrations.AddField( | ||
model_name='rating', | ||
name='review', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ratings', to='review.Review', verbose_name='Review'), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name='ratingcategorytranslation', | ||
unique_together=set([('language_code', 'master')]), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name='ratingcategorychoicetranslation', | ||
unique_together=set([('language_code', 'master')]), | ||
), | ||
] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
fabric3 | ||
mixer | ||
mock | ||
coverage | ||
django-coverage | ||
ipdb | ||
flake8 | ||
tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[tox] | ||
envlist = py27-django{18,19},py35-django19 | ||
|
||
[testenv] | ||
usedevelop = True | ||
deps = | ||
django18: Django>=1.8,<1.9 | ||
django19: Django>=1.9,<1.10 | ||
-rtest_requirements.txt | ||
commands = python runtests.py |