django current project 2016

django project notes 2017

From October 10-17-16

trying to get queryset to give me data for template. right now it is returning object.\

should work with database layers from geoserver

from: querysets are lazy:

QuerySets are lazy¶

QuerySets are lazy – the act of creating a QuerySet doesn’t involve any database activity. You can stack filters together all day long, and Django won’t actually run the query until the QuerySet is evaluated. Take a look at this example:

q = Entry.objects.filter(headline__startswith="What")
q = q.filter(
q = q.exclude(body_text__icontains="food")

manager names

Look into using: ipython with notebook-django

this looks similar to what I might want to do. Not sure I have tried it yet or not…..

link to question with answer!msg/django-users/NbnfsEt-yvQ/go9_IJsZPQAJ

more of the same

more about ipython with django

ipython notebook ssh remote

class based views

Still getting:


<bound method Template.render of <django.template.backends.django.Template object at 0x7fa686db4b70»


<bound method Template.render of <django.template.backends.django.Template object at 0x7fa686dbbdd8»


<bound method Template.render of <django.template.backends.django.Template object at 0x7fa686dbbd68»

from django import template
return render_to_response('cart/cart_summary.html', {'cart': cart}, context_instance = template.RequestContent(request))


Basic project ~/python/info working now after I worked out some syntax errors.

Today 10-24-16 added bootstrap to project and made a base.html to put templates inside.

Also added debug toolbar but it is kind of hard coded in at the bottom of so that will need to be changed if I move it to public.

Nest templates - use a base.html with template inheritance

bootstrap docs

found some info about using bootstrap themes

got a bootstrap theme to download but dropdown not working. May need to load jquery.

YES loading jquery from something like:

<script src=""></script>

short vid on getting dropdowns to work

Got basic setup for local apache 11-6-16 and seems to be serving up all the files

May have to restart apache to see some changes. There may be another way to reload wsgi process but I haven't figured it out yet.

This is at the end of:

# rfile addition 11-6-16
Alias /static/ /home/rfile/python/info/info/staticroot/
WSGIScriptAlias /bp  /home/rfile/python/info/info/
WSGIProcessGroup bp
# WSGIPythonPath /home/rfile/python/info
WSGIDaemonProcess bp  python-path=/home/rfile/python/info:/usr/lib/python3/dist-packages
<Directory /home/rfile/python/info/info>
Require all granted
Options Indexes FollowSymLinks 
# end rfile addition 11-6-16

Look at the end of this link about passing extra stuff