Skip to content
Snippets Groups Projects
Verified Commit 2b2da223 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

Merge branch 'extract-conflict-resolution'

parents 82eee15d fbe1004f
No related branches found
No related tags found
No related merge requests found
Pipeline #3146 failed
Showing
with 363 additions and 513 deletions
...@@ -3,5 +3,6 @@ db.sqlite3 ...@@ -3,5 +3,6 @@ db.sqlite3
.mypy_cache .mypy_cache
*.pyc *.pyc
.pytest_cache .pytest_cache
.cache/
static/ static/
steering_data_model.png steering_data_model.png
...@@ -9,7 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -9,7 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- ... - `Image` concrete model to handle all instances.
- API endpoint `/api/v1/images/` to add, update and delete images.
### Changed ### Changed
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
"pk": 1, "pk": 1,
"fields": { "fields": {
"name": "Interkulturell", "name": "Interkulturell",
"abbrev": "I",
"slug": "interkulturell", "slug": "interkulturell",
"is_active": true, "is_active": true,
"description": "" "description": ""
...@@ -15,7 +14,6 @@ ...@@ -15,7 +14,6 @@
"pk": 2, "pk": 2,
"fields": { "fields": {
"name": "Lokalbezug", "name": "Lokalbezug",
"abbrev": "L",
"slug": "lokalbezug", "slug": "lokalbezug",
"is_active": true, "is_active": true,
"description": "" "description": ""
...@@ -26,7 +24,6 @@ ...@@ -26,7 +24,6 @@
"pk": 3, "pk": 3,
"fields": { "fields": {
"name": "Minderheiten", "name": "Minderheiten",
"abbrev": "Mi",
"slug": "minderheiten", "slug": "minderheiten",
"is_active": true, "is_active": true,
"description": "" "description": ""
...@@ -37,7 +34,6 @@ ...@@ -37,7 +34,6 @@
"pk": 4, "pk": 4,
"fields": { "fields": {
"name": "Wiederholung", "name": "Wiederholung",
"abbrev": "W",
"slug": "wiederholung", "slug": "wiederholung",
"is_active": true, "is_active": true,
"description": "" "description": ""
...@@ -48,7 +44,6 @@ ...@@ -48,7 +44,6 @@
"pk": 5, "pk": 5,
"fields": { "fields": {
"name": "Mehr-/Fremdsprachig", "name": "Mehr-/Fremdsprachig",
"abbrev": "M",
"slug": "mehr-fremdsprachig", "slug": "mehr-fremdsprachig",
"is_active": true, "is_active": true,
"description": "" "description": ""
...@@ -59,7 +54,6 @@ ...@@ -59,7 +54,6 @@
"pk": 6, "pk": 6,
"fields": { "fields": {
"name": "Frauenschwerpunkt", "name": "Frauenschwerpunkt",
"abbrev": "F",
"slug": "frauenschwerpunkt", "slug": "frauenschwerpunkt",
"is_active": true, "is_active": true,
"description": "" "description": ""
...@@ -70,7 +64,6 @@ ...@@ -70,7 +64,6 @@
"pk": 7, "pk": 7,
"fields": { "fields": {
"name": "Österreichische Musik", "name": "Österreichische Musik",
"abbrev": "Ö",
"slug": "osterreichische-musik", "slug": "osterreichische-musik",
"is_active": true, "is_active": true,
"description": "" "description": ""
...@@ -81,7 +74,6 @@ ...@@ -81,7 +74,6 @@
"pk": 8, "pk": 8,
"fields": { "fields": {
"name": "Sendungsübernahme", "name": "Sendungsübernahme",
"abbrev": "U",
"slug": "sendungsubernahme", "slug": "sendungsubernahme",
"is_active": true, "is_active": true,
"description": "" "description": ""
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
"pk": 1, "pk": 1,
"fields": { "fields": {
"name": "Standard", "name": "Standard",
"abbrev": "S",
"slug": "standard", "slug": "standard",
"is_active": true "is_active": true
} }
......
...@@ -6,12 +6,10 @@ ...@@ -6,12 +6,10 @@
"name": "Musikredaktion", "name": "Musikredaktion",
"is_active": true, "is_active": true,
"email": "", "email": "",
"website": "",
"biography": null, "biography": null,
"ppoi": "0.5x0.5", "image": null,
"height": null, "created_at": "2000-06-01 00:00Z",
"width": null, "created_by": "loaddata"
"image": ""
} }
} }
] ]
[
{
"model": "program.licensetype",
"pk": 1,
"fields": {
"name": "pd",
"type": "Public Domain"
}
},
{
"model": "program.licensetype",
"pk": 2,
"fields": {
"name": "cc-by",
"type": "Creative Commons Attribution"
}
},
{
"model": "program.licensetype",
"pk": 3,
"fields": {
"name": "cc-by-sa",
"type": "Creative Commons Attribution-ShareAlike"
}
},
{
"model": "program.licensetype",
"pk": 4,
"fields": {
"name": "cc-by-nc",
"type": "Creative Commons Attribution-NonCommercial"
}
},
{
"model": "program.licensetype",
"pk": 5,
"fields": {
"name": "cc-by-nc-sa",
"type": "Creative Commons Attribution-NonCommercial-ShareAlike"
}
},
{
"model": "program.licensetype",
"pk": 6,
"fields": {
"name": "cc-by-nd",
"type": "Creative Commons Attribution-NoDerivatives"
}
},
{
"model": "program.licensetype",
"pk": 7,
"fields": {
"name": "cc-by-nc-nd",
"type": "Creative Commons Attribution-NonCommercial-NoDerivatives"
}
},
{
"model": "program.licensetype",
"pk": 8,
"fields": {
"name": "gfdl",
"type": "GNU Free Documentation License"
}
}
]
\ No newline at end of file
[
{
"model": "program.linktype",
"pk": 1,
"fields": {
"name": "homepage",
"type": "Homepage"
}
},
{
"model": "program.linktype",
"pk": 2,
"fields": {
"name": "website",
"type": "Website"
}
},
{
"model": "program.linktype",
"pk": 3,
"fields": {
"name": "cba-podcast",
"type": "Cultural Broadcasting Archive Podcast"
}
},
{
"model": "program.linktype",
"pk": 4,
"fields": {
"name": "cba-post",
"type": "Cultural Broadcasting Archive Post"
}
},
{
"model": "program.linktype",
"pk": 5,
"fields": {
"name": "soundcloud",
"type": "SoundCloud"
}
}
]
\ No newline at end of file
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
"pk": 1, "pk": 1,
"fields": { "fields": {
"name": "Jazz", "name": "Jazz",
"abbrev": "J",
"slug": "jazz", "slug": "jazz",
"is_active": true "is_active": true
} }
...@@ -14,7 +13,6 @@ ...@@ -14,7 +13,6 @@
"pk": 2, "pk": 2,
"fields": { "fields": {
"name": "Volksmusik/Folk", "name": "Volksmusik/Folk",
"abbrev": "V",
"slug": "volksmusik-folk", "slug": "volksmusik-folk",
"is_active": true "is_active": true
} }
...@@ -24,7 +22,6 @@ ...@@ -24,7 +22,6 @@
"pk": 3, "pk": 3,
"fields": { "fields": {
"name": "Experimentelle Musik", "name": "Experimentelle Musik",
"abbrev": "Ex",
"slug": "expermentelle-musik", "slug": "expermentelle-musik",
"is_active": true "is_active": true
} }
...@@ -34,7 +31,6 @@ ...@@ -34,7 +31,6 @@
"pk": 4, "pk": 4,
"fields": { "fields": {
"name": "Rock/Indie", "name": "Rock/Indie",
"abbrev": "R",
"slug": "rock-indie", "slug": "rock-indie",
"is_active": true "is_active": true
} }
...@@ -44,7 +40,6 @@ ...@@ -44,7 +40,6 @@
"pk": 5, "pk": 5,
"fields": { "fields": {
"name": "Metal/Hardrock", "name": "Metal/Hardrock",
"abbrev": "M",
"slug": "metal-hardrock", "slug": "metal-hardrock",
"is_active": true "is_active": true
} }
...@@ -54,7 +49,6 @@ ...@@ -54,7 +49,6 @@
"pk": 6, "pk": 6,
"fields": { "fields": {
"name": "Electronic", "name": "Electronic",
"abbrev": "E",
"slug": "electronic", "slug": "electronic",
"is_active": true "is_active": true
} }
...@@ -64,7 +58,6 @@ ...@@ -64,7 +58,6 @@
"pk": 7, "pk": 7,
"fields": { "fields": {
"name": "Klassik", "name": "Klassik",
"abbrev": "K",
"slug": "klassik", "slug": "klassik",
"is_active": true "is_active": true
} }
...@@ -74,7 +67,6 @@ ...@@ -74,7 +67,6 @@
"pk": 8, "pk": 8,
"fields": { "fields": {
"name": "Oldies", "name": "Oldies",
"abbrev": "O",
"slug": "oldies", "slug": "oldies",
"is_active": true "is_active": true
} }
...@@ -84,7 +76,6 @@ ...@@ -84,7 +76,6 @@
"pk": 9, "pk": 9,
"fields": { "fields": {
"name": "Reggae/Ska", "name": "Reggae/Ska",
"abbrev": "Re",
"slug": "reggae-ska", "slug": "reggae-ska",
"is_active": true "is_active": true
} }
...@@ -94,7 +85,6 @@ ...@@ -94,7 +85,6 @@
"pk": 10, "pk": 10,
"fields": { "fields": {
"name": "Hiphop", "name": "Hiphop",
"abbrev": "H",
"slug": "hiphop", "slug": "hiphop",
"is_active": true "is_active": true
} }
......
...@@ -130,5 +130,245 @@ ...@@ -130,5 +130,245 @@
"by_weekdays": null, "by_weekdays": null,
"count": null "count": null
} }
},
{
"model": "program.rrule",
"pk": 110,
"fields": {
"name": "monatlich am letzten",
"freq": 1,
"interval": 1,
"by_set_pos": -1,
"by_weekdays": null,
"count": null
}
},
{
"model": "program.rrule",
"pk": 120,
"fields": {
"name": "zwei-monatlich am letzten",
"freq": 1,
"interval": 2,
"by_set_pos": -1,
"by_weekdays": null,
"count": null
}
},
{
"model": "program.rrule",
"pk": 121,
"fields": {
"name": "zwei-monatlich am ersten",
"freq": 1,
"interval": 2,
"by_set_pos": 1,
"by_weekdays": null,
"count": null
}
},
{
"model": "program.rrule",
"pk": 122,
"fields": {
"name": "zwei-monatlich am zweiten",
"freq": 1,
"interval": 2,
"by_set_pos": 2,
"by_weekdays": null,
"count": null
}
},
{
"model": "program.rrule",
"pk": 123,
"fields": {
"name": "zwei-monatlich am dritten",
"freq": 1,
"interval": 2,
"by_set_pos": 3,
"by_weekdays": null,
"count": null
}
},
{
"model": "program.rrule",
"pk": 124,
"fields": {
"name": "zwei-monatlich am vierten",
"freq": 1,
"interval": 2,
"by_set_pos": 4,
"by_weekdays": null,
"count": null
}
},
{
"model": "program.rrule",
"pk": 125,
"fields": {
"name": "zwei-monatlich am fünften",
"freq": 1,
"interval": 2,
"by_set_pos": 5,
"by_weekdays": null,
"count": null
}
},
{
"model": "program.rrule",
"pk": 130,
"fields": {
"name": "drei-monatlich am letzten",
"freq": 1,
"interval": 3,
"by_set_pos": -1,
"by_weekdays": null,
"count": null
}
},
{
"model": "program.rrule",
"pk": 131,
"fields": {
"name": "drei-monatlich am ersten",
"freq": 1,
"interval": 3,
"by_set_pos": 1,
"by_weekdays": null,
"count": null
}
},
{
"model": "program.rrule",
"pk": 132,
"fields": {
"name": "drei-monatlich am zweiten",
"freq": 1,
"interval": 3,
"by_set_pos": 2,
"by_weekdays": null,
"count": null
}
},
{
"model": "program.rrule",
"pk": 133,
"fields": {
"name": "drei-monatlich am dritten",
"freq": 1,
"interval": 3,
"by_set_pos": 3,
"by_weekdays": null,
"count": null
}
},
{
"model": "program.rrule",
"pk": 134,
"fields": {
"name": "drei-monatlich am vierten",
"freq": 1,
"interval": 3,
"by_set_pos": 4,
"by_weekdays": null,
"count": null
}
},
{
"model": "program.rrule",
"pk": 135,
"fields": {
"name": "drei-monatlich am fünften",
"freq": 1,
"interval": 3,
"by_set_pos": 5,
"by_weekdays": null,
"count": null
}
},
{
"model": "program.rrule",
"pk": 140,
"fields": {
"name": "vier-monatlich am letzten",
"freq": 1,
"interval": 4,
"by_set_pos": -1,
"by_weekdays": null,
"count": null
}
},
{
"model": "program.rrule",
"pk": 141,
"fields": {
"name": "vier-monatlich am ersten",
"freq": 1,
"interval": 4,
"by_set_pos": 1,
"by_weekdays": null,
"count": null
}
},
{
"model": "program.rrule",
"pk": 142,
"fields": {
"name": "vier-monatlich am zweiten",
"freq": 1,
"interval": 4,
"by_set_pos": 2,
"by_weekdays": null,
"count": null
}
},
{
"model": "program.rrule",
"pk": 143,
"fields": {
"name": "vier-monatlich am dritten",
"freq": 1,
"interval": 4,
"by_set_pos": 3,
"by_weekdays": null,
"count": null
}
},
{
"model": "program.rrule",
"pk": 144,
"fields": {
"name": "vier-monatlich am vierten",
"freq": 1,
"interval": 4,
"by_set_pos": 4,
"by_weekdays": null,
"count": null
}
},
{
"model": "program.rrule",
"pk": 145,
"fields": {
"name": "vier-monatlich am fünften",
"freq": 1,
"interval": 4,
"by_set_pos": 5,
"by_weekdays": null,
"count": null
}
},
{
"model": "program.rrule",
"pk": 2111,
"fields": {
"name": "am Wochenende",
"freq": 2,
"interval": 1,
"by_set_pos": null,
"by_weekdays": "5,6",
"count": null
}
} }
] ]
...@@ -8,15 +8,11 @@ ...@@ -8,15 +8,11 @@
"funding_category": 1, "funding_category": 1,
"name": "Musikprogramm", "name": "Musikprogramm",
"slug": "musikprogramm", "slug": "musikprogramm",
"ppoi": "0.5x0.5", "image": null,
"height": null, "logo": null,
"width": null,
"image": "",
"logo": "",
"short_description": "Unmoderiertes Musikprogramm", "short_description": "Unmoderiertes Musikprogramm",
"description": "Unmoderiertes Musikprogramm", "description": "Unmoderiertes Musikprogramm",
"email": "musikredaktion@helsinki.at", "email": "musikredaktion@helsinki.at",
"website": null,
"cba_series_id": null, "cba_series_id": null,
"default_playlist_id": null, "default_playlist_id": null,
"is_active": true, "is_active": true,
...@@ -28,7 +24,9 @@ ...@@ -28,7 +24,9 @@
"language": [], "language": [],
"category": [], "category": [],
"topic": [], "topic": [],
"music_focus": [] "music_focus": [],
"created_at": "2000-06-01 00:00Z",
"created_by": "loaddata"
} }
} }
] ]
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
"pk": 1, "pk": 1,
"fields": { "fields": {
"name": "Politik/Gesellschaft", "name": "Politik/Gesellschaft",
"abbrev": "P",
"slug": "politik-gesellschaft", "slug": "politik-gesellschaft",
"is_active": true "is_active": true
} }
...@@ -14,7 +13,6 @@ ...@@ -14,7 +13,6 @@
"pk": 2, "pk": 2,
"fields": { "fields": {
"name": "Natur/Klima/Tiere", "name": "Natur/Klima/Tiere",
"abbrev": "N",
"slug": "natur-klima-tiere", "slug": "natur-klima-tiere",
"is_active": true "is_active": true
} }
...@@ -24,7 +22,6 @@ ...@@ -24,7 +22,6 @@
"pk": 3, "pk": 3,
"fields": { "fields": {
"name": "Kultur/Kunst", "name": "Kultur/Kunst",
"abbrev": "K",
"slug": "kultur-kunst", "slug": "kultur-kunst",
"is_active": true "is_active": true
} }
...@@ -34,7 +31,6 @@ ...@@ -34,7 +31,6 @@
"pk": 4, "pk": 4,
"fields": { "fields": {
"name": "Soziales", "name": "Soziales",
"abbrev": "S",
"slug": "soziales", "slug": "soziales",
"is_active": true "is_active": true
} }
...@@ -44,7 +40,6 @@ ...@@ -44,7 +40,6 @@
"pk": 5, "pk": 5,
"fields": { "fields": {
"name": "Wissenschaft/Philosophie", "name": "Wissenschaft/Philosophie",
"abbrev": "W",
"slug": "wissenschaft-philosophie", "slug": "wissenschaft-philosophie",
"is_active": true "is_active": true
} }
......
...@@ -402,18 +402,18 @@ test = ["pytest (>=6)"] ...@@ -402,18 +402,18 @@ test = ["pytest (>=6)"]
[[package]] [[package]]
name = "filelock" name = "filelock"
version = "3.10.7" version = "3.11.0"
description = "A platform independent file lock." description = "A platform independent file lock."
category = "dev" category = "dev"
optional = false optional = false
python-versions = ">=3.7" python-versions = ">=3.7"
files = [ files = [
{file = "filelock-3.10.7-py3-none-any.whl", hash = "sha256:bde48477b15fde2c7e5a0713cbe72721cb5a5ad32ee0b8f419907960b9d75536"}, {file = "filelock-3.11.0-py3-none-any.whl", hash = "sha256:f08a52314748335c6460fc8fe40cd5638b85001225db78c2aa01c8c0db83b318"},
{file = "filelock-3.10.7.tar.gz", hash = "sha256:892be14aa8efc01673b5ed6589dbccb95f9a8596f0507e232626155495c18105"}, {file = "filelock-3.11.0.tar.gz", hash = "sha256:3618c0da67adcc0506b015fd11ef7faf1b493f0b40d87728e19986b536890c37"},
] ]
[package.extras] [package.extras]
docs = ["furo (>=2022.12.7)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"] docs = ["furo (>=2023.3.27)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"]
testing = ["covdefaults (>=2.3)", "coverage (>=7.2.2)", "diff-cover (>=7.5)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)", "pytest-timeout (>=2.1)"] testing = ["covdefaults (>=2.3)", "coverage (>=7.2.2)", "diff-cover (>=7.5)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)", "pytest-timeout (>=2.1)"]
[[package]] [[package]]
......
#
# steering, Programme/schedule management for AURA
#
# Copyright (C) 2017-2018, Ingo Leindecker
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from .models import Profile
class ProfileInline(admin.StackedInline):
model = Profile
can_delete = False
verbose_name_plural = "Profile"
fk_name = "user"
class ProfileUserAdmin(UserAdmin):
inlines = (ProfileInline,)
def get_queryset(self, request):
"""Let common users only edit their own profile"""
if not request.user.is_superuser:
return (
super(UserAdmin, self).get_queryset(request).filter(pk=request.user.id)
)
return super(UserAdmin, self).get_queryset(request)
def get_readonly_fields(self, request, obj=None):
"""Limit field access for common users"""
if not request.user.is_superuser:
return (
"username",
"is_staff",
"is_superuser",
"is_active",
"date_joined",
"last_login",
"groups",
"user_permissions",
)
return list()
def get_inline_instances(self, request, obj=None):
"""Append profile fields to UserAdmin"""
if not obj:
return list()
return super(ProfileUserAdmin, self).get_inline_instances(request, obj)
admin.site.unregister(User)
admin.site.register(User, ProfileUserAdmin)
# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-11-09 18:42
from __future__ import unicode_literals
import versatileimagefield.fields
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name="Profile",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"biography",
models.TextField(blank=True, null=True, verbose_name="Biography"),
),
("website", models.URLField(blank=True, verbose_name="Website")),
(
"googleplus_url",
models.URLField(blank=True, verbose_name="Google+ URL"),
),
(
"facebook_url",
models.URLField(blank=True, verbose_name="Facebook URL"),
),
(
"twitter_url",
models.URLField(blank=True, verbose_name="Twitter URL"),
),
(
"linkedin_url",
models.URLField(blank=True, verbose_name="LinkedIn URL"),
),
(
"youtube_url",
models.URLField(blank=True, verbose_name="Youtube URL"),
),
("dorftv_url", models.URLField(blank=True, verbose_name="DorfTV URL")),
("cba_url", models.URLField(blank=True, verbose_name="CBA URL")),
(
"cba_username",
models.CharField(
blank=True, max_length=60, verbose_name="CBA Username"
),
),
(
"cba_user_token",
models.CharField(
blank=True, max_length=255, verbose_name="CBA Token"
),
),
(
"ppoi",
versatileimagefield.fields.PPOIField(
default="0.5x0.5",
editable=False,
max_length=20,
verbose_name="Image PPOI",
),
),
(
"height",
models.PositiveIntegerField(
blank=True,
editable=False,
null=True,
verbose_name="Image Height",
),
),
(
"width",
models.PositiveIntegerField(
blank=True,
editable=False,
null=True,
verbose_name="Image Width",
),
),
(
"image",
versatileimagefield.fields.VersatileImageField(
blank=True,
height_field="height",
null=True,
upload_to="user_images",
verbose_name="Profile picture",
width_field="width",
),
),
(
"user",
models.OneToOneField(
on_delete=django.db.models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
),
),
],
options={
"db_table": "profile",
},
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-11-29 18:28
from __future__ import unicode_literals
import versatileimagefield.fields
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("profile", "0001_initial"),
]
operations = [
migrations.AlterField(
model_name="profile",
name="biography",
field=models.TextField(
blank=True,
help_text="Describe yourself and your fields of interest in a few sentences.",
null=True,
verbose_name="Biography",
),
),
migrations.AlterField(
model_name="profile",
name="cba_url",
field=models.URLField(
blank=True, help_text="URL to your CBA profile.", verbose_name="CBA URL"
),
),
migrations.AlterField(
model_name="profile",
name="cba_user_token",
field=models.CharField(
blank=True,
help_text="The CBA upload token for your account. This is NOT your password which"
" you use to log into CBA!",
max_length=255,
verbose_name="CBA Token",
),
),
migrations.AlterField(
model_name="profile",
name="cba_username",
field=models.CharField(
blank=True,
help_text="Your username in CBA. This is necessary for uploading files to your"
" account.",
max_length=60,
verbose_name="CBA Username",
),
),
migrations.AlterField(
model_name="profile",
name="dorftv_url",
field=models.URLField(
blank=True,
help_text="URL to your dorfTV channel.",
verbose_name="DorfTV URL",
),
),
migrations.AlterField(
model_name="profile",
name="facebook_url",
field=models.URLField(
blank=True,
help_text="URL to your Facebook profile.",
verbose_name="Facebook URL",
),
),
migrations.AlterField(
model_name="profile",
name="googleplus_url",
field=models.URLField(
blank=True,
help_text="URL to your Google+ profile.",
verbose_name="Google+ URL",
),
),
migrations.AlterField(
model_name="profile",
name="image",
field=versatileimagefield.fields.VersatileImageField(
blank=True,
height_field="height",
help_text="Upload a picture of yourself. Images are automatically cropped around"
" the 'Primary Point of Interest'. Click in the image to change it and"
" press Save.",
null=True,
upload_to="user_images",
verbose_name="Profile picture",
width_field="width",
),
),
migrations.AlterField(
model_name="profile",
name="linkedin_url",
field=models.URLField(
blank=True,
help_text="URL to your LinkedIn profile.",
verbose_name="LinkedIn URL",
),
),
migrations.AlterField(
model_name="profile",
name="twitter_url",
field=models.URLField(
blank=True,
help_text="URL to your Twitter profile.",
verbose_name="Twitter URL",
),
),
migrations.AlterField(
model_name="profile",
name="user",
field=models.OneToOneField(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="profile",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterField(
model_name="profile",
name="website",
field=models.URLField(
blank=True,
help_text="URL to your personal website.",
verbose_name="Website",
),
),
migrations.AlterField(
model_name="profile",
name="youtube_url",
field=models.URLField(
blank=True,
help_text="URL to your Youtube channel.",
verbose_name="Youtube URL",
),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-12-13 17:37
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("profile", "0002_auto_20171129_1828"),
]
operations = [
migrations.RemoveField(
model_name="profile",
name="biography",
),
migrations.RemoveField(
model_name="profile",
name="cba_url",
),
migrations.RemoveField(
model_name="profile",
name="dorftv_url",
),
migrations.RemoveField(
model_name="profile",
name="facebook_url",
),
migrations.RemoveField(
model_name="profile",
name="googleplus_url",
),
migrations.RemoveField(
model_name="profile",
name="height",
),
migrations.RemoveField(
model_name="profile",
name="image",
),
migrations.RemoveField(
model_name="profile",
name="linkedin_url",
),
migrations.RemoveField(
model_name="profile",
name="ppoi",
),
migrations.RemoveField(
model_name="profile",
name="twitter_url",
),
migrations.RemoveField(
model_name="profile",
name="website",
),
migrations.RemoveField(
model_name="profile",
name="width",
),
migrations.RemoveField(
model_name="profile",
name="youtube_url",
),
]
#
# steering, Programme/schedule management for AURA
#
# Copyright (C) 2017-2018, Ingo Leindecker
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from django.contrib.auth.models import User
from django.db import models
from django.utils.translation import gettext_lazy as _
class Profile(models.Model):
user = models.OneToOneField(
User, on_delete=models.CASCADE, related_name="profile", editable=False
)
cba_username = models.CharField(_("CBA Username"), blank=True, max_length=60)
cba_user_token = models.CharField(_("CBA Token"), blank=True, max_length=255)
def __str__(self):
return self.user.username
class Meta:
db_table = "profile"
def save(self, *args, **kwargs):
super(Profile, self).save(*args, **kwargs)
#
# steering, Programme/schedule management for AURA
#
# Copyright (C) 2017-2018, Ingo Leindecker
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from profile.models import Profile
from rest_framework import serializers
class ProfileSerializer(serializers.ModelSerializer):
class Meta:
model = Profile
fields = "__all__"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment