DoesNotExist at /admin/blog/blog/add/: blog matching query does not exist

2022-09-13 Thread Jaap van Wingerde
_from_db(fields=[field_name]) File "/var/django/liakoster.nl/blog-1/lib/python3.10/site-packages/django/db/models/base.py", line 741, in refresh_from_db db_instance = db_instance_qs.get() File "/var/django/liakoster.nl/blog-1/lib/python3.10/site-packages/django/db/models/query.py&quo

Announcing DjHTML: A Django template indender

2021-05-24 Thread Jaap Joris Vens
vide me with some feedback, test cases, and bug reports that will help me improve this tool. Greetings, Jaap Joris Vens -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails fro

Invalid filter: 'unlocalize' (Django 3.1.7, Python 3.7.3)

2021-03-19 Thread Jaap van Wingerde
"price": "{{ art_artobject.price|unlocalize }}", "priceCurrency": "EUR",{% endif %} ... Am I doing something wrong? -- Jaap van Wingerde e-mail: j...@vanwingerde.nl -- You received this message because you are subscribed to the Google Groups "Django us

Re: creating a website with django

2020-08-29 Thread Jaap van Wingerde
https://www.djangoproject.com/start/ Kamini Shukla schreef op August 28, 2020 9:09:24 AM UTC: >i want to create a website with the help of django. pls some one help >of >that. > >-- >You received this message because you are subscribed to the Google >Groups "Django users" group. >To

Re: Who can help me?

2020-08-23 Thread Jaap van Wingerde
This is the first result with Google: https://stackoverflow.com/questions/55831728/what-is-statreloader-while-running-django Hella thor schreef op August 21, 2020 9:23:22 AM UTC: >Hey guys: > >My python version is 3.7.1 >Django version is 3.1 > >When I started the project > >[image: 9.png] >

Re: How to populate DB from PDF extracted data

2018-03-09 Thread Jaap van Wingerde
Use 'pdftohtml - xml' to convert the pdf in an xml-file and use per line in de xml-file regulair expressions to extract the data. [pdftohtml] https://www.sourceforge.net/projects/pdftohtml/ Op Fri, 9 Mar 2018 00:00:39 -0800 Shazia Nusrat schreef: > Hi, > > I am trying

append language-code tot variable name

2017-05-23 Thread Jaap van Wingerde
In my templates I have variables as {{ artobject.title|safe|capfirst }}. I want the site in more languages.So in changed the model: title changed in title_nl, and I appended title_de, title_en, title_fr. This is more easy for me than po-files. A template must work for all languages,so the

Re: how to deal with not translated strings in html

2015-03-04 Thread Jaap van Wingerde
Op 2015-03-03T17:41:21 UTC schreef Jaap van Wingerde <mailingli...@vanwingerde.nl> in the message , mid:20150303174121.024af...@jaap.custard.shrl.nl the following text. > ../locale/en/LC_MESSAGES/django.po: > > ... > #: template.html:4 > msgid "jaar" > msgs

how to deal with not translated strings in html

2015-03-03 Thread Jaap van Wingerde
ting html: ... yearmaand ... better html: ... yearmaand ... How can i get the better html? -- Jaap van Wingerde e-mail: 1234567...@vanwingerde.nl -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

Re: unicode problems in admin interface

2014-09-22 Thread Jaap van Wingerde
Op 2014-09-18T13:41:53 UTC schreef Jaap van Wingerde <mailingli...@vanwingerde.nl> in het bericht , ID: <20140918134153.390fc...@jaap.custard.shrl.nl> het interface>volgende. > I have suddenly unicode problems with de admin interface: > > "DjangoUnicodeDecodeError

Re: unicode problems in admin interface

2014-09-20 Thread Jaap van Wingerde
n format_html(u'http://glaskunst.liakoster.nl/media/img/height_80/{2}.jpg"/>', self.id,self.photograph) image.allow.tags = True def __unicode__(self): return self.photograph ..." Coulld it be a bug in Django 1.7? -- Jaap van Wingerde e-mail: 1234567...@vanwingerde.nl signature.asc Description: PGP signature

unicode problems in admin interface

2014-09-18 Thread Jaap van Wingerde
rosetta', 'dbgettext', ) ... DEFAULT_CHARSET='utf-8' FILE_CHARSET='utf-8' DEFAULT_CONTENT_TYPE='text/html' ..." "jaap@liakoster:/var/django/liakoster.nl/test2$ python -c "import django; print(django.get_version())" 1.7 jaap@liakoster:/var/django/liakoster.nl/test2$ python -V Python 2.7.3 j

modification time in Python - Django

