Compare commits

...

4 Commits

3 changed files with 31 additions and 16 deletions

View File

@ -24,7 +24,7 @@ user.explorer
Currently the explorer profile is used by the abstract model 'Submittable' and has the following realated names/fiels: Currently the explorer profile is used by the abstract model 'Submittable' and has the following realated names/fiels:
- [places](###place) A list containing all (lost) places the user has submitted - [places](###place) A list containing all (lost) places the user has submitted
- [placeimages](###placeimages) A list containing all images relating a place that a user has submitted - [placeimages](###placeimages) A list containing all images relating a place that a user has submitted
- [photoalbums](###photoalbums) A list of all photo albums a explorere has submitted - [externallinks](###externallinks) A list of all photo albums a explorere has submitted
### Taggable ### Taggable
@ -141,15 +141,3 @@ This model represents an URL to an external website. External Link is an PlaceAs
the URL to the target the URL to the target
`label` `label`
the label that is shown on the website the label that is shown on the website
### PhotoAlbum
Loacation: `lostplaces.models.external_link.PhototAlbum`
Import From: `lostplaces.models.PhotoAlbum`
#### Super Classes
- django's `models.Model`
- [lostplaces.models.Submittable](###submittable)
- [lostplaces.models.PlaceAsset](###placeasset)
- [lostplaces.models.ExternalLink](###externallink)
A photo album is a link to an external site that is meant to contain photos of the place it is referenced in. It
does not have any fields, just the ones inherited from it's super class [ExternalLink](###externallink).

View File

@ -0,0 +1,21 @@
# Generated by Django 3.2.7 on 2021-10-02 02:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lostplaces', '0011_remove_migrated_photoalbum_data'),
]
operations = [
migrations.AlterField(
model_name='externallink',
name='linktype',
field=models.CharField(blank=True, choices=[('youtube', 'YouTube'), ('vimeo', 'Vimeo'), ('flickr', 'Flickr'), ('googlephotos', 'Google Photos'), ('photoalbum', 'Photo album')], max_length=20, null=True, verbose_name='link type'),
),
migrations.DeleteModel(
name='PhotoAlbum',
),
]

View File

@ -3,6 +3,14 @@ from django.utils.translation import ugettext_lazy as _
from lostplaces.models.place import PlaceAsset from lostplaces.models.place import PlaceAsset
LINK_TYPES = (
('youtube', 'YouTube'),
('vimeo', "Vimeo"),
('flickr', 'Flickr'),
('googlephotos', "Google Photos"),
('photoalbum', "Photo album")
)
class ExternalLink(PlaceAsset): class ExternalLink(PlaceAsset):
class Meta: class Meta:
@ -17,11 +25,9 @@ class ExternalLink(PlaceAsset):
verbose_name=_('link text') verbose_name=_('link text')
) )
linktype = models.CharField( linktype = models.CharField(
choices=LINK_TYPES,
max_length=20, max_length=20,
verbose_name=_('link type'), verbose_name=_('link type'),
blank=True, blank=True,
null=True null=True
) )
class PhotoAlbum(ExternalLink):
pass