| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| | |
Conflicts:
mediagoblin/templates/mediagoblin/base.html
mediagoblin/tools/template.py
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
RTL languages like Arabic, Hebrew etc were displayed from left
to right. I fixed this by adding a function to check
whether the language of the locale is rtl and change the
direction of the html in "base.html" accordingly.
[Fixes #220]
|
| |
| |
| |
| | |
This commit sponsored by Denver Gingerich. Thank you!
|
| |
| |
| |
| |
| |
| | |
Basically, it's shuffling around the notifications stuff.
This commit sponsored by Günter Kraft. Thank you!
|
| |
| |
| |
| |
| |
| |
| | |
* add comments & clarify code for jinja2 extensions
Conflicts:
mediagoblin/config_spec.ini
|
| |
| |
| |
| | |
no_auth config option. allows instance to be run w/o authentication
|
| |
| |
| |
| |
| |
| | |
"template_context_prerender" :)
This commit sponsored by William Goudie. Thanks Bill! :)
|
| |
| |
| |
| |
| |
| | |
Needs documentation though... that's coming next :)
This commit sponsored by Luca Tius. Thanks Luca!
|
| |
| |
| |
| | |
This commit sponsored by David Collins. Thank you!
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Not the working solution, but getting there conceptually. Basically
we'll have a key with the view and the template as a tuple which is
the context hook that anyone can attach to.
However, some changes have still to be made:
- The unit test doesn't work yet and contains a set_trace ;)
- We'll probably switch the "view" component from being the callable
to the "urlgen"'able name per Elrond's suggestion
- Found a bug in unit tests related to running custom apps for
different configs... hm. I need to fix this!
Nonetheless, making progress.
This commit sponsored by... wait a minute... Christopher Webber?!
|
|
|
|
|
|
| |
Setting up a new template env should not directly touch the
translation tools, but go through a function in
translations.py.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
- I'm having trouble seeing if the geolocation stuff actually works,
but plugins are included
- including a list of template hooks works, however the macro to
include them does not, so it's kinda verbose
|
|
|
|
|
|
|
|
| |
py3 does not have dict.has_key any more. You have to use
"key in dict" instead. As that works in python2 as well,
let's use that.
Also some small bits of pep8.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We injected a gridify_list and gridify_cursor function into each jinja2
template that we render. This was used to split the list of media_entries
into batches of 5 for nicer table columns. However, jinja2 has a nice |batch
filter built in that does the job for us just as well with less code (on our side)
Less code=good
so let's merge this one.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
|
|
|
|
|
|
|
|
|
|
|
| |
Astonishingly, the great jinja2 does not provide a builtin urlquote filter,
although it is obviously needed. (jina1 had one) This is:
https://github.com/mitsuhiko/jinja2/issues/17
Provide an urlencode filter, based on werkzeug's url_quote_plus function.
This is dead easy to implement and gives us all the freedom we want.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we would attempt to satisfy the user's first language
preference, immediately falling back to english if that was not
possible. Now, we will get the best match of the user's preferred
languages.
This requires storing the available locales on app startup, so we
have mg_globals.available_locales ready to compare them against the
list of preferred user languages.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
|
|
|
|
|
| |
I added mg_globals.thread_scope (an instance of threading.local)
and made `translations' an attribute of it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
References to undefined variables in templates were
silently ignored/converted to None/empty strings. This
makes coding lazy stuff easy, but it makes catching typos
harder.
(It would have catched one of the SQL things earlier!)
But on the other hand it might make the current templates
error out everywhere. In fact, early testing has shown two
instances, that errored out. Those are fixed with this
commit too.
If this turns out to make things more complex and useless
than actually solving any problems, it can easily be
dropped again.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was suggested by Nathan Yergler in the bug logs.
Just implementing it.
- Let render_csrf_form_token return None, if the CSRF_TOKEN
is not available in the environ, because the
process_request part of the meddleware has not yet run.
- In render_template: If the returned value from above is
None, then do not add the csrf_token to the templates
context.
|
|
|
|
|
|
| |
middleware
hehehehehe, "meddleware"
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Conflicts:
mediagoblin/db/migrations.py
mediagoblin/db/models.py
mediagoblin/user_pages/views.py
mediagoblin/util.py
|
|
|
|
|
| |
Conflicts:
mediagoblin/util.py
|
|
tools/[file].py
|