Conversation
Changes Unknown when pulling 9379481 on unmade:refactor into ** on joshmaker:master**. |
4 similar comments
Changes Unknown when pulling 9379481 on unmade:refactor into ** on joshmaker:master**. |
Changes Unknown when pulling 9379481 on unmade:refactor into ** on joshmaker:master**. |
Changes Unknown when pulling 9379481 on unmade:refactor into ** on joshmaker:master**. |
Changes Unknown when pulling 9379481 on unmade:refactor into ** on joshmaker:master**. |
Changes Unknown when pulling a7b48ba on unmade:refactor into ** on joshmaker:master**. |
Changes Unknown when pulling 7dec646 on unmade:refactor into ** on joshmaker:master**. |
Finally, all tests seems to pass successfully.
So I've fixed tox file and hardcoded selenium==2.53.6 version for py34. Initially py35 was added to
|
Changes Unknown when pulling 25a06a9 on unmade:refactor into ** on joshmaker:master**. |
3 similar comments
Changes Unknown when pulling 25a06a9 on unmade:refactor into ** on joshmaker:master**. |
Changes Unknown when pulling 25a06a9 on unmade:refactor into ** on joshmaker:master**. |
Changes Unknown when pulling 25a06a9 on unmade:refactor into ** on joshmaker:master**. |
@unmade thanks for the pull request! There are a lot of commits to look through, so it may take me a little while before I can review them all. Which browser is having problems loading content with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you put a lot of work into this and most of the changes you have here look very good. I've left a few questions, but hopefully we can work together to get your fixes merged into my master
branch soon.
.gitignore
Outdated
@@ -1,7 +1,16 @@ | |||
*.pyc | |||
__pycache__ | |||
|
|||
.idea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor issue, but I'd like to leave IDE files to the user's global gitignore
file and only include build files specific to this project here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
CHANGELOG.rst
Outdated
@@ -1,6 +1,14 @@ | |||
Changelog | |||
========= | |||
|
|||
**1.3.1 (June 8, 2017)** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this change includes both bug fixes and fixes, I think it warrants a bump to version 1.4
. I'm going to try to follow the semantic versioning rules for these version numbers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to 1.4
locking/urls.py
Outdated
@@ -6,6 +6,8 @@ | |||
|
|||
__all__ = ('urlpatterns', ) | |||
|
|||
app_name = 'locking' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like this variable is used in this file, can we delete it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I follow this example from documentation https://docs.djangoproject.com/en/1.9/topics/http/urls/#id4
For example, specifying app_name
in url conf gives you ability to reverse urls in package like reverse(locking:locking-api)
and include package urls in project like:
url(r'^locking/', include('locking.urls', namespace='lock')),
and reverse it reverse('lock:locking-api')
.
But, unfortunately, this doesn't make sense in Django 1.8
tests/settings.py
Outdated
'django.template.loaders.filesystem.Loader', | ||
'django.template.loaders.app_directories.Loader', | ||
) | ||
if django.VERSION < (1, 8): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Versions less than 1.8 are no longer supported, so I think we can just delete this block of code instead of wrapping it in a conditional. (I guess we'd need to also remove Django 1.7 from the tox tests as well).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dropped support for Django 1.7
locking/admin.py
Outdated
if object_id is not None: | ||
reverse_kwargs['object_id'] = object_id | ||
|
||
return reverse('locking:locking-api', kwargs=reverse_kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit introduces a new required namespace for the locking API URLs. If users follow the instructions in the readme and add:
url(r'^locking/', include('locking.urls')),
To their urls.py
file, then they will get the error NoReverseMatch: u'locking' is not a registered namespace
. Is there a way to update locking/urls.py
to add the namespace automatically?
If not, you'll need to:
- update the readme
- document this breaking change in the changelog
- change the version number to 2.0.0 to reflect the fact that this has backwards incompatible changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you're right, Django 1.8 will get NoReverseMatch
error, if they don't provide proper namespace. For more info, see my comment for app_name.
I discarded my changes for urls and namespace for now.
}) | ||
|
||
def locking_admin_form_js(self, request, object_id): | ||
"""Render out JS code for locking a form for a given object_id on this admin""" | ||
return render(request, | ||
'locking/admin_form.js', | ||
{'options': self.get_json_options(request, object_id)}, | ||
content_type="application/json") | ||
content_type="application/javascript") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to try to stick to application/json
because that's what the JSON spec recommends and that's what Django's built in JsonResponse object uses.
I'm using the JsonResponse
object elsewhere in this project, so if that isn't causing your problems maybe there is a way to work around this issue? Let me know what problem you are seeing and maybe I can help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my console I see the following error: http://take.ms/2YO6t
My browser is Chrome 58.0.3029.110 (64-bit) on macOS Sierra
In Safari everything seems to be OK.
Anyway, wouldn't application/javascript
right content_type for js
file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, wouldn't application/javascript right content_type for js file?
Yep, it totally would. My mistake for thinking it was a .json
file
Changes Unknown when pulling 0811fcc on unmade:refactor into ** on joshmaker:master**. |
@joshmaker Thank you for taking your time! I've made fixes to my PR and leave comments to make things more clear. |
Changes Unknown when pulling 6728c5f on unmade:refactor into ** on joshmaker:master**. |
Changes Unknown when pulling 082144e on unmade:refactor into ** on joshmaker:master**. |
Josh, once again, big thanks to you! :) |
Hello, Josh!
Thank you for a great app.
Unfortunately, I had have some troubles:
application/json
instead ofapplication/javascript
).^locking/
.I fixed troubles above and also added localization (with russian locale available). I've also moved out tests from app folder.
FYI: I ran tox locally and everything went fine, except py34.