Age | Commit message (Collapse) | Author |
|
These charts are (of course) not quite as advanced as the Google ones,
but avoids an external depdendency on Google and indeed the local js
completely. Also makes for a much faster rendering of the pages with
feedback.
This leaves the admin-only time graph as the only jsapi depdendency on
google, to be handled later.
|
|
|
|
If there were no questions we'd be fine, but if there were questions
of type "rate answer" but not a single answer, it would crash. That's
obviously not right...
|
|
|
|
Previously we'd in many places pass down the value directly from get or
post requests to a lower layer, only to have that layer throw an
exception because it wasn't an integer, or we'd ust wrap it in int()
which also causes a hard exception when it's not an integer.
Instead create a small wrapper for get_int_or_error() which can be
called with a parameter that's supposed to be integer, and will then
just return a 404 if the parameter doesn't exist or is not an integer.
These are all "should never happen" scenarios, so not generating hard
crashes and stackdumps are an improvement.
None of these were places where the actual bad data would get anywyhere,
they would all just cause an ugly exception, but should get fixed
regardless.
One or two instances spotted by Daniel Gustafsson, and then a lot of
grep to try to find most of the rest.
|
|
Instead of firing off one query per question, use an aggregate to bring
back all the data at once and do the final round of summarization in the
python layer.
Can be improved further, but getting rid of the roundtrips is a good
start.
|
|
|
|
|
|
The minimum amount votes required for feedback was applied with a
> operator which effectively made the minimum to be minvotes + 1.
Fix by also testing for equality on minvotes.
Reviewed-by: Magnus Hagander
|
|
|
|
Sibling imports should be prefixed with a period. Good idea in py2, will
eventually become required in py3, so another small step.
|
|
This gets rid of a somewhat nasty circular import in backendviews.
|
|
|
|
Mostly not important, but getting rid of the PIP warnings will help
catch errors in the future.
|
|
|
|
In an effort to close up with PEP8, we should use spaces for indent
rather than tabs... Time to update your editor config!
|
|
This adds basic contextual aware documentation to the confreg system
(sponsorship system not yet included, but will be at some point in the
future). A help link is added to the top right part of the navigation
bar, which links to (potentially context aware) help pages.
Docs live in markdown format in the repo and are rendered as django
views, inside the framework. Graphs that are used are generated using
graphviz, but checked into the repo both as .dot and as .svg to not make
graphviz a dependency for anything other than actually changing the
graphs. The docs view in django basically does the markdown rendering
straight up but also knows how to inline the svg graphs specifically.
|
|
|
|
|
|
This removes massive amounts of duplicated code to check that "is the
user either a superuser or an admin for this conference". Centralizing
that into the get_authenticated_conference() functions simplifies things
a lot, and deleted code is always the best type of code.
|
|
Results should be in the same framework as the admin, including
breadcrumbs etc. Unlike the user facing side which should of course be
in the conference framework.
|
|
Now also confreg, confsponsor, confwiki, newsevents, the old invoice
system and the root.
|
|
This implements the ability to render confreg templates (registration,
cfp, schedules etc etc) using jinja2 instead of django templates. The
important difference is that these templates are rendered in a complete
sandbox, so they cannot reach into other parts of the system by
exploiting connected objects or by including templates they are not
supposed to.
Jinja templates are used whenever the "jinjadir" variable is set on a
conference. When it is, the variables for basetemplate, templatemodule,
templateoverride and templatemediabase are all ignored, as their
functionality is either no longer needed or implemented in a different
way using the templates.
For the time being we support both the old (django based) templates and
the new (jinja based) templates. That means that any changes made to the
confreg templates must be done twice. At some point not too far in the
future we should decide to either desupport old conferences that have
the old style templates, or re-render those as static. (For closed
conferences most pages aren't reachable anyway, but things like
schedule and session descriptions are reachable way past the end of
a conference)
Along with the templates come a new command called "deploystatic.py",
which runs outside the django environment. This command can be used for
deployment of static sites based on the jinja templates, similar to how
some conference sites have done it before. Since the templates run in a
sandbox, this should be much more safe than what's been done before, and
therefor access can be granted to more people. This command is made to
run standalone so conference template developers can run it locally
without having to install full support for django.
|
|
|
|
Instead, as of now we run all content over https always. The enforcment of this is
placed in the webserver, which makes it impossible to miss it on some feature.
This retires the setting SITEBASE_SSL, and changes SITEBASE to be https.
It also retires DISABLE_HTTPS_REDIRECTS, which has no use anymore.
And finally, SESSION_COOKIE_SECURE is now set by default, and needs to be turned
off in local development environments.
|
|
|
|
This removes the need for the last emailing of feedback, as well as
the dependency on the old version of the google chart api.
|