-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[django1.11] fix file uploading, new user registration + make tests p…
…ass (#940) * Add chef method unit tests and ensure that Django views return a HTTP response when they raise errors. * Add more file upload and add node tests. * Add finish_commit tests and return a HTTP 500 code instead of raising if an error occurs. * Get Sentry reports for handled internal server errors in Internal API calls. * Add yarn run devsetup command (#925) * add new yarn command to set up dev environment * change commands to remove redundant pieces to prioritize yarn run devsetup Streamlines the new dev experience * Updated translations with epub string * Fixed default preview styling * Add caching to the get_user_public_channels endpoint (#939) * Move view get_public_channels logic to Channel model * add the Channel.make_public function * use StudioTestCase to create buckets * add ChannelCacher class to implement channel caching * add channel token related convenience functions * make exporchannel use Channel.make_token() * add channel specific cache for tokens Cache that, one less query to make. * add caching to channel token serializer endpoint * move serializers.get_resource_count implementation to the Channel model * use channel.get_thumbnail() function on serializers.py * remove redefinition of generate_thumbnail_url * add ChannelCacher.get_resource_count() cache function Used to cache the channel's get_resource_count * add caching to get_resource_count API attribute * add channel.get_date_modified function * make channelfieldmixin use channel.get_date_modified * add channel.get_date_modified cache * Use the channel cache for get_date_modified * remove redundant generate_thumbnail_url Already defined in ChannelFieldMixin * pass cache get_public_channels args to real function * cache the entire get_user_public_channels view * fix tests for ChannelCacher.get_public_channels() by comparing actual channel ids rather than objects * Create SecretToken.exists() convenience method * refactor make_token to definitely end after 100 attempts And use for-else loop construct * add extra non-public assert on the make_public test * add test for SecretToken.exists() * [WIP] Add nginx-level API endpoint caching (#943) * add long running caching to the get_user_public_channels endpoint * add caching to the get_user_edit_channels endpoint * add 4 hour browser caching on all static files (#945) * add caching to the get_user_edit_channels endpoint (#947) * Unlock le-utils' version * have pipenv update all updateable packages * Added comment * Made resource count required on storage requests * Merge in develop * Return 404s for any files not found in the zip, and have BadZipfile errors report the name, size, mode and download state to help us narrow down problems with opening. Also, tests. (#942) * Remove the hardcoded server IP in tests so that configuration changes don't break them. * Apply Micah's changes and also fix some new issues uncovered by tests to get the code to the same state as it was before revert. * Fix login template name. * Actually commit the updated dependency versions to requirements.txt... * use `==` instead of `=` in template `if` statement * Re-delete requirements.txt as a result of rebasing issues. * Update Django to 1.11 in pipfile after rebase. * Actually update the dependencies after accidentally using pip... * objects.create automatically calls save, so no need to call it again afterwards. * objects.create automatically calls save, so no need to call it again afterwards. * Revert removed calls to save as we are creating models directly rather than using objects.create. * Revert removed calls to save as we are creating models directly rather than using objects.create. * update django to 1.11.15! * use the recommended way of declaring our AppConfig Through our INSTALLED_APPS! See https://docs.djangoproject.com/en/1.11/ref/applications/#configuring-applications * use FormatPresetSerializer as a PrimaryKeyRelatedField serializer * disable breakpoints * attempted fix for file uploading issues * file uploading works... yay! * signup form multiselection area is working now * enable offline_helper * remove extra debugging leftovers from registration info template * fixes for several tests... remember: don't manually hardcode constants from le_utils. they may change some day! * fixed authentication tests * add a migration from django 1.11
- Loading branch information
1 parent
05aea9d
commit 2fa8be6
Showing
40 changed files
with
1,267 additions
and
292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from django.conf import settings | ||
|
||
|
||
def site_variables(request): | ||
return {'INCIDENT': settings.INCIDENT} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
contentcuration/contentcuration/migrations/0093_auto_20180831_0745.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.15 on 2018-08-31 07:45 | ||
from __future__ import unicode_literals | ||
|
||
import contentcuration.models | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('contentcuration', '0092_auto_20180731_1024'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='file', | ||
name='file_on_disk', | ||
field=models.FileField(blank=True, max_length=500, upload_to=contentcuration.models.object_storage_name), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.