aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-17tileproxy: relay HTTP status codesDaniel Schadt
This is nice if we hit a 404 or something on the source, especially with user-configured sources. As a small side, we now don't give the client the URL in the error message, as that could contain API keys that we don't want to leak.
2022-11-17add a shortcut for Thunderforest mapsDaniel Schadt
Now, we can add Thunderforest maps with thunderforest.api_key = ... thunderforest.maps = cycling ...
2022-11-17enable custom map layersDaniel Schadt
This change shuffles around quite a bit because we no longer hardcode our map layers in osm-monkeypatch.js, but instead can pass them through from the Python code. This allows us to dynamically define extra layers, for example to disable layers the admin doesn't want, or to add extra layers that are not yet available. This change for example allows to embed thunderforest maps by adding the following to the config: fietsboek.tile_layers.tf_cycling = TF Cycling fietsboek.tile_layers.tf_cycling.url = https://thunderforest.com/... fietsboek.tile_layers.tf_cycling.access = restricted The next step is to make the Thunderforest maps a bit easier to access (by providing special support for those), but for now, this seems like a good first step and the necessary groundwork.
2022-11-17doc: add intersphinx links for jinja2/markupsafeDaniel Schadt
2022-11-17remember timeouts for tile serversDaniel Schadt
1. This makes Fietsboek faster because we don't have to wait for the timeout on every single request. 2. This is better for the servers, as we don't add more requests when they're already overloaded.
2022-11-17add a timeout to the tile proxyDaniel Schadt
This avoids blocking the whole pipeline
2022-11-17initial support for proxying OSM tilesDaniel Schadt
2022-11-15switch out setuptools for poetryDaniel Schadt
setup.py is the very old style for packaging, so I wanted to replace it with something more "modern". pyproject.toml seems like the way to go in the future. At first, I wanted to simply configure setuptools using pyproject.toml, but that support is in beta and seemed to cause some issues with the tox virtualenvs. Poetry seems to work fine and provides a better dependency resolver (given that dependencies are actually specified well) and some other goodies. For users, nothing much should change, as "pip install" still works.
2022-11-12Merge branch 'updater'Daniel Schadt
2022-11-12add initial update scriptDaniel Schadt
This doesn't really do anything yet, but it serves as a starting point and sets the alembic version.
2022-10-20adjust docs for new updater scriptDaniel Schadt
2022-10-10make fietsupdater status warn about unknown updateDaniel Schadt
2022-10-10lint fixesDaniel Schadt
2022-10-10fietsupdater: add a "status" subcommandDaniel Schadt
2022-10-10add a common base class to update scriptsDaniel Schadt
This makes it easier to add some useful hooks, such as "self.tell" to output information about the update to the user, and it ensures the pre_alembic/post_alembic methods exist.
2022-10-10fietsupdater: fix revision subcommandDaniel Schadt
2022-09-29fietsupdtr: noop if the update is already appliedDaniel Schadt
2022-09-29fietsupdater: use Context.fail to abortDaniel Schadt
This makes sure that the exit code is set properly
2022-09-29fietsupdater: better help behaviourDaniel Schadt
This does two things: 1. fietsupdate update --help works (before it errored because the required argument is not given) 2. fietsupdate help works (like git help ...)
2022-09-28reorganize updater CLIDaniel Schadt
This moves the updater scripts into a subfolder, which keeps them separated better from the rest of the package. In addition, we now have the "fietsupdate" command instead of using "python -m fietsboek.updater".
2022-09-25hide tags if none are setDaniel Schadt
This prevents the empty "Tagged as:" to be shown
2022-09-25fix track participants not being shownDaniel Schadt
2022-09-24fix stamp logic for downgradesDaniel Schadt
2022-09-24fix downgrade not picking the right revisionsDaniel Schadt
If we apply a migration that takes us from "v1" to "v2", then a downgrade needs to apply the reverse of this migration - not the one that goes from "v1" to "v0", and not "no migration". The previous code managed to not do this, as it would see "v1-v2" as applied and therefore skip it.
2022-09-24add a CLI frontend for the updater logicDaniel Schadt
2022-09-16autocomplete tags in upload/edit formDaniel Schadt
2022-09-10first implementation of update logicDaniel Schadt
2022-09-03Merge branch 'static-pages'Daniel Schadt
2022-08-17actually set title in custom pagesDaniel Schadt
2022-08-17add documentation about custom pagesDaniel Schadt
2022-08-17first implementation of custom static pagesDaniel Schadt
2022-08-13fix testsDaniel Schadt
Now that the filtering is done via SQL, it is not enough for the user and the objects to be in the session - they need to be in the database, similar to the added tracks. Note that it was not entirely necessary in this case, since the tracks are public, but it provides the proper functionality in the future.
2022-08-13fix browse view for uncached tracksDaniel Schadt
By not using an OUTER JOIN, we were missing the tracks that did not have an associated track cache. The filters already deal with this case (by having a IS NULL check), but we need to actually include those rows by using an outer join here.
2022-08-12implement browse filters in SQLDaniel Schadt
This is a continuation of the previous two commits, in which we do the filtering in the SQL query instead of retrieving all objects and then filtering them in Python. The generated SQL can be quite complex, but 1) most of it comes from the logic of determining the visible tracks and 2) it is built piece-by-piece with small Python functions. Therefore, it should be okay.
2022-08-12filter visible tracks in SQLDaniel Schadt
While this requires some logic duplication, and it does mean that we have to generate complex SQL queries, it is also the preferred way of doing this, as we do not have to load all the tracks just to filter them out in the application.
2022-08-12filter organic tracks via SQLDaniel Schadt
The speedup is probably negligible, as a single user shouldn't have enough tracks to really make a difference, but it is good practise to let the SQL engine do the filtering and only retrieve the objects that we actually need.
2022-08-12bump version to 0.3.0v0.3.0Daniel Schadt
2022-08-12update changelogDaniel Schadt
2022-08-12Merge branch 'track-templates'Daniel Schadt
2022-08-12fix cell width in browse viewDaniel Schadt
2022-08-10add icons in the browse view for synthetic/organicDaniel Schadt
2022-08-10update bootstrap fontsDaniel Schadt
2022-08-10use different icons for friendsDaniel Schadt
Since bootstrap-icons includes nice "person" icons, it is probably more fitting to use those for the friendship actions.
2022-08-08update translationsDaniel Schadt
2022-08-08add browse filters for track typeDaniel Schadt
2022-08-08add different track typesDaniel Schadt
2022-08-02Merge branch 'browse-filters'Daniel Schadt
2022-08-02use different error when filters return no tracksDaniel Schadt
2022-07-30add a button to clear all filtersDaniel Schadt
2022-07-29use secrets to safely generate random tokensDaniel Schadt
The usage of os.urandom was fine to generate a salt, but using secrets here makes sure that the intent is carried across. For the share tokens, using random might be insecure. We should err on the side of caution and use a secure PRNG here, so now we use secrets here as well. For tokens (password reset, ...), UUID4 is probably also fine, so we'll leave that for now.