Commit graph

1105 commits

Author SHA1 Message Date
Aurélien Delobelle
0149323b79 Fix profile test 2017-10-26 01:40:17 +02:00
Martin Pepin
c575f75591 Merge branch 'aureplop/supportBDS/migrations' into 'supportBDS'
Clean supportBDS migrations.

See merge request !250
2017-10-26 01:09:07 +02:00
Aurélien Delobelle
5621c6f81e Merge branch 'Kerl/supportBDS/migrations' into 'aureplop/supportBDS/migrations'
Kerl/support bds/migrations

- merge supportBDS
- rajoute des classes `Meta` disparues et autres renommages

See merge request !266
2017-10-26 01:07:00 +02:00
Martin Pépin
e867662996 renamings in the migrationq, missing Meta classes 2017-10-25 23:36:18 +02:00
Martin Pépin
9787770fc6 Merge branch 'supportBDS' into blah 2017-10-25 23:08:38 +02:00
Aurélien Delobelle
c65ddba1d6 Fix and merge kfet migrations 2017-10-12 00:04:06 +02:00
Martin Pepin
8602c2bc77 Merge branch 'aureplop/supportBDS/assoc_perms' into 'supportBDS'
Fix permissions setup of associations.

See merge request !249
2017-09-09 15:58:37 +02:00
Martin Pépin
52aadc636b Add custommail perms to staff groups 2017-09-09 15:55:22 +02:00
Aurélien Delobelle
29d288c567 Fix permissions setup of associations.
- Permissions of 'gestion' app are correctly added to the staff groups
of associations.
- Add tests to ensure staff groups of COF and BDS are correctly setup.
- Shortcut functions are added to retrieve COF and BDS association.
2017-09-05 15:02:33 +02:00
Aurélien Delobelle
5d572b3603 Clean supportBDS migrations.
- Fix some issues and improve efficiency of some RunPython code in
migrations.
- Merge some migrations.
- To simplify, any RunPython don't get a revert function.
2017-09-05 14:41:13 +02:00
Aurélien Delobelle
131c45e1c7 Add tests to check data migrations of supportBDS.
Run 'bash provisioning/check_migrations_supportBDS.sh' from the vagrant
VM.

This will do the following:
- delete the existing database 'cof_gestion', if applicable,
- apply migrations to render the database as pre-supportBDS,
- the last pre-supportBDS migration of 'cof' app creates some instances
using old database schema,
- supportBDS migrations are applied,
- finally, the 'check_olddata' command of 'cof' app ensures data has
been correctly migrated.

This commit should be reverted before reaching production stage.
2017-09-05 14:16:59 +02:00
Aurélien Delobelle
3842b5d160 Merge branch 'Kerl/supportBDS/events' into supportBDS
Move event-related models from 'cof' app to 'gestion' app.

Add 'Association' model to register name, related groups (buro,
members), etc.

Club is now associated with a single Association instance.

Migrations take care of these changes.
2017-08-11 19:59:24 +02:00
Martin Pépin
d4669ec873 Model.natural_key should return a list/tuple 2017-08-11 15:42:33 +01:00
Martin Pépin
714e702af7 Use natural foreign keys to refer associations 2017-08-11 15:34:19 +01:00
Martin Pepin
be87708704 Merge branch 'aureplop/supportBDS/clubs' into 'supportBDS'
Clubs - Partie 1

See merge request !240
2017-08-09 23:24:10 +02:00
Aurélien Delobelle
fe840f2003 Add club view / update profile view
Profile view
- Let the user see his information.
- List the clubs whose he is a member.

Profile edition view
- Renamed from previous "profile" view
- User can now change "occupation" field.

Club detail view
- Informations about a club.
- Accessible by staff members and "respos" of the club.
- List members, with subscription fee (if applicable).

Club admin
- Change memberships of clubs added.
2017-08-09 12:53:44 +02:00
Martin Pépin
10543341b7 The location is not mandatory for an event 2017-08-07 21:17:24 +01:00
Martin Pépin
b1a56b07f3 Bump django-bootstrap-form to 3.3 2017-08-06 20:55:12 +01:00
Martin Pépin
2fb56afa95 typos + renamings + other MR changes 2017-08-06 20:05:07 +01:00
Martin Pépin
e578aef74d Fix circular deps in the migrations 2017-08-06 18:28:07 +01:00
Martin Pépin
894c70149c Add a fixture with 2 events for testing purpose 2017-06-25 20:27:58 +01:00
Martin Pépin
7633ed1dab Typo in requirements.txt: '=' -> '==' 2017-06-25 18:04:30 +01:00
Martin Pépin
7967983b5c More sophisticated admin site for the gestion app
- Nested inlines
- Limiting access to the events : you can only edit/create events linked to
  associations you for which you have the `<assoc>.buro` permission.
2017-06-25 17:57:23 +01:00
Martin Pépin
a9e6ef6c5c Create an Association model
The previous fk and m2m to groups representing associations are replaced by a
proper link to the Association table.
2017-06-24 23:45:04 +01:00
Martin Pépin
b68590ffd7 Set the permissions for buro and members
BDS + COF

