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

Update Django to 1.11 LTS #1077

Merged
merged 19 commits into from
Aug 23, 2017
Merged

Conversation

Pacu2
Copy link
Contributor

@Pacu2 Pacu2 commented Aug 3, 2017

Closes #810

@Pacu2 Pacu2 force-pushed the feature/moving-to-django-1.11-lts branch from 40d4380 to 66aef99 Compare August 3, 2017 12:23
@Pacu2 Pacu2 force-pushed the feature/moving-to-django-1.11-lts branch from 7c7536a to 86b4ea7 Compare August 3, 2017 13:56
@codecov-io
Copy link

codecov-io commented Aug 3, 2017

Codecov Report

Merging #1077 into master will increase coverage by 0.23%.
The diff coverage is 77.27%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1077      +/-   ##
==========================================
+ Coverage   63.42%   63.65%   +0.23%     
==========================================
  Files         105      106       +1     
  Lines        5818     5869      +51     
  Branches      721      729       +8     
==========================================
+ Hits         3690     3736      +46     
- Misses       1991     1994       +3     
- Partials      137      139       +2
Impacted Files Coverage Δ
saleor/registration/urls.py 100% <ø> (ø) ⬆️
saleor/dashboard/product/views.py 17.81% <0%> (ø) ⬆️
saleor/settings.py 86.95% <100%> (+0.11%) ⬆️
saleor/product/utils.py 79.41% <100%> (ø) ⬆️
saleor/site/utils.py 95% <100%> (+0.55%) ⬆️
saleor/dashboard/product/forms.py 72.34% <100%> (+0.14%) ⬆️
saleor/checkout/core.py 90.57% <100%> (ø) ⬆️
saleor/checkout/views/summary.py 43.2% <100%> (ø) ⬆️
saleor/core/utils/__init__.py 69.79% <100%> (ø) ⬆️
saleor/dashboard/discount/forms.py 53.33% <100%> (+1.06%) ⬆️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7fcadde...d2ad605. Read the comment docs.

@Pacu2 Pacu2 force-pushed the feature/moving-to-django-1.11-lts branch from 86b4ea7 to 8ccacb7 Compare August 3, 2017 13:58
@Pacu2 Pacu2 changed the title Feature/moving to django 1.11 lts Update Django to 1.11 LTS Aug 3, 2017
{% if choice.data.value in choice.value %}
checked="checked"
{% endif %}
>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep inputs inline

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I just didn't like that over 200 chars long line

@@ -222,6 +222,7 @@ def delete(self):


class ProductImageForm(forms.ModelForm):
use_required_attribute = False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you set that attribute to False?

Copy link
Contributor Author

@Pacu2 Pacu2 Aug 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a problem, with incorrect browser validation of required fields.
While on dashboard -> product -> images
I couldn't edit image's description, as it required me to upload a new photo instead.

@patrys
Copy link
Member

patrys commented Aug 4, 2017

Shouldn't we include https://github.com/anymail/django-anymail along with templated email?

@@ -72,7 +72,7 @@ def login(request, checkout):
Allows user to choose if he wants to login before checkout or continue
as an anonymous user
"""
if request.user.is_authenticated:
if request.user.is_authenticated():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is backwards. Django seems to be moving away from this being a method (it's currently a property that returns a callable compatibility wrapper).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Django 1.8, where is_authenticated is still a method, this will always return True, it was incorrectly written at the first time. If we want to keep compatibility, it should stay this way.
It should be supported till Django 2.0.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to support any version earlier than 1.11 as it's an LTS release.

@@ -0,0 +1,84 @@
from django import forms
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this file brought in verbatim? If so, what is its license? Does it require attribution?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified few lines, but most of it comes from its original source.
It's licensed under MIT conditions, can be found at:
https://github.com/florent1933/django-materializecss-form/blob/master/LICENSE
I've included the license in its folder.

{{ payment_url }}

Sincerely,
Saleor Team
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not hardcode "Saleor" here. Please use whatever we put in the site title.

requirements.txt Outdated
docutils==0.13.1 # via botocore
elasticsearch==2.4.1
enum34==1.1.6 # via cryptography
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was generated using Python 2. Please rebuild using Python 3 as that's the default version we're targeting.

@Pacu2
Copy link
Contributor Author

Pacu2 commented Aug 4, 2017

Replying to #1077 (comment) by @patrys:

Shouldn't we include https://github.com/anymail/django-anymail along with templated email?

Do we want to put it as a default mailing service?
I think we should leave this choice for the users, there's not much we can do with this package, as its set up varies for each Email Service Provider.

@patrys
Copy link
Member

patrys commented Aug 4, 2017

I'm asking because some users will treat Saleor like an out of the box solution and expect email to Just Work™ (save for setting some environment variables).

@Pacu2
Copy link
Contributor Author

Pacu2 commented Aug 4, 2017

@patrys templated_email package 'just works', sending emails using django.core.mail, it's possible to integrate it with django-anymail, shall we?

@Pacu2 Pacu2 force-pushed the feature/moving-to-django-1.11-lts branch 2 times, most recently from e07d1e2 to 34d60fd Compare August 8, 2017 07:15
@Pacu2 Pacu2 force-pushed the feature/moving-to-django-1.11-lts branch from 34d60fd to 1ead8c9 Compare August 8, 2017 07:59
@patrys
Copy link
Member

patrys commented Aug 16, 2017

Please bump the Django requirement in requirements.in.

@Pacu2
Copy link
Contributor Author

Pacu2 commented Aug 23, 2017

@patrys Done, Django version updated

@patrys patrys merged commit e9bf520 into saleor:master Aug 23, 2017
@patrys
Copy link
Member

patrys commented Aug 23, 2017

🎊

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

Successfully merging this pull request may close these issues.

None yet

4 participants