From 3ad38051ea804941eb21674d804233bcc6d3ca28 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Wed, 7 Jun 2017 18:30:37 +0300 Subject: [PATCH] Add official model and migrations --- locale/en/LC_MESSAGES/django.mo | Bin 6809 -> 6809 bytes locale/en/LC_MESSAGES/django.po | 142 +++++++++++------- locale/fi/LC_MESSAGES/django.mo | Bin 8544 -> 8855 bytes locale/fi/LC_MESSAGES/django.po | 139 ++++++++++------- webapp/admin.py | 3 + ...ole_customrole_official_presetrole_role.py | 69 +++++++++ webapp/migrations/0003_auto_20170607_1825.py | 19 +++ webapp/migrations/0004_auto_20170607_1826.py | 23 +++ webapp/models.py | 15 ++ 9 files changed, 305 insertions(+), 105 deletions(-) create mode 100644 webapp/migrations/0002_baserole_customrole_official_presetrole_role.py create mode 100644 webapp/migrations/0003_auto_20170607_1825.py create mode 100644 webapp/migrations/0004_auto_20170607_1826.py diff --git a/locale/en/LC_MESSAGES/django.mo b/locale/en/LC_MESSAGES/django.mo index bd4b884824b8c5d5555c83fcb19b93e2f7dd47c5..213409bceb643dc4a5f3a4780a70b8d633b2abdb 100644 GIT binary patch delta 20 ccmbPfI@5H+Z9#T(1w#ufBcsia1h;bl08Bgw0{{R3 delta 20 ccmbPfI@5H+Z9#TJ1w%_KBZJM41h;bl088-(`~Uy| diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index d283642..b9a67b3 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-06-01 19:20+0300\n" +"POT-Creation-Date: 2017-06-07 18:22+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -70,72 +70,78 @@ msgstr "Manage Rotations" msgid "Create/Delete" msgstr "Create/Delete" -#: infoscreen/templates/infoscreen_admin.html:48 +#: infoscreen/templates/infoscreen_admin.html:43 +#: infoscreen/templates/infoscreen_admin.html:152 +#: members/templates/members_base.html:75 members/templates/settings.html:11 +msgid "Settings" +msgstr "Settings" + +#: infoscreen/templates/infoscreen_admin.html:49 msgid "Create new item" msgstr "Create new item" -#: infoscreen/templates/infoscreen_admin.html:49 +#: infoscreen/templates/infoscreen_admin.html:50 #, fuzzy #| msgid "Create new item" msgid "Create a new item by type" msgstr "Create new item" -#: infoscreen/templates/infoscreen_admin.html:52 +#: infoscreen/templates/infoscreen_admin.html:53 msgid "Item type" msgstr "Item type" -#: infoscreen/templates/infoscreen_admin.html:63 -#: infoscreen/templates/infoscreen_admin.html:83 +#: infoscreen/templates/infoscreen_admin.html:64 +#: infoscreen/templates/infoscreen_admin.html:84 msgid "Info items" msgstr "Info items" -#: infoscreen/templates/infoscreen_admin.html:64 -#: infoscreen/templates/infoscreen_admin.html:84 +#: infoscreen/templates/infoscreen_admin.html:65 +#: infoscreen/templates/infoscreen_admin.html:85 msgid "Infoitems available for rotations" msgstr "Infoitems available for rotations" -#: infoscreen/templates/infoscreen_admin.html:67 -#: infoscreen/templates/infoscreen_admin.html:87 +#: infoscreen/templates/infoscreen_admin.html:68 +#: infoscreen/templates/infoscreen_admin.html:88 msgid "Item" msgstr "Item" -#: infoscreen/templates/infoscreen_admin.html:68 -#: infoscreen/templates/infoscreen_admin.html:88 +#: infoscreen/templates/infoscreen_admin.html:69 +#: infoscreen/templates/infoscreen_admin.html:89 msgid "Type" msgstr "Type" -#: infoscreen/templates/infoscreen_admin.html:69 -#: infoscreen/templates/infoscreen_admin.html:74 -#: infoscreen/templates/infoscreen_admin.html:91 -#: infoscreen/templates/infoscreen_admin.html:98 +#: infoscreen/templates/infoscreen_admin.html:70 +#: infoscreen/templates/infoscreen_admin.html:75 +#: infoscreen/templates/infoscreen_admin.html:92 +#: infoscreen/templates/infoscreen_admin.html:99 #: infoscreen/templates/infoscreen_admin.html:112 #: infoscreen/templates/infoscreen_admin.html:116 -#: infoscreen/templates/infoscreen_admin.html:134 -#: infoscreen/templates/infoscreen_admin.html:140 +#: infoscreen/templates/infoscreen_admin.html:132 +#: infoscreen/templates/infoscreen_admin.html:138 #: members/templates/member_edit.html:20 members/templates/payment_edit.html:20 msgid "Delete" msgstr "Delete" -#: infoscreen/templates/infoscreen_admin.html:89 +#: infoscreen/templates/infoscreen_admin.html:90 msgid "Set duration" msgstr "Set duration" -#: infoscreen/templates/infoscreen_admin.html:90 +#: infoscreen/templates/infoscreen_admin.html:91 msgid "Add to rotation" msgstr "Add to rotation" -#: infoscreen/templates/infoscreen_admin.html:97 +#: infoscreen/templates/infoscreen_admin.html:98 msgid "Add" msgstr "Add" #: infoscreen/templates/infoscreen_admin.html:106 -#: infoscreen/templates/infoscreen_admin.html:131 +#: infoscreen/templates/infoscreen_admin.html:129 msgid "Rotation" msgstr "Rotation" #: infoscreen/templates/infoscreen_admin.html:106 -#: infoscreen/templates/infoscreen_admin.html:133 -#: infoscreen/templates/infoscreen_admin.html:139 +#: infoscreen/templates/infoscreen_admin.html:131 +#: infoscreen/templates/infoscreen_admin.html:137 msgid "Preview" msgstr "Preview" @@ -151,26 +157,54 @@ msgstr "Instance" msgid "Duration" msgstr "Duration" -#: infoscreen/templates/infoscreen_admin.html:125 +#: infoscreen/templates/infoscreen_admin.html:123 msgid "Rotations" msgstr "Rotations" -#: infoscreen/templates/infoscreen_admin.html:127 +#: infoscreen/templates/infoscreen_admin.html:125 msgid "Select rotation to edit" msgstr "Select rotation to edit" -#: infoscreen/templates/infoscreen_admin.html:132 +#: infoscreen/templates/infoscreen_admin.html:130 msgid "id" msgstr "id" -#: infoscreen/templates/infoscreen_admin.html:143 +#: infoscreen/templates/infoscreen_admin.html:141 webapp/models.py:46 msgid "Name" msgstr "Name" -#: infoscreen/templates/infoscreen_admin.html:144 +#: infoscreen/templates/infoscreen_admin.html:142 msgid "Create new" msgstr "Create new" +#: infoscreen/templates/infoscreen_admin.html:157 +#: members/templates/settings.html:17 +msgid "Language" +msgstr "Language" + +#: infoscreen/templates/infoscreen_admin.html:161 +#: members/templates/settings.html:20 sikweb/settings-sample.py:179 +#: sikweb/settings.py:178 +msgid "Finnish" +msgstr "Finnish" + +#: infoscreen/templates/infoscreen_admin.html:162 +#: members/templates/settings.html:21 sikweb/settings-sample.py:178 +#: sikweb/settings.py:177 +msgid "English" +msgstr "English" + +#: infoscreen/templates/infoscreen_admin.html:166 +#: members/templates/settings.html:23 +#, fuzzy +#| msgid "Submitted" +msgid "Submit" +msgstr "Submitted" + +#: members/forms.py:20 members/tables.py:24 +msgid "Member" +msgstr "Member" + #: members/models.py:16 msgid "First name" msgstr "First name" @@ -231,10 +265,6 @@ msgstr "Edit" msgid "Options" msgstr "Options" -#: members/tables.py:24 -msgid "Member" -msgstr "Member" - #: members/templates/application_edit.html:9 msgid "Edit application" msgstr "Edit application" @@ -399,10 +429,6 @@ msgstr "List applications" msgid "Application form" msgstr "Application form" -#: members/templates/members_base.html:75 members/templates/settings.html:11 -msgid "Settings" -msgstr "Settings" - #: members/templates/payment_delete_confirm.html:9 msgid "Are you sure you want to delete this payment?" msgstr "Are you sure you want to delete this payment?" @@ -415,20 +441,6 @@ msgstr "Edit payment" msgid "Payment events" msgstr "Payment events" -#: members/templates/settings.html:17 -msgid "Language" -msgstr "Language" - -#: members/templates/settings.html:20 sikweb/settings-sample.py:179 -#: sikweb/settings.py:177 -msgid "Finnish" -msgstr "Finnish" - -#: members/templates/settings.html:21 sikweb/settings-sample.py:178 -#: sikweb/settings.py:176 -msgid "English" -msgstr "English" - #: members/views.py:129 members/views.py:186 members/views.py:205 msgid "No member id specified" msgstr "No member id specified" @@ -519,6 +531,34 @@ msgstr "Successfully deleted member" msgid "Copyright Aalto-yliopiston Sähköinsinöörikilta ry" msgstr "Copyright Aalto-yliopiston Sähköinsinöörikilta ry" +#: webapp/models.py:47 +#, fuzzy +#| msgid "Add member" +msgid "Board member" +msgstr "Add member" + +#: webapp/models.py:54 +#, fuzzy +#| msgid "Duration" +msgid "Description" +msgstr "Duration" + +#: webapp/models.py:55 +msgid "Summary" +msgstr "" + +#: webapp/models.py:70 +msgid "Start date" +msgstr "" + +#: webapp/models.py:71 +msgid "End date" +msgstr "" + +#: webapp/models.py:79 +msgid "Phone number" +msgstr "" + #: webapp/templates/admin_index.html:6 msgid "SIK Admin" msgstr "SIK Admin" diff --git a/locale/fi/LC_MESSAGES/django.mo b/locale/fi/LC_MESSAGES/django.mo index 5fd3dd7488ee28b7cf0955f7e431cac5db494fae..d36e122e7e41e82f61b9f14554fa3888831bd591 100644 GIT binary patch delta 3122 zcmZA3drZ}39LMqJ0D_=+0k05vyd#)~W`as8fsz7RUP?>jAV)aD0X&>Tkm*qjYHAll z%FStWF`PA8+ev5l)+x)mE@rb_o3^>((pl5yA8K2@Kj%EQ)wA>cy`JZHdG5a-{95>W zaqvP)T$drW6Za5BamIwOu0ID--T-6Vn2%rK8>maw1EV%#Eag_r!L1mNM==fG#Y{YH zy@I+wG1-_TV}d4`4Cl-!q;4}22V<@+FT^2~%TV{N$EjG0_u_t}&*miZGp9M|zVr5c zAF3l)F#+QT88Zt9;dt6NMUjj#HK?BM!7=!@EuXgKD>$0-N%W4Mn+d3nPUk?~WC*w)f0Di}*n96+X`T|sg6{z|=sDU)=JnfryGTOZ_ z=>#4^Ey)qaUPM)V9o3K)n$)Q8#|H?6l(&;5<+Kn4ZPKsIX4m!RH)a#VX8Gnju} z@N+^VY_T`Cp&IT$^?VO%q+O_nkDw|zj%w%&d;N?(e+k)#<~nL-6Zo!cMn|IdL?-I| z^i1ZzfXsYOsG+T>8Rj z8I(&<1KWc9Oz`A-KYlkqZ&Mn>cCNa0Y64{Y!MG@ zCdyD9S%=zmJ1_?Kp+oP#)^#1xKujkdBiuwSp$_?pIfO=ELMS~;@Vp5St%Qeon3zW> z(TC{g7B>=)5K3xTvpSKOLa2RH4($XpW*Uiyh^L7*LTj#+PjKsh(p*ZK0VS;|n?92C zv3b(wb5UPQAF-XNBc38w5iLYyH|F4Tgx=L{oqH2ggW58h#LdJOLVu#R603>HL?NNY zc$6q0l(Z=IL=7>OP)a2DOh(e<9P@}GLJO>OEjw2%y+*?&_hIbNm6OIxX#o=>5eSWY}cD6Js$ z_TNp_Wct~{gE*VeR@FXVODL_35;;D>(Phg!tZ_Jr&=%JARNA1?&5UIE9|qHiMZ{uz zPHZBYLcK}dF-e6DE?-JWL%9EdWB)OY5_&kk%PeXm@*+J#;Rn97x-yO;v{71}y znudC}vp(Rhbo)97q_ht4yL|r0WwRns>Gk+SZ7C}q@d2;b9AvA3CaYy{pK(i~*)Ojjx&9Ksj#>PNnxZBel?)HYe z!`;4ccW7+-#*46(1R#WO}(o>=DGxs_MuJm}CJxzXh L9W}jK;dJ~1|C2=2 delta 2843 zcmZA2drZ}39LMqJfIcV~Q=*KS zhnbj+<<{+}>z_fIbj(pQd`vH2+-pu?G`?rcXVFc082OmXeC6OcE<*P$#xQ2H9Ql}X zTdqY7pdK}sb}Ym$ybT8eI>vlMMkD+aJ(w^jSS~`9H)0a*MMi9TPy>7&xyAIOIv7L^ z@b~nz>rlg;6*glTZzNY&iqD)GR_ZywsM0v9`9uKp)P>#@v1&8!ObnC(XW z{-*tX5Y@rAr~!|nR`Ms*qdkQhXeZ000d-*!I)}+auMs+k8hz? zsETRo`UcdVH=_pBifZ^(ydB?04S2{pff`sWCsggs3+k9GGHS3GnY3Aj?1I^h4BE7z zX5!%8*o#YW7}cSR<bduzwx9&{+^mpkfR)@(AwE z!CchyzXjFNK~#fBQ8PGZ>rbK%Wxp+dg4&8NPy-r4J#Lp!D{uuh!7-`l{~8%J7{-RG zgLqVjsi+&XQ7e;=nrQ`U#cEJ1v=tX(JL>u#R7ZVSi6>C)|BN~VQ`W!G(Tz9AsN;p4 zG|l)9)ZVT^w#}?Zb=Yj{J5e(`V9SS59e1M!{sL--eW;F4q3-_})z6Uq{o(@FUq6gf zp%>01YAM4Rm6k9OwfD)W`dnOwrKpY$p;n|D^*FtZnxP;0m_fdno4Jgs_y-2g2=9B{ z?@4C;)o>;ivKaL$u0%Dw!Ctrxbz=)^$@kd$Zd3<7w){To{?n-I&!HwVVt>DgI)qnH zEB%i{rhrT`CC#7~z1V@7_zLP!eu{ZGhMGy7muOx>^W*{l(d(+HlNr>%%nOpJdNf_qMEpic$iSyM5x2H zDv-1-N?Nr?=|Auvt_mg=NE*Ek(~e*<@b=On)a;eg2tCi6i5B8PLQ8!gp&2bDbolNe zSX|Rilo3ig8@$)dQ-oHnM9+T#8Kvb!M<5scDux(2UKwVKt<1&;Y~F2s2%oTd z@ffj{=pt4Ttwb*2u!Y_=aNl``5+Qx%{W*u62dyd-E5U6y*7@$NwJczn*l) bo^s<~a5(i7 diff --git a/locale/fi/LC_MESSAGES/django.po b/locale/fi/LC_MESSAGES/django.po index b7de81d..5c39c26 100644 --- a/locale/fi/LC_MESSAGES/django.po +++ b/locale/fi/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-06-01 19:20+0300\n" +"POT-Creation-Date: 2017-06-07 18:22+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -71,70 +71,76 @@ msgstr "Hallinnoi Rotaatioita" msgid "Create/Delete" msgstr "Lisää/Poista" -#: infoscreen/templates/infoscreen_admin.html:48 +#: infoscreen/templates/infoscreen_admin.html:43 +#: infoscreen/templates/infoscreen_admin.html:152 +#: members/templates/members_base.html:75 members/templates/settings.html:11 +msgid "Settings" +msgstr "Asetukset" + +#: infoscreen/templates/infoscreen_admin.html:49 msgid "Create new item" msgstr "Luo uusi dia" -#: infoscreen/templates/infoscreen_admin.html:49 +#: infoscreen/templates/infoscreen_admin.html:50 msgid "Create a new item by type" msgstr "Luo uusi dia tyypin perusteella" -#: infoscreen/templates/infoscreen_admin.html:52 +#: infoscreen/templates/infoscreen_admin.html:53 msgid "Item type" msgstr "Diatyyppi" -#: infoscreen/templates/infoscreen_admin.html:63 -#: infoscreen/templates/infoscreen_admin.html:83 +#: infoscreen/templates/infoscreen_admin.html:64 +#: infoscreen/templates/infoscreen_admin.html:84 msgid "Info items" msgstr "Diat" -#: infoscreen/templates/infoscreen_admin.html:64 -#: infoscreen/templates/infoscreen_admin.html:84 +#: infoscreen/templates/infoscreen_admin.html:65 +#: infoscreen/templates/infoscreen_admin.html:85 msgid "Infoitems available for rotations" msgstr "Rotaatioon lisättävät diat" -#: infoscreen/templates/infoscreen_admin.html:67 -#: infoscreen/templates/infoscreen_admin.html:87 +#: infoscreen/templates/infoscreen_admin.html:68 +#: infoscreen/templates/infoscreen_admin.html:88 msgid "Item" msgstr "Dia" -#: infoscreen/templates/infoscreen_admin.html:68 -#: infoscreen/templates/infoscreen_admin.html:88 +#: infoscreen/templates/infoscreen_admin.html:69 +#: infoscreen/templates/infoscreen_admin.html:89 msgid "Type" msgstr "Tyyppi" -#: infoscreen/templates/infoscreen_admin.html:69 -#: infoscreen/templates/infoscreen_admin.html:74 -#: infoscreen/templates/infoscreen_admin.html:91 -#: infoscreen/templates/infoscreen_admin.html:98 +#: infoscreen/templates/infoscreen_admin.html:70 +#: infoscreen/templates/infoscreen_admin.html:75 +#: infoscreen/templates/infoscreen_admin.html:92 +#: infoscreen/templates/infoscreen_admin.html:99 #: infoscreen/templates/infoscreen_admin.html:112 #: infoscreen/templates/infoscreen_admin.html:116 -#: infoscreen/templates/infoscreen_admin.html:134 -#: infoscreen/templates/infoscreen_admin.html:140 +#: infoscreen/templates/infoscreen_admin.html:132 +#: infoscreen/templates/infoscreen_admin.html:138 #: members/templates/member_edit.html:20 members/templates/payment_edit.html:20 msgid "Delete" msgstr "Poista" -#: infoscreen/templates/infoscreen_admin.html:89 +#: infoscreen/templates/infoscreen_admin.html:90 msgid "Set duration" msgstr "Aseta kesto" -#: infoscreen/templates/infoscreen_admin.html:90 +#: infoscreen/templates/infoscreen_admin.html:91 msgid "Add to rotation" msgstr "Lisää rotaatioon" -#: infoscreen/templates/infoscreen_admin.html:97 +#: infoscreen/templates/infoscreen_admin.html:98 msgid "Add" msgstr "Lisää" #: infoscreen/templates/infoscreen_admin.html:106 -#: infoscreen/templates/infoscreen_admin.html:131 +#: infoscreen/templates/infoscreen_admin.html:129 msgid "Rotation" msgstr "Rotaatio" #: infoscreen/templates/infoscreen_admin.html:106 -#: infoscreen/templates/infoscreen_admin.html:133 -#: infoscreen/templates/infoscreen_admin.html:139 +#: infoscreen/templates/infoscreen_admin.html:131 +#: infoscreen/templates/infoscreen_admin.html:137 msgid "Preview" msgstr "Esikatsele" @@ -150,26 +156,52 @@ msgstr "Dia" msgid "Duration" msgstr "Kesto" -#: infoscreen/templates/infoscreen_admin.html:125 +#: infoscreen/templates/infoscreen_admin.html:123 msgid "Rotations" msgstr "Rotaatiot" -#: infoscreen/templates/infoscreen_admin.html:127 +#: infoscreen/templates/infoscreen_admin.html:125 msgid "Select rotation to edit" msgstr "Valitse muokattava rotaatio" -#: infoscreen/templates/infoscreen_admin.html:132 +#: infoscreen/templates/infoscreen_admin.html:130 msgid "id" msgstr "id" -#: infoscreen/templates/infoscreen_admin.html:143 +#: infoscreen/templates/infoscreen_admin.html:141 webapp/models.py:46 msgid "Name" msgstr "Nimi" -#: infoscreen/templates/infoscreen_admin.html:144 +#: infoscreen/templates/infoscreen_admin.html:142 msgid "Create new" msgstr "Luo uusi" +#: infoscreen/templates/infoscreen_admin.html:157 +#: members/templates/settings.html:17 +msgid "Language" +msgstr "Kieli" + +#: infoscreen/templates/infoscreen_admin.html:161 +#: members/templates/settings.html:20 sikweb/settings-sample.py:179 +#: sikweb/settings.py:178 +msgid "Finnish" +msgstr "suomi" + +#: infoscreen/templates/infoscreen_admin.html:162 +#: members/templates/settings.html:21 sikweb/settings-sample.py:178 +#: sikweb/settings.py:177 +msgid "English" +msgstr "englanti" + +#: infoscreen/templates/infoscreen_admin.html:166 +#: members/templates/settings.html:23 +msgid "Submit" +msgstr "Lisää" + +#: members/forms.py:20 members/tables.py:24 +msgid "Member" +msgstr "Jäsen" + #: members/models.py:16 msgid "First name" msgstr "Etunimi" @@ -230,10 +262,6 @@ msgstr "Muokkaa" msgid "Options" msgstr "Asetukset" -#: members/tables.py:24 -msgid "Member" -msgstr "Jäsen" - #: members/templates/application_edit.html:9 msgid "Edit application" msgstr "Muokkaa hakemusta" @@ -403,10 +431,6 @@ msgstr "Hakemuslistaus" msgid "Application form" msgstr "Jäsenhakemuslomake" -#: members/templates/members_base.html:75 members/templates/settings.html:11 -msgid "Settings" -msgstr "Asetukset" - #: members/templates/payment_delete_confirm.html:9 msgid "Are you sure you want to delete this payment?" msgstr "Oletko varma, että haluat poistaa tämän maksutapahtuman?" @@ -419,20 +443,6 @@ msgstr "Muokkaa maksua" msgid "Payment events" msgstr "Maksutapahtumat" -#: members/templates/settings.html:17 -msgid "Language" -msgstr "Kieli" - -#: members/templates/settings.html:20 sikweb/settings-sample.py:179 -#: sikweb/settings.py:177 -msgid "Finnish" -msgstr "suomi" - -#: members/templates/settings.html:21 sikweb/settings-sample.py:178 -#: sikweb/settings.py:176 -msgid "English" -msgstr "englanti" - #: members/views.py:129 members/views.py:186 members/views.py:205 msgid "No member id specified" msgstr "Jäsenen ID ei määritelty" @@ -521,6 +531,30 @@ msgstr "Kaikki jäsenkonfliktit ratkaistu onnistuneesti." msgid "Copyright Aalto-yliopiston Sähköinsinöörikilta ry" msgstr "Copyright Aalto-yliopiston Sähköinsinöörikilta ry" +#: webapp/models.py:47 +msgid "Board member" +msgstr "Hallituksen jäsen" + +#: webapp/models.py:54 +msgid "Description" +msgstr "Kuvaus" + +#: webapp/models.py:55 +msgid "Summary" +msgstr "Tiivistelmä" + +#: webapp/models.py:70 +msgid "Start date" +msgstr "Alkupäivämäärä" + +#: webapp/models.py:71 +msgid "End date" +msgstr "Loppupäivämäärä" + +#: webapp/models.py:79 +msgid "Phone number" +msgstr "Puhelinnumero" + #: webapp/templates/admin_index.html:6 msgid "SIK Admin" msgstr "SIK Hallintapaneeli" @@ -564,6 +598,3 @@ msgstr "Sössö" #: webapp/templates/navigation.html:32 msgid "Contact" msgstr "Yhteystiedot" - -#~ msgid "Select" -#~ msgstr "Valitse" diff --git a/webapp/admin.py b/webapp/admin.py index 8c38f3f..6e469fd 100644 --- a/webapp/admin.py +++ b/webapp/admin.py @@ -1,3 +1,6 @@ from django.contrib import admin +from webapp.models import Official, Role # Register your models here. +admin.site.register(Official) +admin.site.register(Role) diff --git a/webapp/migrations/0002_baserole_customrole_official_presetrole_role.py b/webapp/migrations/0002_baserole_customrole_official_presetrole_role.py new file mode 100644 index 0000000..241045d --- /dev/null +++ b/webapp/migrations/0002_baserole_customrole_official_presetrole_role.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-06-07 15:20 +from __future__ import unicode_literals + +from django.conf import settings +import django.contrib.auth.models +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('auth', '0008_alter_user_username_max_length'), + ('webapp', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='BaseRole', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.TextField(verbose_name='Name')), + ('is_board', models.BooleanField(verbose_name='Board member')), + ], + ), + migrations.CreateModel( + name='Official', + fields=[ + ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)), + ('phone_number', models.TextField(verbose_name='Phone number')), + ], + options={ + 'verbose_name': 'user', + 'verbose_name_plural': 'users', + 'abstract': False, + }, + bases=('auth.user',), + managers=[ + ('objects', django.contrib.auth.models.UserManager()), + ], + ), + migrations.CreateModel( + name='CustomRole', + fields=[ + ('baserole_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='webapp.BaseRole')), + ], + bases=('webapp.baserole',), + ), + migrations.CreateModel( + name='PresetRole', + fields=[ + ('baserole_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='webapp.BaseRole')), + ('description', models.TextField(verbose_name='Description')), + ('summary', models.TextField(verbose_name='Summary')), + ], + bases=('webapp.baserole',), + ), + migrations.CreateModel( + name='Role', + fields=[ + ('presetrole_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='webapp.PresetRole')), + ('start_date', models.DateField(verbose_name='Start date')), + ('end_date', models.DateField(verbose_name='End date')), + ('official', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='roles', to='webapp.Official')), + ], + bases=('webapp.presetrole',), + ), + ] diff --git a/webapp/migrations/0003_auto_20170607_1825.py b/webapp/migrations/0003_auto_20170607_1825.py new file mode 100644 index 0000000..0cc68bc --- /dev/null +++ b/webapp/migrations/0003_auto_20170607_1825.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-06-07 15:25 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('webapp', '0002_baserole_customrole_official_presetrole_role'), + ] + + operations = [ + migrations.AlterModelOptions( + name='role', + options={'verbose_name': 'Official'}, + ), + ] diff --git a/webapp/migrations/0004_auto_20170607_1826.py b/webapp/migrations/0004_auto_20170607_1826.py new file mode 100644 index 0000000..0380a34 --- /dev/null +++ b/webapp/migrations/0004_auto_20170607_1826.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-06-07 15:26 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('webapp', '0003_auto_20170607_1825'), + ] + + operations = [ + migrations.AlterModelOptions( + name='official', + options={'verbose_name': 'Official'}, + ), + migrations.AlterModelOptions( + name='role', + options={'verbose_name': 'Role'}, + ), + ] diff --git a/webapp/models.py b/webapp/models.py index 3a9ce06..91f89f9 100644 --- a/webapp/models.py +++ b/webapp/models.py @@ -1,6 +1,7 @@ from django.db import models from django.utils import timezone from django.utils.translation import ugettext_lazy as _ +from django.contrib.auth.models import User class Tag(models.Model): @@ -66,5 +67,19 @@ class Role(PresetRole): Model representing an active or historical occupation in an official's history ''' + class Meta: + verbose_name = _('Role') + start_date = models.DateField(_('Start date')) end_date = models.DateField(_('End date')) + official = models.ForeignKey('Official', related_name='roles') + + +class Official(User): + ''' + Model representing a guild official + ''' + class Meta: + verbose_name = _('Official') + + phone_number = models.TextField(_('Phone number'))