Project has Vagrantfile
to speed up development setup. So easiest way is:
- Install Vagrant
- run
vagrant up
inside project
Gulp is used to compile SASS files into CSS.
- Install latest Node.js locally
npm install -g gulp
cd apps/common/static
npm install
From host machine (i.e. not Vagrant box):
start-gulp.cmd
in root (create & test similar for Linux environment)- or
cd apps/common/static; gulp
BTW, it'll start BrowserSync on :3000 port with proxying to Django. This way styles are refreshed without reload, also Django templates are watched and page is refreshed upon change.
- No special steps required: generated css files are stored in css.generated and committed into git.
- no minification yet in gulp (there is some in compress, I think).
- .map files are currently not committed, use locally for development.
Project mostly uses outdated hand-made css layouts, with a lot of things messing up in all.css + custom.css.
To switch page to newer styles replace base styles:
{% block base_resources %}
<link rel="stylesheet" href="{% static 'css.generated/base.css' %}"/>
<script src="{% static 'js/libs/jquery-1.12.4/jquery.min.js' %}"></script>
{% endblock %}
This way you'll have:
- Bootstrap (so default
.row
/.col.*.*
/btn
, etc) - Use single per-page stylesheet (possibly split into partials via SASS) so that it's under control
- Use common variables via SASS for colors, margins, etc
Some highlights:
api_urls
is place to link Routers for each module, reason: to load it separately fromurls
modules and their dependencies. Not strictly required, might be changed if neededapi_views
modules used to store viewsets and other things/{account_url}/api/v1/
is binding point for all apis/api/v1/
is binding point for "global" apis likeaccounts/*
common.api_urls
single router is constructed here, uniting routers from different apps- currently mapping is done without any app prefixes, there was no other good way to have single entrypoint to list all available APIs from different apps (Yuri), if you know better way - you're welcome to fix it.
- there is a couple of useful mixins in
common.mixin
likeGetMembershipWithURLFallbackMixin
(used to get_membership and account without session requirement)PerActionSerializerModelViewSetMixin
(to have different serializers for different verbs, for less detailed list for example)
- and also
permissions.rest_permissions
with some common permission classes
Auth:
- Token Auth:
POST /api/v1/token-auth/
body:{"username": "user@email.com", "password": "password-here"}
- Store
token
field from response - Then add
Authorization: Token $token$
header to any subsequent request, this will authorize as user - Token may expire some time in future (currently no) in this case extra login is required
Based on the software as it wat migrated to Bitbucket repo on 30-Sep-2015. Adds the following changes:
- Make system robust for missing avatar / profile pictures. Just show the default picture when no picture can be read.
- Fix problem with calendar date localization
- Fabric deployment automation: functions to support configurtion and control of Supervisor, uWSGI and nginx services.
Changes to Fabric deployment automation:
- support for side-by-side deployment of releases; functions to deploy, remove and activate releases.
- support for forward and backward database migrations.
Feature: RSVP:
- added widget to set RSVP response / view current response.
- added table with RSVP per invitee in the meeting organiser's view.
- added expandable div with RSVP response history per invitee.
Changes to Fabric deployment automation:
- improve robustness in handling changes (add 'collectstatic' to deploy function and PIP update to activation function).
- cleanup obsolete code.
Bugfix: board names may contain spaces and HTML escapes
Bugfix: User.get_short_name() and User.get_full_name() to return names rather than parts of the e-mail address.
Bugfix:
- Problem with croppy, JSON fields and PostgreSQL is now programatically patched
Feature: configurable pricing
- added 2016 plans
- made "pricing" and "change plan" pages render dynamically based on available plans
Feature: PDF viewer
Bugfix: new settings for outgoing e-mails
AddedHotjar site analytics script
- Fixed tests
- Added customer.io integration
- Lockdown delete and share
Documented in confluence page.
- Open a terminal
- Activate the boarddirector dev virtualenv
- Navigate to the root directory of the boarddirector project
- type:
$ fab deploy:<version>
- type:
$ fab activate:<version>
(where is the release tag to be deployed/activated)