Compare commits
No commits in common. "e0d6d8190702c160b98476955808b7ec73cda835" and "bb119e8636ec034357da95a8d2816a43f12f1260" have entirely different histories.
e0d6d81907
...
bb119e8636
@ -1,11 +1,11 @@
|
|||||||
# Generated by Django 3.1.1 on 2020-09-28 18:39
|
# Generated by Django 3.1.1 on 2020-09-17 18:05
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
import django.core.validators
|
import django.core.validators
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
import easy_thumbnails.fields
|
import easy_thumbnails.fields
|
||||||
import lostplaces.models.place
|
import lostplaces.models
|
||||||
import taggit.managers
|
import taggit.managers
|
||||||
|
|
||||||
|
|
||||||
@ -14,19 +14,11 @@ class Migration(migrations.Migration):
|
|||||||
initial = True
|
initial = True
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
||||||
('taggit', '0003_taggeditem_add_unique_index'),
|
('taggit', '0003_taggeditem_add_unique_index'),
|
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.CreateModel(
|
|
||||||
name='Expireable',
|
|
||||||
fields=[
|
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
||||||
('created_when', models.DateTimeField(auto_now_add=True)),
|
|
||||||
('expires_when', models.DateTimeField()),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Explorer',
|
name='Explorer',
|
||||||
fields=[
|
fields=[
|
||||||
@ -34,6 +26,16 @@ class Migration(migrations.Migration):
|
|||||||
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='explorer', to=settings.AUTH_USER_MODEL)),
|
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='explorer', to=settings.AUTH_USER_MODEL)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='ExternalLink',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('url', models.URLField()),
|
||||||
|
('label', models.CharField(max_length=100)),
|
||||||
|
('submitted_when', models.DateTimeField(auto_now_add=True, null=True)),
|
||||||
|
('submitted_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='external_links', to='lostplaces.explorer')),
|
||||||
|
],
|
||||||
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Place',
|
name='Place',
|
||||||
fields=[
|
fields=[
|
||||||
@ -44,7 +46,7 @@ class Migration(migrations.Migration):
|
|||||||
('submitted_when', models.DateTimeField(auto_now_add=True, null=True)),
|
('submitted_when', models.DateTimeField(auto_now_add=True, null=True)),
|
||||||
('location', models.CharField(max_length=50)),
|
('location', models.CharField(max_length=50)),
|
||||||
('description', models.TextField()),
|
('description', models.TextField()),
|
||||||
('submitted_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='places', to='lostplaces.explorer')),
|
('submitted_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='place', to='lostplaces.explorer')),
|
||||||
('tags', taggit.managers.TaggableManager(blank=True, help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')),
|
('tags', taggit.managers.TaggableManager(blank=True, help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
@ -54,10 +56,11 @@ class Migration(migrations.Migration):
|
|||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Voucher',
|
name='Voucher',
|
||||||
fields=[
|
fields=[
|
||||||
('expireable_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='lostplaces.expireable')),
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
('code', models.CharField(max_length=30, unique=True)),
|
('code', models.CharField(max_length=30, unique=True)),
|
||||||
|
('created_when', models.DateTimeField(auto_now_add=True)),
|
||||||
|
('expires_when', models.DateTimeField()),
|
||||||
],
|
],
|
||||||
bases=('lostplaces.expireable',),
|
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='PlaceImage',
|
name='PlaceImage',
|
||||||
@ -65,9 +68,9 @@ class Migration(migrations.Migration):
|
|||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
('submitted_when', models.DateTimeField(auto_now_add=True, null=True)),
|
('submitted_when', models.DateTimeField(auto_now_add=True, null=True)),
|
||||||
('description', models.TextField(blank=True)),
|
('description', models.TextField(blank=True)),
|
||||||
('filename', easy_thumbnails.fields.ThumbnailerImageField(upload_to=lostplaces.models.place.generate_image_upload_path)),
|
('filename', easy_thumbnails.fields.ThumbnailerImageField(upload_to=lostplaces.models.generate_image_upload_path)),
|
||||||
('place', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='placeimages', to='lostplaces.place')),
|
('place', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='placeimages', to='lostplaces.place')),
|
||||||
('submitted_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='placeimages', to='lostplaces.explorer')),
|
('submitted_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='placeimage', to='lostplaces.explorer')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'abstract': False,
|
'abstract': False,
|
||||||
@ -76,15 +79,9 @@ class Migration(migrations.Migration):
|
|||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='PhotoAlbum',
|
name='PhotoAlbum',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
('externallink_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='lostplaces.externallink')),
|
||||||
('submitted_when', models.DateTimeField(auto_now_add=True, null=True)),
|
('place', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='photo_albums', to='lostplaces.place')),
|
||||||
('url', models.URLField()),
|
|
||||||
('label', models.CharField(max_length=100)),
|
|
||||||
('place', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='photoalbums', to='lostplaces.place')),
|
|
||||||
('submitted_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='photoalbums', to='lostplaces.explorer')),
|
|
||||||
],
|
],
|
||||||
options={
|
bases=('lostplaces.externallink',),
|
||||||
'abstract': False,
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
9067
django_lostplaces/testdata/testdata.json
vendored
9067
django_lostplaces/testdata/testdata.json
vendored
File diff suppressed because it is too large
Load Diff
5
django_lostplaces/testdata/testdata.md
vendored
5
django_lostplaces/testdata/testdata.md
vendored
@ -1,7 +1,5 @@
|
|||||||
# testdata
|
# testdata
|
||||||
|
|
||||||
This testdata is provided for you to see the database filled with some dummycontent.
|
|
||||||
|
|
||||||
## Database content
|
## Database content
|
||||||
testdata is provided in this repository / directory in testdata.json. It has been
|
testdata is provided in this repository / directory in testdata.json. It has been
|
||||||
dumped using:
|
dumped using:
|
||||||
@ -10,8 +8,7 @@ dumped using:
|
|||||||
manage.py dumpdata --all --exclude=auth --exclude=sessions --indent 4 --o testdata/testdata.json
|
manage.py dumpdata --all --exclude=auth --exclude=sessions --indent 4 --o testdata/testdata.json
|
||||||
```
|
```
|
||||||
|
|
||||||
To successfully import this testdata, you have to create 2 users. ID=1 is your normal superuser, ID=2 is an unprivileged user.
|
You can import it using
|
||||||
You can import it using:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
manage.py loaddata testdata.json
|
manage.py loaddata testdata.json
|
||||||
|
Loading…
Reference in New Issue
Block a user