Hi,
I have a bit of a problem with structuring a Django project. I have a
UserProfile app which stores extra information about users using a
OneToOneField to the Django auth user model.
I have a products app which has two models relating to two types of
products and finally I have a payments app which contains all the code
needed to integrate with the Stripe payment processor.
My problem is fairly simple. When someone buys a product I obviously
want to take them to a payment page but if I carry on with my current
structure that would require redirecting to a view in the payments app
as it will contain code to work with the Stripe API but it would also
require access to the product model(s) which would hard code a
dependency between the payments app and the products app.
Is there anyway I can rearrange my project so I can avoid this hard
coded dependency?
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/12030aa1-69ad-dc7f-c3be-72e8e2f9b50e%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment