matthiask / plata

Plata - the lean and mean Django-based Shop
https://plata-django-shop.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
201 stars 63 forks source link

Cannot do initial migration? #87

Open clasick opened 5 years ago

clasick commented 5 years ago

I tried adding Plata to my existing Django 2.1 app but as soon as I ran migrations using ./manage.py makemigrations plata , I get the following error:

  File "/home/vkk/Documents/bfd/core/models.py", line 5, in <module>
    from plata.shop.models import PriceBase
  File "/home/vkk/Documents/bfd/bfdenv/src/plata/plata/shop/models.py", line 549, in <module>
    class OrderItem(models.Model):
  File "/home/vkk/Documents/bfd/bfdenv/src/plata/plata/shop/models.py", line 552, in OrderItem
    order = models.ForeignKey(Order, related_name='items')
TypeError: __init__() missing 1 required positional argument: 'on_delete'

Btw, I'm using Django 2.1.4.

clasick commented 5 years ago

Okay I figured out the error, it looks like the installation docs at readthedocs haven't been updated. It's still pointing to the old repo at fiee/plata and not at matthiask/plata.

This should be updated to not confuse new users.

edit: On a similar note, it seems like most of the information from the docs is irrelevant now. There is no proper documentation for the most part for the latest version, and the only way to get things done is to go through the examples folder. Kinda bummed.

fiee commented 5 years ago

edit: On a similar note, it seems like most of the information from the docs is irrelevant now. There is no proper documentation for the most part for the latest version, and the only way to get things done is to go through the examples folder. Kinda bummed.

It is, and it always was this way. That’s one reason I got stuck. Had no time and need to try further.