- Dec 15, 2016
-
-
Jorran de Wit authored
-
Jorran de Wit authored
This commit contains the first working view test for the `request_commentaries` view.
-
https://bitbucket.org/scipostdev/scipost_v1Jorran de Wit authored
Merge branch 'refactor-theses' of https://bitbucket.org/scipostdev/scipost_v1 into commentaries/wip-jorran
-
Jorran de Wit authored
-
Jorran de Wit authored
Move form validation and saving of instances to the form class. From here you are able to instantly save your validated form to the database. Further reduces the size of the views. Form may need error handling on not having found a Contributor before saving the form instance.
-
Geert Kapteijns authored
-
Geert Kapteijns authored
You can now just call ContributorFactory() to get a freshly instantiated Contributor to be used for testing purposes.
-
Geert Kapteijns authored
You can use these UserFactory to create a new user with an associated Contributor. I could not get it to work the other way around.
-
Geert Kapteijns authored
Create fixtures for contributors, groups and permissions.
-
Geert Kapteijns authored
-
Boris Ponsioen authored
-
- Dec 14, 2016
-
-
Geert Kapteijns authored
A blank domain throws an error in /theses/. I've also installed factory_boy (pip install -r requirements.txt to get it) and set up a ThesisLinkFactory and a unit tests that tests whether ThesisLink validates for a blank domain field. Not sure if this is exactly how you're supposed to validate a model, but it's a start. First unit test of the project, whoohoo!
-
Geert Kapteijns authored
This is recommended. Also give names like MASTER_THESIS = 'MA' to avoid magic strings and allow for easy reference, e.g. thesis.type = ThesisLink.MASTER_THESIS. This sort of thing helps in maintainability of the codebase, since if we want to change the abbreviation to 'MASTER' for some reason, we have it defined in one place, and not in 100 places in the code.
-
Geert Kapteijns authored
test_forms.py, test_models.py, test_views.py, as per recommendation of the two scoops book.
-
Geert Kapteijns authored
-
Geert Kapteijns authored
-
Boris Ponsioen authored
-
Boris Ponsioen authored
-
Boris Ponsioen authored
Also slightly pep-improves the models and views.
-
Geert Kapteijns authored
-
Jorran de Wit authored
Lost order argument in query for CommentarySearchForm results in the last commit.
-
Jorran de Wit authored
Reduce the amount of logic in the `commentaries` and `browse` views methods in the `Commentaries` app. Further, added a return method to the `CommentarySearchForm` to help thin out code in the view.
-
Jorran de Wit authored
Implemented basic modelmanager on Commentary model. Created `vetted` and `awaiting_vetting` methods and ipmlemented to few view methods.
-
- Dec 13, 2016
-
-
Jorran de Wit authored
Commentary model inherits from TimeStampedModel now. It also includes migrations related to the inheritance: - Add added field on Commentary - Alter field last_activity on Commentary
-
Geert Kapteijns authored
Right now, this only creates a contributor based on a username. But I hope that, in the future, we can populate an entire development database with this command.
-
Geert Kapteijns authored
-
Jorran de Wit authored
The core model is extended with an abstract model called TimeStampedModel. Future and existing models should inherit from this model to include the default timestamp fields.
-
Geert Kapteijns authored
-
Geert Kapteijns authored
- Alter field in_agreement on comment - Alter field in_disagreement on comment - Alter field in_notsure on comment - Alter field is_cor on comment
-
- Dec 12, 2016
-
-
Geert Kapteijns authored
I've opted for hanging indentation foo = long_function_name( var_one, var_two, var_three, var_four) instead of aligning with opening delimiter foo = long_function_name(var_one, var_two, var_three, var_four) because the former makes more sense to me. See https://www.python.org/dev/peps/pep-0008/#indentation
-
- Dec 10, 2016
-
-
Jorran de Wit authored
-
Jorran de Wit authored
-
Jean-Sébastien Caux authored
First pull request :-)
-
Jean-Sébastien Caux authored
-
Jorran de Wit authored
-
- Dec 09, 2016
-
-
Jorran de Wit authored
-
- Dec 08, 2016
-
-
Jorran de Wit authored
-
Jean-Sébastien Caux authored
-
Jean-Sébastien Caux authored
-
- Dec 07, 2016
-
-
Jean-Sébastien Caux authored
-