| 1 | Development tools |
| 2 | ================= |
| 3 | |
| 4 | Plat/al relies on a few tools and base libraries. |
| 5 | |
| 6 | Django |
| 7 | ------ |
| 8 | |
| 9 | Our base framework, we're using the latest released version (currently 1.5.1). |
| 10 | Feel free to browse its excellent documentation at https://docs.djangoproject.com/ |
| 11 | |
| 12 | |
| 13 | Bootstrap |
| 14 | --------- |
| 15 | |
| 16 | Our web layout relies on Twitter's Bootstrap framework. |
| 17 | We use a minified version based on Bootstrap v2.2.2. |
| 18 | |
| 19 | The documentation is available at http://twitter.github.com/bootstrap/. |
| 20 | |
| 21 | |
| 22 | factory_boy |
| 23 | ----------- |
| 24 | |
| 25 | For testing, we rely on `FactoryBoy <http://factoryboy.rtfd.org>`_. |
| 26 | This library allows to define custom "factories" for each model, |
| 27 | which ease populating the database (in ``xnet.datasets``) or writing tests: |
| 28 | |
| 29 | .. code-block:: python |
| 30 | |
| 31 | class SomeTestCase(unittest.TestCase): |
| 32 | def test_disabled_account(self): |
| 33 | # Get a disabled account, don't bother filling any required field. |
| 34 | account = factories.AccountFactory(is_active=False, password='foo') |
| 35 | |
| 36 | self.assertFalse( |
| 37 | auth.authenticate(account.username, 'foo')) |