Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoupling Django Shop from Django CMS #856

Open
pyarun opened this issue May 16, 2021 · 11 comments
Open

Decoupling Django Shop from Django CMS #856

pyarun opened this issue May 16, 2021 · 11 comments

Comments

@pyarun
Copy link

pyarun commented May 16, 2021

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
Copy link
Member

jrief commented May 16, 2021

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
Copy link

ngaurav commented Jun 5, 2021

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
Copy link
Member

jrief commented Jun 5, 2021

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

Be assured, I'm heavily working on that.

@sniku
Copy link

sniku commented Jun 27, 2021

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
Copy link
Member

jrief commented Jun 28, 2021

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
Copy link

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

@greyhare
Copy link

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.

  • "unstable" as in "often breaks in interesting ways during pipenv install or during initial fixture load, the latter being very frustrating because it fails silently and deletes cookiecutter-generated files (ignored by .gitignore, too, so checking it in won't save you) so it cannot be rerun without starting over from a clean cookiecutter run." I've spent days trying to fix that.

@markusmo
Copy link

markusmo commented Jan 4, 2022

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
Copy link
Contributor

vivazzi commented Jul 19, 2022

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:

  • django-shop (simple usage)
  • django-shop + cms + django-cascade
  • django-shop + js framework (vue, svelte, react and etc.)

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
Copy link
Member

jrief commented Jul 19, 2022

@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
Copy link
Contributor

vivazzi commented Jul 19, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants