django-errors

Django: Field Error Unknown fields

早过忘川 提交于 2019-12-03 23:47:10
I just installed OS X Lion, so I had to reinstall everything for Python2.7. In doing that I upgraded my Django to 1.3 from 1.2.3. When I try and runserver, I get an odd field error that I'm having a tough time deciphering. FieldError at / Unknown field(s) (a, m, s, e, g) specified for Note Here is that Model & Form: class Note(models.Model): pub_date = models.DateTimeField(default=datetime.now, auto_now_add=True, db_index=True) user = models.ForeignKey(User, null=True, blank=True, related_name="writers") to = models.ForeignKey(User, null=True, blank=True, related_name="tost") message = models

How to see details of Django errors with Gunicorn?

半城伤御伤魂 提交于 2019-12-03 05:40:14
问题 I just deployed my Django (1.6) project with gunicorn and Nginx. It seems to be working fine but I have one page were I'm getting an HTTP 500 error and I can't find any details about the error anywhere. How do I get gunicorn to show me errors? Here's all I currently see in the log file when I hit the page giving me the error: >tail gunicorn.errors 2014-02-21 14:41:02 [22676] [INFO] Listening at: unix:/opt/djangoprojects/reports/bin/gunicorn.sock (22676) 2014-02-21 14:41:02 [22676] [INFO]

How to see details of Django errors with Gunicorn?

寵の児 提交于 2019-12-02 19:01:12
I just deployed my Django (1.6) project with gunicorn and Nginx. It seems to be working fine but I have one page were I'm getting an HTTP 500 error and I can't find any details about the error anywhere. How do I get gunicorn to show me errors? Here's all I currently see in the log file when I hit the page giving me the error: >tail gunicorn.errors 2014-02-21 14:41:02 [22676] [INFO] Listening at: unix:/opt/djangoprojects/reports/bin/gunicorn.sock (22676) 2014-02-21 14:41:02 [22676] [INFO] Using worker: sync 2014-02-21 14:41:02 [22689] [INFO] Booting worker with pid: 22689 ... 2014-02-21 19:41

Passing a python list to django template

▼魔方 西西 提交于 2019-12-01 07:40:15
I want to display a list of things on my template. So I have a view to generate that list and pass it to template like this: newlinks = [] try: links=urllib2.urlopen("<<Some HTML file link>>").readlines() except (urllib2.HTTPError): links = '' pass for link in links: newlinks.append(link[0:-1]) return render_to_response('template11.html', {'links',newlinks}, context_instance=RequestContext(request)) But while rendering it, i get TypeError Exception Type: TypeError Exception Value: unhashable type: 'list' This is template code: {% for link in links %} <li>{{ link }}</li> {% endfor %} I don't

Passing a python list to django template

北城余情 提交于 2019-11-30 17:18:52
问题 I want to display a list of things on my template. So I have a view to generate that list and pass it to template like this: newlinks = [] try: links=urllib2.urlopen("<<Some HTML file link>>").readlines() except (urllib2.HTTPError): links = '' pass for link in links: newlinks.append(link[0:-1]) return render_to_response('template11.html', {'links',newlinks}, context_instance=RequestContext(request)) But while rendering it, i get TypeError Exception Type: TypeError Exception Value: unhashable

Setting up Django with Eclipse - “Django not found”

安稳与你 提交于 2019-11-29 14:42:00
I'm trying to setup Django with Eclipse. Right now I'm creating a new Pydev Django project, and getting "Django not found" error message. When I try to verify Django is integrated via the command line, it works. >>> import django >>> print django.get_version() 1.2.5 I have exactly two python installations, 2.7 and 3.2, and I'm sure I'm using 2.7 from Eclipse (and the command line). What am I doing wrong? If you added the python interpreter before installing django, you can get this error message. Remove the python interpreter from eclipse and add it again. Eclipse will do some caching

Setting up Django with Eclipse - “Django not found”

China☆狼群 提交于 2019-11-28 08:40:35
问题 I'm trying to setup Django with Eclipse. Right now I'm creating a new Pydev Django project, and getting "Django not found" error message. When I try to verify Django is integrated via the command line, it works. >>> import django >>> print django.get_version() 1.2.5 I have exactly two python installations, 2.7 and 3.2, and I'm sure I'm using 2.7 from Eclipse (and the command line). What am I doing wrong? 回答1: If you added the python interpreter before installing django, you can get this error