Comments (11)
Well spotted! How could that stay in the code unnoticed for so long? It's probably time to add some tests.
I think this mistake is less likely to happen when statements like that are split up into 2 lines. The code also gets more readable and self-explanatory:
member_groups = request.user.groups.all()
list_list = List.objects.filter(group__in=member_groups).order_by('group', 'name')
Do you want to prepare a pull request?
from django-todo.
Great - I'm glad I wasn't making a mistake! I agree re. splitting the statements.
I'm not entirely sure what to do re. pull requests, particularly as the mistake isn't actually in the views.py file on github and the error is being introduced during pip installation? Any help would be much appreciated.
from django-todo.
Hmmm, when looking at the code (HEAD revision) it's all correct. The braces are there: views.py, line 55
Oh, I see: The changes that fixed the problem have been recently introduced, in commit 8ee2811. And the 1.5 version released on PyPI is older than that. In other words at release of a new version is needed. -- @shacker are you fine with that?
from django-todo.
Good sleuthing @bittner and thanks as always for handling the pypi releases. I actually was planning to introduce this weekend the new feature we discussed - adding the ability to create "Anyone" tickets. If you can hold off for the weekend, we can get that in place. Unless you think it makes sense to do two pypi releases.
from django-todo.
Perfect! Then please go ahead with the feature enhancements. Let's have a 1.6 release as soon as you're done with that.
Tests?
What do you think, can you manage to add some first tests, too? Either unit tests (preferably with py.test) or even BDD tests (using behave
and behave-django)? I can then help you with cross-version testing using tox and running the tests on a build server (Travis, Codeship, etc.).
django-todo
does not state anything about Python/Django version compatibility yet. And Python 3 is approaching as the default in huge leaps. tox
is pretty cool with being ready to face that, you can see it in action in some of the projects I (co-)maintain:
from django-todo.
OK, last night I refactored/modernized a bunch of crufty old code in todo, and today I added the ability to file unassigned tickets (these appear in the UI as "Anyone" tickets). Please give it a spin and let me know if you encounter any issues.
As for python 2/3 compatibility, I used to run it in python2 and today created a new virtualenv with python3 and that worked just fine, so I'm pretty sure we're good there. I've just added a note about this to the wiki documentation.
As for testing, you're totally correct of course, and it's a bit embarrassing not to have them. As ever, it's mostly a time thing. But I should really kick that off soon (unless you feel inspired to!)
Anyway, give it a spin and hopefully we can go forward with the 1.6 release.
from django-todo.
@shacker You're sure we're good there now. What about when the next PR comes along? How can you be sure your app will continue to work? You can't.
The only way to protect an app against regression and breakage is tests, which are run automatically when changes are introduced. See how we guard against regression and breakage in django-analytical and behave-django across all supported Python and Django versions.
In codeship-yaml I even run flake8
against all supported Python versions, because the checks are slightly, just slightly different on py3 vs. py2. That's even without any serious tests yet. Could be a starter example for you.
from django-todo.
Hey, you don't have to sell me on the importance of tests! I know missing tests are a wart on django-todo; just haven't gotten around to it. Back-story: this was the first Django app I ever wrote, 10 years ago, as a way to bring myself up to speed. Over that time I've maintained it lightly, but have never been able to convince an employer to use it instead of commercial offerings like Jira etc. I enjoy working on it sometimes, but don't have the time or motivation to put in a ton of time. But I am happy to shepherd its existence as an open source project. Contributions always welcome!
from django-todo.
I've added the basis for automated tests and QA to the project in PR #29.
After merging can you please test the package manually once again to make sure it still works (I removed an import in settings), and bump the version number to 1.6, please? I'll then push version 1.6 to PyPI, and we can party. 🎉
from django-todo.
I've released version 1.6 on PyPI. Let's party!
from django-todo.
Awesome, thank you! I'll get that Travis repo set up tonight, hopefully.
from django-todo.
Related Issues (20)
- Social message response HOT 4
- Django HOT 1
- Where do i place the Navigation CSS? HOT 2
- TypeError: view must be a callable or a list/tuple in the case of include(). HOT 2
- Login Loop HOT 2
- Add Task Button not responding HOT 5
- pip install django-todo didn't install bleach HOT 1
- Match registered users sending emails to tracker and add them to "created by" HOT 1
- setup.py imports django, which it shouldnt HOT 6
- Occasional crasher when importing CSVs HOT 7
- Failed migration
- Self Test Fails HOT 1
- Add SECURITY.md HOT 2
- Please do docker-compose HOT 8
- Demo `500: Hard Crash` when entering comments HOT 2
- manage.py is missing HOT 1
- python3 manage.py migrate todo: multiple exception types must be parenthesized HOT 2
- todo/home.html not extending project home.html
- pipenv path and executable path issues HOT 3
- Relate tasks to other objects HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-todo.