summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/jrnl/admin.py2
-rw-r--r--app/utils/static/image-loader.js6
2 files changed, 4 insertions, 4 deletions
diff --git a/app/jrnl/admin.py b/app/jrnl/admin.py
index ac950df..bebe1ef 100644
--- a/app/jrnl/admin.py
+++ b/app/jrnl/admin.py
@@ -15,7 +15,7 @@ class EntryAdmin(OSMGeoAdmin):
form = LGEntryForm
def render_change_form(self, request, context, *args, **kwargs):
- context['adminform'].form.fields['featured_image'].queryset = LuxImage.objects.all()[:200]
+ #context['adminform'].form.fields['featured_image'].queryset = LuxImage.objects.all()[:200]
return super(EntryAdmin, self).render_change_form(request, context, *args, **kwargs)
def formfield_for_dbfield(self, db_field, **kwargs):
diff --git a/app/utils/static/image-loader.js b/app/utils/static/image-loader.js
index 0139f10..f68da83 100644
--- a/app/utils/static/image-loader.js
+++ b/app/utils/static/image-loader.js
@@ -8,10 +8,10 @@ function add_images(){
if (featured_image) {
featured_image.querySelectorAll('li').forEach(function(element) {
var cur = element.dataset.imageid;
- var loop = element.dataset.loopcounter;
- console.log(loop);
- if (loop <= 100) {
+ var loop = Number(element.dataset.loopcounter);
if (cur != "") {
+ if (loop <= 100) {
+ console.log(loop);
var request = new XMLHttpRequest();
request.open('GET', '/photos/luximage/data/admin/tn/'+cur+'/', true);
request.onload = function() {