| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
This removes some 'u' prefixes and converts simple format() calls to f-strings.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
When uploading a file using the API its same is always going to be
'unknown.<extension>', which is not good looking for file urls. This
patch proposes a custom header named 'X-File-Name' that allows to
specify a file name using an API client.
This changeset was tested with a local OAuth1 client.
|
|
|
|
|
|
|
|
|
| |
In the same fashion limit=BAD fallsback to the default value,
fallback to zero when offset=WORSE.
Also add test coverage verifying limit/offset do the right thing.
Signed-off-by: Loic Dachary <loic@dachary.org>
|
|
|
|
| |
Signed-off-by: Jessica Tallon <tsyesika@tsyesika.se>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new Comment link table that is used to link between some
object and then the comment object, which can be more or less any
object in Mediagoblin. The MediaComment has been renamed to
TextComment as that more aptly describes what it is. There is
migrations for these changes.
There is also the conslidation of the Report tables into a single
Report table, the same with the Notification objects. This is because
both of them split out MediaEntry and Comment versions into their own
polymorphic versions from a base, this is no longer a meaningful
distinction as comments can be anything.
|
|
|
|
|
|
|
|
| |
This adds several things, mainly code which checks for the public id and
if it doesn't exist generating it where it can. This is to because we
need to keep the public_id to be able to effectively soft delete models.
This also adds a public_id field to the Activity along with a migration.
|
|
|
|
|
|
|
| |
- Adds a "type" column to the Collection object and allows the
CollectionItem model to contain any object.
- Changes "items" to "num_items" as per TODO
- Renames "uploader", "creator" and "user" to a common "actor" in most places
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a lot of the issues with the LocalUser changes that were
merged recently. There was a problem where the attributes of LocalUser
were not being eagerly loaded and because the Session was detached an
exception was being raised when they were accessed.
This also fixes some typo's which were introduced.
Finally this adds a temporary fix for a potential SQLAlchemy bug, this
is a bug where doing:
User.query.filter(LocalUser.username == "some_username").first()
does NOT yeild a user with the username "some_username" but all users
on the site. The temp fix is to just query the LocalUser, this should
be resolved when bug is confirmed and fixed upstream.
|
|
|
|
|
|
|
| |
The code base had many references to User.username and other
specific to LocalUser attributes as that was the way it use to exist.
This updates those to query on the generic User model but filtering
by attributes on the LocalUser.
|
|
|