Commit graph

52 commits

Author SHA1 Message Date
Aurélien Delobelle
0149323b79 Fix profile test 2017-10-26 01:40:17 +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
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
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
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
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
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
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
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
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 Pépin
7988fb24a0 Merge branch 'supportBDS' into Kerl/clubs_support 2017-02-23 12:35:37 +01:00
Martin Pépin
7d1c1fc868 Specify the on_delete strategy
- Remove an absurd debug line in the migration
- Specify the on_delete strategy for the club-related models
2017-02-23 10:56:36 +01:00
Martin Pépin
e1bab7e4ed Use the AppConfig class 2017-02-23 01:56:59 +01:00
Martin Pépin
1aed36330f 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'
2017-02-23 01:52:55 +01:00
Martin Pépin
9f401b66e9 Specify the on_delete attribute everywhere
- Models
- Migrations
2017-02-23 01:40:25 +01:00
Martin Pépin
f8a8465630 Remove useless imports 2017-02-22 15:23:37 +01:00
Martin Pépin
1f85f75896 Include the Clubs into the admin site 2017-02-20 01:16:50 +01:00
Martin Pépin
669129e30d Move the club model to the gestion app
- Move the model
- Add some BDS-related fields
- Add an `associations` fields to be able to separate the clubs between
  the different associations using groups
2017-02-20 01:12:06 +01:00
Martin Pépin
859f191894 Simpler admin interface 2017-02-18 19:06:43 +01:00
Martin Pépin
659c6e720a Merge branch 'master' into supportBDS 2017-02-12 19:36:17 +01:00
Martin Pépin
e1a8c0e8dd Add missing files 2017-02-12 19:21:53 +01:00
Martin Pépin
1d7499d3b2 simplify profile edition and test it 2017-02-12 19:21:53 +01:00
Martin Pépin
0420839b20 Test the authentication
- An "outsider" must use django's authentication backend
- A user with a login_clipper should use CAS
2017-02-12 15:38:20 +01:00
Martin Pépin
8b620a5319 PEP8 in gestion/tests.py 2017-02-12 15:38:20 +01:00
Martin Pépin
a28c00e474 Move the auth stuff to gestion/
- The login views are in `gestion/`
- The templates are under `gestion/templates/gestion/`
- `cof/shared.py` moves to `gestion/` and is splitted into 3 files:
    - The auth backends are in `backends.py`.
    - The context_processor is in `context_processor.py`
    - The LOCK/UNLOCK functions remain in `shared.py`
2017-02-12 15:38:14 +01:00
Martin Pépin
50b667993f Merge branch 'master' into supportBDS
- Mise en page
- Cleanup des petits cours
- Utilisation de custommail
- Utilisation du ldap du SPI pour fetch les nouveaux comptes
2017-02-12 04:26:43 +01:00
Qwann
b16219f8ee fixing profile view 2017-02-11 17:57:37 +01:00
Michele Orrù
f0c3def935 Make the test really works.
This fixes the proble with debug_toolbar,
the fucking toolbar that messes all your tests.
2017-02-11 15:47:31 +01:00
Michele Orrù
376e829502 Reaching a point where I can query /k-fet.
Edit forms and views in app kfet to make the depend on gestion.Profile and not
on cof.CofProfile.
2017-02-11 15:07:45 +01:00
Michele Orrù
f50ef1d51a Merge remote-tracking branch 'origin/supportBDS-fixes1' into supportBDS 2017-02-11 14:26:55 +01:00
Martin Pépin
b639c04549 Fix the registration forms
- The former `RegistrationUserProfileForm` is splitted in two.
- There is a new form: `RegistrationCofProfileForm`
2017-02-11 12:42:36 +01:00
Martin Pépin
b1cf96d0ae Move profile editing to gestion 2017-02-11 01:43:17 +00:00
Michele Orrù
815a5f274c Fix some reviewing considerations.
- appropriate naming for migration
- remove __future__ imports.
- remove "CofProfile" left in kfet/models.py
2017-02-11 00:33:46 +01:00
Michele Orrù
25c3106168 Add some tests about how profiles types should relate to each other. 2017-02-11 00:33:36 +01:00
Michele Orrù
22da04c3e2 s/cofprofile/profile/g into k-fêt.
This commit also restores the only unittest present.
2017-02-11 00:32:58 +01:00
Martin Pépin
58d708b791 Move profile editing to gestion 2017-02-10 23:50:19 +01:00