codeeu / coding-events

A Django app for adding EU Code Week events and showing them on a map.
http://events.codeweek.eu
MIT License
17 stars 36 forks source link

Add support to main contact and secondary ambassadors #428

Closed michelesr closed 8 years ago

michelesr commented 8 years ago

In order to update the database the following commands are to be executed:

./manage.py schemamigration api --auto
./manage.py migrate api

The role and is_main_contact field can be manipolated from the Api -> User profiles section of the admin interface.

I moved the contacts information in the top of the page as suggested by Alessandro Bogliolo. I leave further template changes to you.

Also improved the test implemented in 2b429ea8af4de0a5876b937

michelesr commented 8 years ago

Test are passing in local... maybe the db environment in travis has to be migrated.

(codeweek)~/Projects/coding-events $ manage.py test
==========================================================================     
test session starts
===========================================================================
platform linux2 -- Python 2.7.10 -- py-1.4.23 -- pytest-2.6.0
plugins: django, cov
collected 95 items

api/tests/test_processors.py ..............................
api/tests/test_restapi.py ..
mailer/test_mailer.py .
web/tests/test_event_search.py ...............
web/tests/test_event_views.py ...............
web/tests/test_events_processors.py ............................
web/tests/test_site.py ...
web/tests/test_user_processors.py .

======================================================================= 
95     passed in 27.28 seconds
michelesr commented 8 years ago

I pushed the migration file, maybe will make the test on travis pass. Let's see

michelesr commented 8 years ago

Here we go!

mitio commented 8 years ago

Nice work! This is a bit bigger than the other PRs. I'll try to have a look later this evening and try to get it merged today.

mitio commented 8 years ago

My Python is rusty and I have practicaly zero experience with Django, but after a quick overview of the code I think it looks good.

Merging this. Thank you a ton, @michelesr!