The only other option is a delimiter as you mentioned, maybe making a custom field type to do it.
Koterpillar
and if you use prefetch_related(), it will not be a join at all, you'll just get your files in a second query
LFP6
But FK is the optimal approach
Koterpillar
_but_ for the purposes of benchmarking, consider an ArrayField
LFP6
That exists?
Koterpillar
in PostgreSQL, yes
LFP6
Ah
XHFHX
yeah found this solution as well but its a bit hacky IMO as it already relies on postgres then
can someone recommend a mongodb backend on django? i'm not really happy with the SQL stuff :/ i only found mongodb-engine which seems dead (2 years w/o commit) and django-norel which has mongodb support is also heavily outdated (is on django 1.5)
beastDivision has quit
or another framework like django without the SQL limitations?
Koterpillar
XHFHX: Django's ORM is tied to SQL and tables heavily
beastDivision joined the channel
I would first try PostgreSQL as a NoSQL backend - with ArrayField and CompositeField, you can get some interesting results
XHFHX
i really like the whole infrastructure of django but that those models have to fit a SQL database is not my taste
Koterpillar: the porject has probably has to run on microsoft sql at some point... :/
Koterpillar
...then how is Mongo going to help?
beastDivision has quit
XHFHX
good point^^ well, as its mongo i could say it cant run on as SQL
i could store the jsons properly
dont have to write for every little bit a model
Koterpillar
Ah, then it's a management problem then :)
-then
XHFHX
yes ;)
OskrGrme joined the channel
if sql, then MS SQL
Koterpillar
To put it the other way: PostgreSQL is specifically banned
beastDivision joined the channel
XHFHX
very likely yes
Koterpillar
ibindĀ :: (a -> m j k b) -> m i j a -> m i k b
sorry, ignore
fission6 joined the channel
robvdl joined the channel
netheranthem has quit
netheranthem joined the channel
beastDivision has quit
OskrGrme has quit
dcrouch
How do I clear migrations from showing up in ./manage.py show migrations? They still continue to show and I can't seem to migrate. I'm looking for a fresh start of my database for a project I just started.
I've deleted the migrations directories and dropped/recreated database already and it still shows.
Koterpillar
you will still see migrations from Django's apps, but you don't need to clear those, as they work.
"can't seem to" -?
z1r0_ has quit
jas02 joined the channel
sidx64 has quit
togart_ joined the channel
togart has quit
ellmetha1 joined the channel
fission6 has quit
toothe
why use formset_factory over a list of forms?
hutch34 joined the channel
Koterpillar
toothe: it is a glorified list of forms
toothe: why use a form over a list of fields?
ellmetha has quit
ellmetha1 is now known as ellmetha
someone was writing a library to unify forms, fields and formsets, but it looks like it stalled
personally, I'd go with a superform wrapper if I need a formset
toothe
Koterpillar: touche
Tykling joined the channel
Koterpillar
Ironically, I'm now trying to write a form-like that autosaves from JS to DRF
Xiti joined the channel
i5um41ru joined the channel
hutch34 has quit
OskrGrme joined the channel
nethop joined the channel
i5um41ru has quit
ellmetha1 joined the channel
porton joined the channel
nethop has quit
nethop joined the channel
porton
What is the right way to create an object from a DB row which contains (among other fields) the classname?
I want to use this classname to create the model object from the DB
nethop has quit
ellmetha has quit
Koterpillar
contenttypes
kilae has quit
ellmetha1 is now known as ellmetha
nethop joined the channel
sol1x
porton: maybe you should have a look into the contenttype framework
nethop has quit
nethop joined the channel
Koterpillar
porton: and think what would happen if someone stores 'subprocess.Popen' in that field ;)
nethop has quit
porton
Koterpillar: we have full control over this field
nethop joined the channel
Koterpillar
porton: defence in depth
porton: do you have an ID field next to it?
porton
Koterpillar: yes
nethop has quit
Koterpillar
then you've reinvented contenttypes
nethop joined the channel
nethop has quit
nethop joined the channel
nethop has quit
nethop joined the channel
nethop has quit
nethop joined the channel
nethop has quit
theparadoxer02 joined the channel
aossama has quit
OskrGrme has quit
felixx has quit
foxmask joined the channel
togart joined the channel
jarshwah_ joined the channel
aossama joined the channel
MattHardcastle has quit
target_i has quit
porton has quit
togart_ has quit
fpghost84 joined the channel
dcrouch
Koterpillar, I figured it out, didn't notice you responded to me. I had to run make migrations on my app before migrating.
Koterpillar
dcrouch: pretty sure it tells you to
OskrGrme joined the channel
dcrouch
Upon trying to createsuperuser from my custom user I get this. https://dpaste.de/KRQb I know I should override REQUIRED_FIELDS, I added first name as one... Still failing.
detseg joined the channel
Koterpillar
why are you using get_field_by_name?
togart has quit
and what for? You have your model, just declare the field on it with unique=True
Xard has quit
MattHardcastle joined the channel
netheranthem has quit
cesar_bo has quit
dcrouch
Koterpillar, Had that, removed required_fields and it failed, here's what I have. https://dpaste.de/XtYs
netheranthem joined the channel
maryokhin joined the channel
Koterpillar
that's not what you have in the error
dcrouch
Koterpillar, a guide I followed had me add something and I modified since my last paste. :(