These are chat archives for django/django

Jun 2018
Janusz Kamieński
Jun 03 2018 08:02

Well I hit the wall...
I have added my own ManyToMany model and added it to another model for a relation. I have locally (and also tried on stage) generated automatic migration, but on migrate it tells me:

django.db.utils.IntegrityError: (1215, 'Cannot add foreign key constraint')

The migration is:

And my M2M model is currently:

It is being used here:

It passes smoothly on localhost (sqlite), but not on staging (MySQL).

What am I doing wrong?

Janusz Kamieński
Jun 03 2018 09:28
Looks like Mysql has some issue with creating FK index, but created table properly and it works when I skip the migration with fake again... weird stuff, but works
Jun 03 2018 12:29
@ThomasDang93 If you only want your app/site to "LOOK" good for mobile then bootstrap is enough, you wont need any REST except if you need a MOBILE APP
to get its data from your website.

some simple question to ask:

What JavaScript framework is best for Django Multiple Page App architecture?

Jun 03 2018 12:37
Thanks, people keep telling me that react pairs well with Django. From my perspective it feels a little overwhelming to know all these frameworks. I don't feel the same way when it comes to choosing databases or programming languages
People also keep telling me Django is dying. But since python is one of the most popular languages, I just can't see it fading away anytime soon
Jun 03 2018 12:49
@ThomasDang93 django is not dying, it became more stable and powerful framework than ever