- Jan 15, 2017
-
-
Geert Kapteijns authored
-
- Dec 20, 2016
-
-
Geert Kapteijns authored
This does not work yet. I wrote some failing tests, but while I was doing that, I came to the conclusion that I want to make the route of the get request different from the route of the post request.
-
Geert Kapteijns authored
-
Geert Kapteijns authored
This custom factory subclasses factory.Factory, and overrides the build method, so that the model_class gets called with a dict of fields, instead of with keyword arguments. This is the way Django form classes require data to be passed to __init__.
-
Geert Kapteijns authored
-
- Dec 19, 2016
-
-
Geert Kapteijns authored
-
Geert Kapteijns authored
-
Geert Kapteijns authored
-
Geert Kapteijns authored
The acknowledgement message is no longer hardcoded in theses/views.py, but resides in the top-level strings module.
-
-
-
- Dec 18, 2016
-
-
Mathijs de Bruin authored
-
Mathijs de Bruin authored
-
Jean-Sébastien Caux authored
New Group defined: Developers. New Permission: can_view_docs_scipost (necessary to view the /docs/). Need to run the add_groups_and_permissions management command.
-
Mathijs de Bruin authored
-
Jean-Sébastien Caux authored
-
Jean-Sébastien Caux authored
Haystack search facility was required and is installed, with Whoosh engine. Requirements updated. Instructions for setting things up: haystack: http://django-haystack.readthedocs.io/en/v2.5.0/ (choice: Whoosh engine) sphinx: http://www.sphinx-doc.org/en/1.5.1/ sphinxdoc: http://django-sphinxdoc.readthedocs.io/en/latest/ In particular, a Project has to be defined in app sphinxdoc in order for docs to be displayed (starting at /docs/). New host_settings needed: HAYSTACK_PATH (for the location of the Whoosh index (suggestion: project's root); make sure this is not readable by site visitors)
-
- Dec 16, 2016
-
-
Geert Kapteijns authored
-
Geert Kapteijns authored
This function helps to create form data from models. See example given.
-
Geert Kapteijns authored
-
Geert Kapteijns authored
-
Geert Kapteijns authored
Removes some 40 lines of boilerplate, since CreateView handles the creation of a new ThesisLink.
-
Jean-Sébastien Caux authored
-
- Dec 15, 2016
-
-
Geert Kapteijns authored
A CreateView class based view should replace the current request_thesislink function based view, since it saves many lines of code and is less error prone and more easily readable.
-
Geert Kapteijns authored
-
https://bitbucket.org/scipostdev/scipost_v1Jean-Sébastien Caux authored
Merging JSC local changes (theses) to repo master
-
Jean-Sébastien Caux authored
-
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
-