2014-03-03 Thread Jaap van Wingerde
views.py: ... pwd = os.path.dirname(os.path.realpath(__file__ )) home_lastmod = strftime('%Y-%m-%dT%H:%m:%SZ',gmtime(os.path.getmtime(pwd+'/templates/art_index.html'))) ... The template says: "2014-03-02T19:03:55Z". ... jaap@liakoster:~$ python Python 2.7.3 (default, Jan 2 2013

Re: request_finished signal not being called with Django 1.5.1 with uwsgi

2013-05-31 Thread jaap
The problem is mainly that the current LTS of Ubuntu ships this ancient version of uwsgi via apt. So it's very easy to end up with a system that's not capable of running Django 1.5 properly (sysadmins seem to prefer apt over pip). Seems sensible to at least specify the minimum uWSGI version in

Re: request_finished signal not being called with Django 1.5.1 with uwsgi

2013-05-31 Thread jaap
I've created a ticket https://code.djangoproject.com/ticket/20537 Not sure if this can be fixed in Django or a stern warning in the documentation can suffice. Op donderdag 30 mei 2013 17:15:29 UTC+2 schreef ja...@eight.nl het volgende: > > I'm being hit by the same issue. I don't really

Re: request_finished signal not being called with Django 1.5.1 with uwsgi

2013-05-30 Thread jaap
I'm being hit by the same issue. I don't really understand why it worked with older versions of Django though? That seems to be a bug. Op vrijdag 12 april 2013 01:28:42 UTC+2 schreef Lewis Sobotkiewicz het volgende: > > So figured it out. > > Apparently Ubuntu 12.04 packages uwsgi 1.0.3 in

Re: /static/ 404

2012-10-09 Thread Jaap van Wingerde
On Tue, 9 Oct 2012 11:33:36 -0400 Gladson SimplĂ­cio Brito wrote: > # coding: utf-8DEBUG = False or True ?TEMPLATE_DEBUG = DEBUG > > > if false, it has to serve files with apache, nginx, etc... > if true, and to operate... "DEBUG = True TEMPLATE_DEBUG = DEBUG" -- You

Re: /static/ 404

2012-10-09 Thread Jaap van Wingerde
next line to enable the admin: 'django.contrib.admin', # Uncomment the next line to enable admin documentation: 'django.contrib.admindocs', #'south', 'data', )" > What does "python manage.py findstatic admin/js/core.js" return? jaap@jaap:~$ "cd /home/jaap/dat

/static/ 404

2012-10-09 Thread Jaap van Wingerde
get to use absolute paths, not relative paths. '/home/jaap/data/development/workspace/django/liakoster.nl/static/', )" "jaap@jaap:~/data/development/workspace/django/liakoster.nl$ python manage.py runserver jaap.custard.shrl.nl:8000 Validating models... 0 errors found D

Django template include context

2009-09-11 Thread jaap
I'm using django 1.0's templates on GAE. I've got a for loop that outputs elements. I update their contents using ajax. I want to reuse the part of the template that renders the content of these elements. I have two handlers that handle /stufflist and /stuff/? reload=ajax. The first handler

Re: cannot resolve keyword mmtype__eq into field

2008-04-14 Thread Jaap
Thanks - that worked. I then tried pdata=myfile.objects.filter(mmtype__in=["W", "X"]) and that worked too! Question: where can I find the complete documentation of the filter expressions? I've been reading a lot about Django and Python - and don't know where to find this information in the pile

cannot resolve keyword mmtype__eq into field

2008-04-14 Thread Jaap
django version 0.96.1 on windows xp home. error is caused by statement in view: pdata = myfile.objects.filter(mmtype__eq="W") where the model is: mxt = ( ('N", 'Narrow'), ('W', 'Wide'), ) class Example(models.Model): name=models.Charfield(maxlength=30)

Re: Database API reference:

2008-04-02 Thread Jaap
Still Greek to me... So far I did it like this: [view] def start(request): group = Staff.objects.values('pnr', 'last_name') return render_to_response('tlist.html', group) [template] {% for person in group %} pnr last_name {% endfor %} Where did I go wrong?

Database API reference:

2008-04-02 Thread Jaap
QuerySet methods that return new QuerySets: values(*fields) Could anyone please give an example of this, using view and template? I have read the example using the interpreter, and cannot get it to work in view/template. FYI: I use version 0.96.1, Windows XP.

Re: howto display table data in html?

2008-03-31 Thread Jaap
"A model class represents a database table, and an instance of that class represents a particular record in the database table." I'm beginning to see some light. What I try to achieve is telling the application that, depending on the user's authority, he may not see some data, and/or may not

Re: howto display table data in html?

2008-03-31 Thread Jaap
I read there: from django.shortcuts import render_to_response from mysite.polls.model import Poll def index(request): latest_poll_list = Poll.objects.all() What is 'latest_poll_list'? I assume it is a list, but a list of what? Records? Can I cycle through that list (for X in

howto display table data in html?

2008-03-31 Thread Jaap
Probably another stupid question (sigh), but looking at views.py and having read just about all the documentation I could find (including the Django book), I still do not see how I can get data from a database into a web page. The Django book explains how it is done using the live interpreter -

Re: render_to_response syntax

2008-03-31 Thread Jaap
Absolutely right - thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to

render_to_response syntax

2008-03-30 Thread Jaap
render_to_response('template', *args, **kwargs): kwargs looks like a dictionary but if I refer to a dictionary, it is ignored: In names = {} names['my_name'] = "somename" render_to_response('template.html', names) names is equivalent to {'my_name': 'somename'}, so I would expect the

Re: sys.path question

2008-03-29 Thread Jaap
The name 'sys' is confusing. If it had been named 'python.path' instead of 'sys.path' I would have known where to look... I will be asking stupid questions for the next month or so - it's the fate of the newbie. --~--~-~--~~~---~--~~ You received this message

sys.path question

2008-03-29 Thread Jaap
Path in Windows XP Home is: D:\Phyton25\;D:\Python25Scripts;%SystemRoot%\system32;%SystemRoot%; %SystemRoot%\System32\Wbem When I use the interpreter in PyScripter, I see: >>> print sys.path ['C:\\Windows\\system32\\python25.zip', 'D:\\Python25\\Lib', 'D:\ \Python25\\DLLs',

sys.path vraag

2008-03-29 Thread Jaap
Path onder Windows XP Home is: D:\Phyton25\;D:\Python25Scripts;%SystemRoot%\system32;%SystemRoot%; %SystemRoot%\System32\Wbem Als ik de interpreter in PyScripter gebruik, dan krijg ik: >>> print sys.path ['C:\\Windows\\system32\\python25.zip', 'D:\\Python25\\Lib', 'D:\ \Python25\\DLLs',