From 5c92a1fa5336853f9c25c6c8840abeb89e3ffeda Mon Sep 17 00:00:00 2001 From: tcaxle Date: Sat, 11 Apr 2020 15:40:33 +0100 Subject: [PATCH] __str__() methods, Specialties and Merits. Migrations. --- app/__pycache__/models.cpython-38.pyc | Bin 13874 -> 15190 bytes app/migrations/0015_auto_20200411_1431.py | 34 +++++++++++++++ app/migrations/0016_auto_20200411_1439.py | 39 ++++++++++++++++++ .../0015_auto_20200411_1431.cpython-38.pyc | Bin 0 -> 964 bytes .../0016_auto_20200411_1439.cpython-38.pyc | Bin 0 -> 1644 bytes app/models.py | 39 ++++++++++++++---- 6 files changed, 105 insertions(+), 7 deletions(-) create mode 100644 app/migrations/0015_auto_20200411_1431.py create mode 100644 app/migrations/0016_auto_20200411_1439.py create mode 100644 app/migrations/__pycache__/0015_auto_20200411_1431.cpython-38.pyc create mode 100644 app/migrations/__pycache__/0016_auto_20200411_1439.cpython-38.pyc diff --git a/app/__pycache__/models.cpython-38.pyc b/app/__pycache__/models.cpython-38.pyc index 4b7163ff154d3b6b6c1af1e5f135f9e12ee713e1..02b9b68ff1a8b01484213be9457d79aac2d4f748 100644 GIT binary patch delta 3276 zcmbtWS#VQT7|zXd@6Anff#(;D}?gau} z3xjvJ`c`_qiVdI3cMq;Pv*;V&^O3PS{MBqpLA53As-W86uq7RuQ*~&raeGo!oe5ji zl@AP!sF`&cjm2^~mRY+cr=ujunqeY%$E)5)wTm_L5i*kym2<{e3<2R`xGUu-$xTQ)Oruh8NNvbb48k9c&j5 zw3hLm?d~TdrnGRVwVA<8ZuIGBVQ*vGsDr&jr;}2~5;_xX4}ZNQl%%uw7I6@svR#1z zDP}zUNdMijc|E;7{XKC1fbRZ&EWdP;`}?2HeV=unL@t%fr2mKaVpdm}DRGOKlC(Cs5;2AAhc)tdsz+GkA22{?bC(NY47UOm>j1~N}$Msg0Ha=J8k(fM(KTj)xt}1X(FVg$*5p%R4_L* zr=~ztpt&>;G!HaUD}h#`N_eGm-j&{vVna{z>evU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+n^wMDnG z4>Iv*XVYTsT6ip%E^87!8t4SwpbUCI7w82Q&M_%4jQwfFLS`Caq9>ISQW?H)Y- zw#2$;+7|{JD(|@syB!5qE;5O4oAyV0_8kguvG0h~P=DKdSmjqpd_ck+cAt{=1&J@k z+e6>JTyA~(rh(0AHgg)loMtVjk;-ZM@pTf^ot%1xQ;Bk_Lr$f}DG!{k$>}DXj>~t@ nVU1#Q`2D0K;0VYeS3nNKDDIp~wVf{$JPxgNRo($QM diff --git a/app/migrations/0015_auto_20200411_1431.py b/app/migrations/0015_auto_20200411_1431.py new file mode 100644 index 0000000..447513c --- /dev/null +++ b/app/migrations/0015_auto_20200411_1431.py @@ -0,0 +1,34 @@ +# Generated by Django 3.0.5 on 2020-04-11 14:31 + +import app.models +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('app', '0014_auto_20200411_1428'), + ] + + operations = [ + migrations.AlterField( + model_name='charm', + name='modifierAbility', + field=app.models.NamedManyToManyField(blank=True, to='app.modifierAbility', verbose_name='Abilities Modifiers'), + ), + migrations.AlterField( + model_name='charm', + name='modifierAttribute', + field=app.models.NamedManyToManyField(blank=True, to='app.modifierAttribute', verbose_name='Attribute Modifiers'), + ), + migrations.AlterField( + model_name='charm', + name='modifierStatic', + field=app.models.NamedManyToManyField(blank=True, to='app.modifierStatic', verbose_name='Statics Modifiers'), + ), + migrations.AlterField( + model_name='charm', + name='rollConfiguration', + field=app.models.NamedManyToManyField(blank=True, to='app.rollConfiguration', verbose_name='Roll Configurations'), + ), + ] diff --git a/app/migrations/0016_auto_20200411_1439.py b/app/migrations/0016_auto_20200411_1439.py new file mode 100644 index 0000000..bc27bce --- /dev/null +++ b/app/migrations/0016_auto_20200411_1439.py @@ -0,0 +1,39 @@ +# Generated by Django 3.0.5 on 2020-04-11 14:39 + +import app.models +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('app', '0015_auto_20200411_1431'), + ] + + operations = [ + migrations.AddField( + model_name='merit', + name='modifierAbility', + field=app.models.NamedManyToManyField(blank=True, to='app.modifierAbility', verbose_name='Abilities Modifiers'), + ), + migrations.AddField( + model_name='merit', + name='modifierAttribute', + field=app.models.NamedManyToManyField(blank=True, to='app.modifierAttribute', verbose_name='Attribute Modifiers'), + ), + migrations.AddField( + model_name='merit', + name='modifierStatic', + field=app.models.NamedManyToManyField(blank=True, to='app.modifierStatic', verbose_name='Statics Modifiers'), + ), + migrations.AddField( + model_name='merit', + name='rollConfiguration', + field=app.models.NamedManyToManyField(blank=True, to='app.rollConfiguration', verbose_name='Roll Configurations'), + ), + migrations.AddField( + model_name='speciality', + name='ability', + field=app.models.SingleChoiceField(blank=True, choices=[('War', (('ARCHERY', 'Archery'), ('ATHLETICS', 'Athletics'), ('AWARENESS', 'Awareness'), ('BRAWL', 'Brawl'), ('DODGE', 'Dodge'), ('INTEGRITY', 'Integrity'), ('MELEE', 'Melee'), ('RESISTANCE', 'Resistance'), ('THROWN', 'Thrown'), ('WAR', 'War'))), ('Life', (('CRAFT', 'Craft'), ('LARCENY', 'Larceny'), ('LINGUISTICS', 'Linguistics'), ('PERFORMANCE', 'Performance'), ('PRESENCE', 'Presence'), ('RIDE', 'Ride'), ('SAIL', 'Sail'), ('SOCIALISE', 'Socialise'), ('STEALTH', 'Stealth'), ('SURVIVAL', 'Survival'))), ('Wisdom', (('BUREAUCRACY', 'Bureaucracy'), ('INVESTIGATION', 'Investigation'), ('LORE', 'Lore'), ('MEDICINE', 'Medicine'), ('OCCULT', 'Occult')))], max_length=100, verbose_name='Ability'), + ), + ] diff --git a/app/migrations/__pycache__/0015_auto_20200411_1431.cpython-38.pyc b/app/migrations/__pycache__/0015_auto_20200411_1431.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f1821b3728efce9adb7f1818e2d8342392f27d21 GIT binary patch literal 964 zcmah{y>HV%6hHgy#Br0hX+Xf%)eLbQg2aGOA|#lSftJMsmXmjNot}Ncb`Z%5V(Y+P zz|8*x%dJdo%t#2H?R+&IIP0F@z2EzO?{%YL5An~(M#OWlL?VbaC^zo*j zkg&qDtAY|JE@j$O2Nfu*Osi7^G|-^})oTjI^%|>fFcS{;u=)mTz~LTtw84&{xyAy` zt-%Rq-jcQ9I%7+f)Su1Vd!3Hc^Za=xyl$u4>GT}Ob9&t;QlDJ=U zKKcb4tGBmnYU8vY-tCMv4!3?>5_YZ;iU1j?AWtBi!|?pq15R=o5U0} literal 0 HcmV?d00001 diff --git a/app/migrations/__pycache__/0016_auto_20200411_1439.cpython-38.pyc b/app/migrations/__pycache__/0016_auto_20200411_1439.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5506cb2181691f326e94b091e58a7ff5590976d1 GIT binary patch literal 1644 zcma)6&2HO95SBzzq9i+s?W9TDORnm{veUF^fub-&(>4K$GDymXbttjsj;VDiQe9GZ z>}z}Vp^wqNLtmqZz4jFJ4GI|TEGhryQVQCg`DS+hc4tP*%bgm2fBgCD57(_)?JvpP z|5RkQ@SlHy3$4+5QXAKCZzPSWGFIxf-5OP>`b&+fpq#2dD`S<`{aR1^fciDJR~MZr zi#aJ+mgbSf?tjb3Y~eru9TzAqj~lce*T)K|ry6Zg1)8U=Q=O_*qfOenQmB4)BWvHv zI<)&pwsb37rcWNpp5Dry(Uk|XRk~Kn+UV~&eL+8o75b9CqMu%=(r>JdJM=Tm?sL%| z++@{j2!+gMtq5)&G_NvK%4 zwOtgP9nTB6eDT2LExcyjkateSlbhpyf!7yZuHHYpz*egLUaVq;XGvma=?RPH)xB3< zKZe&l)O`IwH5Z+H1`#8&LZU^gQppk@65i_|(K0-9&+?9t;L!y51!8R@*mJDFHhmd)LA(qcO;Hwi{Txo*f(^nHCV^ z{YgLCz;Z0q8$be5uj5(1?FWWyT1Z3A@`9w1lr)1qZ+Ph9KH=GUiim=t@Kt=~NUIJz zfifG-^o*TAXeK8o1xi{Drf0dBokMs8sr1@)YL#h2|m4X*TU?NO#|jJj)nihUO76a}H!4 zaT3X#mTmXI!i;u}z#h8Dre}aT#pRqpx#|o(jMB-t^sf)BZQHb6%wzzRMJ$zQb7-0) zC%`?5=1K8^VsY_RES`+YahxF^O)?e%zN;yDA108-#e}y};`X{i56i9zL(vICeC_iD zkX{PIpXMZyog_I5Ge{{`4_lHqq)pwRbVqg=m(x)+%l^y7a~Dt00ZA`{Os=JhSn=_~ z5-`g!DyWmqU@;MYt8pJ~l*>O`{Yf^3evwW4>oF_(@E&Uow2yt)zZ;@`oHJj4JZHXL zpIvYTZOOFrZ*b9-#=okj)*JYHcK!dTSJ&#_rIj9zx<$W3l2?hg=_yI$Y@HsLbtv`j Y!mp?R9Si-ts+ix)cyd`Jy}qRU2fLQ_;Q#;t literal 0 HcmV?d00001 diff --git a/app/models.py b/app/models.py index c1119d3..0338a35 100644 --- a/app/models.py +++ b/app/models.py @@ -323,12 +323,21 @@ class modifierBase(models.Model): value = NamedIntegerField("Modifier Value") class modifierAttribute(modifierBase): + def __str__(self): + return "{} [{}]".format(self.attribute, self.value) + attribute = SingleChoiceField("Attribute", ATTRIBUTES) class modifierAbility(modifierBase): + def __str__(self): + return "{} [{}]".format(self.ability, self.value) + ability = SingleChoiceField("Ability", ABILITIES) class modifierStatic(modifierBase): + def __str__(self): + return "{} [{}]".format(self.static, self.value) + static = SingleChoiceField("Static", STATICS) #==============================================================================# @@ -338,6 +347,9 @@ class itemBase(models.Model): class Meta: abstract = True + def __str__(self): + return self.name + name = NameField() description = DescriptionField() @@ -384,6 +396,9 @@ class itemArmor(itemBase): #----------------------------------- CHARMS -----------------------------------# #==============================================================================# class charm(models.Model): + def __str__(self): + return self.name + name = NameField() description = DescriptionField() modifierAttribute = NamedManyToManyField("Attribute Modifiers", modifierAttribute) @@ -395,21 +410,27 @@ class charm(models.Model): #----------------------------------- MERITS -----------------------------------# #==============================================================================# class merit(models.Model): + def __str__(self): + return self.name + name = NameField() description = DescriptionField() dots = DotField("Dots") - # modifierAttribute - # modifierAbility - # modifierStatic - # rollConfiguration + modifierAttribute = NamedManyToManyField("Attribute Modifiers", modifierAttribute) + modifierAbility = NamedManyToManyField("Abilities Modifiers", modifierAbility) + modifierStatic = NamedManyToManyField("Statics Modifiers", modifierStatic) + rollConfiguration = NamedManyToManyField("Roll Configurations", rollConfiguration) #==============================================================================# #-------------------------------- SPECIALITIES --------------------------------# #==============================================================================# class speciality(models.Model): + def __str__(self): + return "[{}] {}".format(self.ability, self.name) + modifier = 2 name = NameField() - # ability + ability = SingleChoiceField("Ability", ABILITIES) #==============================================================================# #--------------------------------- INTIMACIES ---------------------------------# @@ -418,13 +439,14 @@ class intimacyBase(models.Model): class Meta: abstract = True + def __str__(self): + return "[{}] {}".format(self.description, self.intensity) + description = DescriptionField() intensity = SingleChoiceField("Intensity", INTENSITIES) - pass class intimacyTie(intimacyBase): target = NamedCharField("Target") - pass class intimacyPrincipal(intimacyBase): pass @@ -436,6 +458,9 @@ class characterBase(models.Model): class Meta: abstract = True + def __str__(self): + return self.name + #============ GENERAL =============# name = NameField()