| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
It's good practice to cleanup the SQL session after each
request so that the next request gets a fresh one.
It's an application decision whether one wants a
just-in-case ROLLBACK or COMMIT. There are two ideas behind
it, really. I have decided for ROLLBACK. The idea is "if
you forget to commit your changes yourself, there's
something broken. Maybe you got an exception?".
|
|
|
|
|
|
|
| |
There was no place in the software telling the user the
version in use. So start by having the main server emit a
startup notice including the version string. Uses python
logging, so should be easy to reconfigure, etc.
|
| |
|
|
|
|
|
| |
So that the workaround can eventually be removed, note the
URL for the relevant bug in a comment.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is relevant for fcgi:
Some servers (cherokee for example) put "HTTP":"off" in the
environ. And the following code in urlgen breaks on this:
if environ.get('HTTPS') or environ.get('wsgi.url_scheme') == 'https' \
or environ.get('HTTP_X_FORWARDED_PROTO') == 'https':
hostinfo['protocol'] = 'https'
workaround is to remove HTTPS:off from the environ.
|
| |
|
| |
|
|
|
|
|
|
| |
middleware
hehehehehe, "meddleware"
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
mediagoblin/db/migrations.py
mediagoblin/db/models.py
mediagoblin/user_pages/views.py
mediagoblin/util.py
|
| |
| |
| |
| |
| |
| |
| | |
* Removed trailing whitespace
* Line length < 80 where possible
* Honor conventions on number of blank lines
* Honor conventions about spaces around :, =
|
| |
| |
| |
| |
| | |
This way we can copy paste.ini into paste_local.ini but not have to
update it to find mediagoblin_local.ini.
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When running mediagoblin in a sub path on a web server,
most things inside mediagoblin need the "inside path", but
when generating URLs for the webbrowser, full paths are
needed.
urlgen and routes already do that.
Some (mostly pagination and login) need the URL of the
current page. They used request.path_info. But this is the
"inside" path, not the full.
So now there is request.full_path and its used in various
places.
|
|/ / |
|
| | |
|
|/
|
|
| |
tools/[file].py
|
|\ |
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
| |
first)
This will make it easier for us to call something like a 404 page rendering method
before the matching check is done.
|
| |
|
|
|
|
|
|
|
| |
Factoring out this one should be the last one needed to
rewrite the celery setup. The idea is to not setup the
whole app, but just call a bunch of individual setup_*
functions and be done.
|
|
|
|
|
|
| |
Setting up the database now involves checking the
migrations status and setting up the globals.
Moved all of that into init/__init__.py:setup_database().
|
| |
|
|\
| |
| |
| |
| | |
Conflicts:
mediagoblin/db/open.py
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Let setup_global_and_app_config set the global and app
config in the mg_globals already. This way, the config is
available to everyone very early.
|
| |
| |
| |
| |
| |
| |
| | |
Moving the config reading and error reporting from app.py
to init/__init__.py. Straight forward.
This also fixes the duplicated exceptions.
|
| |
| |
| |
| |
| | |
This duplicates some exceptions, which will be fixed very
soon.
|
|/ |
|
|
|
|
|
|
|
| |
Some simple changes needed to do that.
The interesting question left:
Should config_spec.ini also be moved?
|
| |
|
|
|
|
|
|
| |
As the first target of the new .init. submodule move
celery_setup there. Quite straight forward, just a lot of
places to change.
|
|
|
|
|
| |
As Elrond points out, this name doesn't make sense anymore since this
isn't based on the paste config. Thanks Elrond!
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a huge change! This means several things.
- From the python point of view, launching the application is a heck
of a lot cleaner. You just need to pass in the config file path to
MediaGoblinApp's __init__() and whether or not this funtion should
setup celery and you're good.
- There are now two separate config files, separating the server
setup from the application setup.
- server.ini: the paste deploy config file, which configures the
applications and server setup but *NOT* the mediagoblin application
itself.
- mediagoblin.ini: where you configure mediagoblin (and possibly celery)
- Launching the application is now different. Instead of:
./bin/paster serve mediagoblin.ini --reload
We launch like:
./bin/paster serve server.ini --reload
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
don't have to run celeryd at the same time.
This should make Elrond happy ;)
|
|
|
|
|
|
|
|
| |
I needed to split the db connection/opening into open.py,
due to an import loop:
- util.py needs db/util.py:ObjectId
- db/util.py would need db/models.py
- db/models.py needs util.py:slugify
|
| |
|
|
|
|
| |
from_celery
|
| |
|