WIP: 2021 02 24 dockerize (#18)
* Use cache for most fields and admin form for m2m files * MR comments/clean up * Cache should obey exclude and fields * Some more tests and docs * Only use cache for image files * Even more tests and handle save as new * fix test * More tests * minor refactor * Improve test coverage * Adding tests for fieldsets * Added cache timeout * Added another test for an edge case * Fix issue with ManagementForm tampered with * Update cache to only set when form is_multipart * Even more testing changes * Dockerize * Setting up tests in docker * Update github actions * Got first integration test to work * Refactor a bit * Fix github action yml * Use docker-compose up -d in github actions * combine coveralls * Updated readme * Clean up code * Remove dup code from rebase Co-authored-by: Thu Trang Pham <thu@joinmodernhealth.com>
This commit is contained in:
@@ -17,12 +17,3 @@ class ItemAdmin(AdminConfirmMixin, ModelAdmin):
|
||||
def image_preview(self, obj):
|
||||
if obj.image:
|
||||
return mark_safe('<img src="{obj.image.url}" />')
|
||||
|
||||
# def one(self, obj):
|
||||
# return "Read Only"
|
||||
|
||||
# def two(self, obj):
|
||||
# return "Read Only"
|
||||
|
||||
# def three(self, obj):
|
||||
# return "Read Only"
|
||||
|
||||
@@ -24,8 +24,13 @@ SECRET_KEY = "=yddl-40388w3e2hl$e8)revce=n67_idi8pfejtn3!+2%!_qt"
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = ["127.0.0.1", "localhost"]
|
||||
USE_DCOKER = os.environ.get("USE_DOCKER", '').lower() == "true"
|
||||
|
||||
ALLOWED_HOSTS = ["127.0.0.1", "localhost"]
|
||||
if USE_DCOKER:
|
||||
import socket
|
||||
|
||||
ALLOWED_HOSTS = [socket.gethostbyname(socket.gethostname())]
|
||||
|
||||
# Application definition
|
||||
|
||||
|
||||
Reference in New Issue
Block a user