The permissions assignation is triggered by the `post_migrate` signal since the
permission table will only be populated after the migrations have been applied.
2017-06-24 23:45:04 +01:00
Martin Pépin
a1ffb630c0 Setup events + add verbosity in gestion.models
- Mark more strings for further translations
    - in verbose names
    - in the __str__ method
- Turn all verbose names into lowercase
- Add more verbose names

- Set an ordering on gestion.EventCommentField

- More database constraints on EventCommentValue
    - `TextField` is not nullable
      (https://docs.djangoproject.com/en/1.11/ref/models/fields/#null)
    - `unique_together` constraint on the two fk
2017-06-24 23:44:58 +01:00
Martin Pépin
cacdde3f87 Remove duplicate locations 2017-05-14 15:47:07 +01:00
Martin Pépin
8a751e5c85 Use a separate models for events' locations 2017-05-14 13:02:06 +01:00
Martin Pépin
18ee33e1e0 Remove the EventTimeSlot model
It was pointless and is replaced by 3 additionnal fields in the `Event`
model: `location`, `start_date`  and `end_date`.
2017-04-05 00:11:24 +01:00
Martin Pépin
7c0bd2a271 Upgrade to Django's actual 1.11 release 2017-04-04 17:29:15 +01:00
Martin Pépin
8a346bf834 Reformat code in 79 columns 2017-04-01 18:29:36 +01:00
Martin Pépin
ec3a9a9658 Remove every occurrence of Event from views, forms, etc
The views have to be re-implemented later
2017-04-01 14:29:02 +01:00
Martin Pépin
745e7a1c0c register the events stuff into the admin site
A simple admin interface which may be modified later
2017-04-01 14:26:05 +01:00
Martin Pépin
c217b549bd Move the events stuff to gestion
- The models are moved to the `gestion` app
- A new field `associations` is added
- The location and datetime fields are removed in favour of a new model
  `EventTimeSlot`
- The old events are migrated to the new app and linked to the
  `cof_buro` association
2017-04-01 14:25:48 +01:00
Aurélien Delobelle
95b96d470f Merge branch 'Kerl/1_11_urls' into 'supportBDS'
Properly include ddt's urls using `include`

See merge request !190
2017-03-26 15:41:12 +02:00
Martin Pepin
33dedc7474 Merge branch 'aureplop/1_11/fix_querysets' into 'supportBDS'
Aureplop/1 11/fix querysets

See merge request !183
2017-03-19 16:16:05 +01:00
Martin Pépin
1a107be4ba Properly include ddt's urls using include 2017-03-18 19:14:51 +00:00
Aurélien Delobelle
e2c4214efc fix history kpsul view 2017-02-25 01:36:53 +01:00
Aurélien Delobelle
a98c6b233e fix checkout data error on k-psul 2017-02-25 01:30:26 +01:00
Qwann
e1713a1d4f Merge branch 'Kerl/datetime_warnings' into supportBDS 2017-02-24 15:02:27 +01:00
Qwann
9c6f5533ec Merge branch 'supportBDS' of git.eleves.ens.fr:cof-geek/gestioCOF into supportBDS 2017-02-23 19:00:58 +01:00
Qwann
486d3c4ced Merge branch 'Kerl/fix_autocomplete' into supportBDS 2017-02-23 18:53:55 +01:00
Martin Pépin
80f1514d39 handle timezones in petits_cours_views 2017-02-23 18:35:38 +01:00
Martin Pépin
1663a03a33 Use timezones everywhere in migrations 2017-02-23 18:33:44 +01:00
Martin Pepin
0e4cfc5121 Merge branch 'Kerl/django111-packages' into 'supportBDS'
Upgrade to Django 1.11

- We upgrade our django packages to 1.11 (beta 1)
- We apply some necessary changes in the settings file
- We prepare to upgrade Django-autocomplete-light
- We upgrade some other packages

See merge request !179
2017-02-23 17:58:28 +01:00
Martin Pépin
856faf2b73 Merge branch 'supportBDS' into Kerl/django111-packages 2017-02-23 17:56:12 +01:00
Martin Pepin
646b213d97 Merge branch 'Kerl/django111-urls' into 'supportBDS'
Write modern-style urls

- Proper use of include
- Defining namespaces (I do not use them for now because many urls are
  going to change)
- Do not try to reverse with old-style references: 'cof.views.XXX'

See merge request !178
2017-02-23 17:32:05 +01:00
Martin Pepin
cc25685aa3 Merge branch 'Kerl/bds_groups' into 'supportBDS'
BDS groups and permissions

Creates groups and permissions for the BDS members and staff.

Fixes #136 

See merge request !176
2017-02-23 12:58:44 +01:00
Martin Pépin
5ce4809f06 Merge branch 'supportBDS' into Kerl/bds_groups 2017-02-23 12:58:10 +01:00
Martin Pepin
4d825b485d Merge branch 'Kerl/clubs_support' into 'supportBDS'
Kerl/clubs support

- Add the club-related models
- Register them into the admin site in order to be able to play with them

See #133 

See merge request !175
2017-02-23 12:46:27 +01:00