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

Support for django 3.0 #810

Open
pupattan opened this issue May 4, 2020 · 23 comments
Open

Support for django 3.0 #810

pupattan opened this issue May 4, 2020 · 23 comments

Comments

@pupattan
Copy link

pupattan commented May 4, 2020

Please support for django 3.0 .
django-cms has already upgraded

@jrief
Copy link
Member

jrief commented May 4, 2020

Thanks for this request, it's on my TODO list anyway!
In upcoming version 1.2, I will replace Haystack against Elasticsearch-DSL. I will add Django-3 support there as well. Unless it's really simple to backport it to django-SHOP 1.1. Had no time yet to have a look at it.
Would you mind to wait a little bit, until that version is ready? As an alternative, please check the branch releases/1.2 to get the latest development release.

@pupattan
Copy link
Author

pupattan commented May 4, 2020

Any expected date ?

@jrief
Copy link
Member

jrief commented May 5, 2020

I just managed to get django-SHOP working with Django-3.0.

However, there are still a few issues to solve:

  • cookiecutter-django-shop must be adopted
  • I must release djangocms-cascade version 1.3
  • I must release django-angular version 2.3
  • documentation about search must be adopted to Elasticsearch.

If you want to help, it would be appreciated.

@beeduino
Copy link
Contributor

beeduino commented May 6, 2020

I want to help with cookiecutter-django-shop

@jrief
Copy link
Member

jrief commented May 6, 2020

Please join the chat room, so that we can work on it together.

@beeduino
Copy link
Contributor

beeduino commented May 6, 2020

I am there

@pupattan
Copy link
Author

pupattan commented May 9, 2020

I just managed to get django-SHOP working with Django-3.0.

However, there are still a few issues to solve:

  • cookiecutter-django-shop must be adopted
  • I must release djangocms-cascade version 1.3
  • I must release django-angular version 2.3
  • documentation about search must be adopted to Elasticsearch.

If you want to help, it would be appreciated.

Can you tell me how to get this update ?

@jrief
Copy link
Member

jrief commented May 9, 2020

@pupattan

Can you tell me how to get this update ?

  • You must upgrade to django-angular 2.3 and djangocms-cascade-1.3.
  • You must replace haystack against elasticsearch-dsl and django-elasticsearch-dsl
  • Use django-SHOP from github with branch releases/1.2

@beeduino
Copy link
Contributor

One of the changes needed for updates in cookiecutter-django-shop
awesto/djangoshop-sendcloud#4

@beeduino
Copy link
Contributor

@beeduino
Copy link
Contributor

beeduino commented May 12, 2020

@jrief are you about to address this also?

--- a/shop/management/commands/shop.py
+++ b/shop/management/commands/shop.py
@@ -225,7 +225,7 @@ Usage:
 
         page_attributes = [
             # Menu Title, CMS-App-Hook or None, kwargs, Main Plugin, Plugin Context,
-            (("Search", 'CatalogSearchCMSApp', {'reverse_id': 'shop-search-product'}),
+            (("Search", 'CatalogSearchApp', {'reverse_id': 'shop-search-product'}),

@beeduino
Copy link
Contributor

beeduino commented May 12, 2020

One of the last problem that I am facing right now:
When running
$ pipenv run ./manage.py initialize_shop_demo
After migrating db it starts to load data and fails with:

  File "/home/dimas/.virtualenvs/my-shop-p7eeYaPN/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 396, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.IntegrityError: Problem installing fixture '/home/dimas/.virtualenvs/awesto/p/my-shop/workdir/fixtures/skeleton.json': Could not load cmsplugin_cascade.CascadeClipboard(pk=25): NOT NULL constraint failed: cmsplugin_cascade_cascadeclipboard.created_at

The other options for this field are - auto_now_add=True, editable=False,

I could overcome it adding null=True in the model but it looks hacky.

@jrief, can you take a look, please?

@jrief
Copy link
Member

jrief commented May 13, 2020

Yes, in djangocms-cascade I added that field. I forgot to add it to the file skeleton.json in cookiecutter-django-shop

@beeduino
Copy link
Contributor

Still having some lesser problem when loading this skeleton.json:

  Applying sites.0002_alter_domain_unique... OK
Initializing project myshop
You are trying to change the nullable field 'created_at' on cascadeclipboard to non-nullable without a default; we can't do that (the database needs something to populate existing rows).
Please select a fix:
 1) Provide a one-off default now (will be set on all existing rows with a null value for this column)
...
Select an option: 1
Please enter the default value now, as valid Python
The datetime and django.utils.timezone modules are available, so you can do e.g. timezone.now
Type 'exit' to exit this prompt
>>> timezone.now

@beeduino
Copy link
Contributor

Commented about cookiecutter-django-shop current status
awesto/cookiecutter-django-shop#33 (comment)

@pupattan
Copy link
Author

I hope once this fix is done, we can use django-shop with django-cms 3.7.2

@jrief
Copy link
Member

jrief commented May 17, 2020

Today as of 20200517T0700 UTC I installed django-shop from scratch, using the cookiecutter template and following the given instructions. In my setup everything worked fine. If you still encounter problems, please send me you output.

@pupattan
Copy link
Author

pupattan commented May 18, 2020

  1. How do i integrate to existing django-cms project ?
  2. Is it possible to integrate it like a simple django app.or it can only be installed like mentioned here ? https://django-shop.readthedocs.io/en/latest/tutorial/intro.html#installation

@jrief
Copy link
Member

jrief commented May 18, 2020

This depends on how your current django-CMS is configured. If you add the django-SHOP specific configurations to your settings.py, then by invoking the management commands
./manage.py shop [check-pages|review-settings] you can adopt the current content of a CMS to additionally use the Shop's functionality.

@pupattan
Copy link
Author

pupattan commented May 19, 2020

  1. @jrief I have configured my django-cms project using djangocms installer.
    Does this mean i need to include to django-shot to INSTALLED_APPS and what else? """"If you add the django-SHOP specific configurations to your settings.py""""
    Do you have any document so that i can refer ? """How do i integrate to existing django-cms project ?""

  2. Using cookiecutter i found this error ModuleNotFoundError: No module named 'cmsplugin_cascade'.
    Note : pipenv installation was successful

Installing dependencies from Pipfile.lock (001d02)…
  ================================ 64/64 - 00:17:49
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

@remoover
Copy link

remoover commented Jun 4, 2020

PLEASE SOLVE IT .. WE NEED ALSO.. THANK YOU --> URGENT

@jrief
Copy link
Member

jrief commented Jun 4, 2020

@pupattan The Pipfile as provided by the cookiecutter template referrs to the external dependency djangocms-cascade. So if that's missing, try to reinstall it.

@remoover When reporting bugs, please do so in a reproducible manner.

PLEASE SOLVE IT .. WE NEED ALSO.. THANK YOU --> URGENT

is not very informative to me.

@pupattan
Copy link
Author

pupattan commented Jun 28, 2020

@jrief Thanks for the info.
Could you please tell me how to integrate simply to existing CMS project (Python 3.8, django-cms 3.7.2, django 3.0,x)?
I found the following but looks very few info.

https://django-shop.readthedocs.io/en/latest/features.html#django-shop-directly-plugs-into-django-cms
https://django-shop.readthedocs.io/en/latest/tutorial/intro.html#adding-pages-to-the-cms

Can I use like a django app ? in INSTALLED_APPS or using Webhooks ?

I am ok with few tweaks if some support issue (deprecated usages) are there.

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

4 participants