awesto / django-shop

A Django based shop system
http://www.django-shop.org
BSD 3-Clause "New" or "Revised" License
3.22k stars 1.04k forks source link

Decoupling Django Shop from Django CMS #856

Open pyarun opened 3 years ago

pyarun commented 3 years ago

What do the community think about decoupling Django-cms from django-shop.

I found django-shop useful for my ecommerce website, however I am not using django-cms at all. For whatever cms pages we needed, we had already integrated wagtail and moving to django-cms was not fisible.

I wanted to avoid all the cms dependencies. But can't do it without breaking the shop. So i endup forking django-shop and comment out cms code.

Now there is a possibility of bringing in CMS code in a pluggable manner. I want to understand from community if it will be useful to decouple CMS?

jrief commented 3 years ago

Hmm, good question.

Initially django-SHOP was decoupled from django-CMS, but then I saw the need to integrate the possibility for arbitrary content into the product's detail- and even list pages. It turned out that both of them would benefit if tightly coupled. I also love the idea that the catalog can be organized a CMS pages.

Anyway, currently I'm decoupling django-SHOP from django-angular, since AngularJS is dead.

Maybe with django-CMS version 4 it might become easier to decouple django-SHOP from it. Let's see.

ngaurav commented 3 years ago

Just wanted to say, that I am excited for the Django-shop version which will be independent of Django-angular. I am trying to implement flutter as my frontend client.

jrief commented 3 years ago

I am excited for the Django-shop version which will be independent of django-angular

Be assured, I'm heavily working on that.

sniku commented 3 years ago

I imagine it's not going to be easy (or feasible) to decouple Django-CMS from Django-shop without completely changing the project's goals. I would be thrilled to see Angular decoupled from Django-shop. I had to fork the project to work around some of the issues with Angular (and hardcoded js in python files). It would be great to have the frontend completely decoupled from the backend services.

jrief commented 3 years ago

I would be thrilled to see Angular decoupled from Django-shop.

I'm currently working on this. To get a first impression, please have a look at this library. On the long term, it shall replace django-angular.

greyhare commented 3 years ago

I've been using crispy forms. Is django-formset compatible with that? And we're performing validation at the backend, too, right?

greyhare commented 3 years ago

As for decoupling Django-Shop from Django-CMS, I think we'll need documentation explaining what Django-shop does itself, because the current "run the cookiecutter (which is frequently unstable)* and read the source" process is too opaque.

markusmo commented 2 years ago

I would be thrilled to see Angular decoupled from Django-shop.

I'm currently working on this. To get a first impression, please have a look at this library. On the long term, it shall replace django-angular.

+1 for that. If you need help testing it or if there are some tasks, feel free to contact me.

vivazzi commented 2 years ago

I think that django-cms and django-cascade in backend side and all frontend (node_modules: angular, bootsrap and etc) may be separate to different cases of django-shop usage. For example:

All variants is very good in defferent e-commerce apps.

So, I think, we need net django-shop without dependencies. But with additional packages for using together with js framework or django-cms (or using together) and etc.

For example, in my project I removed all dependencies listed above. And I gonna to build app with Vue. If you want I can show my results of removing dependencies later (now it's raw, WIP).

jrief commented 2 years ago

@vivazzi I actually see many benefits of having django-shop integrated into django-cms.

But I really agree on replacing django-angular. Therefore I currently am working on django-formset, which will replace the latter. I will also try to integrate HTMX instead of AngularJS (or any other JS framework) components.

vivazzi commented 2 years ago

Yes, I am agree with you: really many benefits of having django-shop integrated into django-cms. I had three apps that used django-cms + django-shop. Now I have other project, that is SPA using Vue. So I paid attention to dependencies. Anyway django-shop is awesome flexible app for e-commerce, that I use! Thanks for your hard work!

About HTMX - this sounds very interesting. I don't know about it very well, but I think this as variant is good. I always follow the django-shop