django-oscar / django-oscar-accounts

Managed accounts for Django (with or without django-oscar)
BSD 3-Clause "New" or "Revised" License
211 stars 118 forks source link

Not Oscar-independant #58

Open juanigsrz opened 6 years ago

juanigsrz commented 6 years ago

Running

pip install django-oscar-accounts (adding oscar_accounts to installed apps) python manage.py migrate oscar_accounts

Yields:

SystemCheckError: System check identified some issues:

ERRORS: oscar_accounts.Account.product_range: (fields.E300) Field defines a relation with model 'offer.Range', which is either not installed, or is abstract. oscar_accounts.Account.product_range: (fields.E307) The field oscar_accounts.Account.product_range was declared with a lazy reference to 'offer.range', but app 'offer' isn't installed.

solarissmoke commented 6 years ago

Yeah, unfortunately it isn't. I've actually removed the suggestion that it is from the documentation on master - unless someone has the time to actually make it oscar-independent I think it will probably have to stay that way...

juanigsrz commented 6 years ago

Looking at the code for a bit i think it only references django-oscar for its user model and an exception class. It also references offer.Range with a ForeignKey which i think could be deleted. So yeah. making it oscar-independant might not be really hard after all.

solarissmoke commented 6 years ago

Would you be able to make a PR? More than happy to review/merge it if you are.

juanigsrz commented 6 years ago

Right now i'm busy with two other projects, but i will try to do it if no one else does.

SalahAdDin commented 6 years ago

what's the possible solution here? If you have time i can help you with this.

millerf commented 5 years ago

Hi, I would be really interested in using this as a standalone. @juanigsrz I checked and removing the 'offer.Rang' foreign key doesn't seem so easy, or at least I am not sure on how to actually handle that...

juanigsrz commented 5 years ago

Hey @millerf , i personally ended up dropping it and made my own double entry system based on other working projects. Sorry i can't help you.

millerf commented 5 years ago

No worries... I just reused it and removed the product_range attribute...

juanigsrz commented 5 years ago

As @solarissmoke said, feel free to make a PR for review, i'm sure it'll be helpful to a lot of people!

PekopT commented 4 years ago

I'll just leave it here: https://github.com/PekopT/django-oscar-accounts

TurnrDev commented 3 years ago

I'll just leave it here: https://github.com/PekopT/django-oscar-accounts

Love the work, any plans to release the work on pypi?