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 pa
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', 'D:\\Pyth
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', 'D:\\Python25\\Lib\\l
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 becaus
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
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 [EMAIL
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 - bu
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()
&c.
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 latest_pol
"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 chang
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.
--~--~-~--~~
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?
Aaah, I missed another dict... Thanks for setting it right.
--~--~-~--~~~---~--~~
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
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)
mmtype=models.Charfield(m
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 a
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 their
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 understa
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 t
ields/__init__.py",
line 905, in pre_save return getattr(model_instance, self.attname) File
"/var/django/liakoster.nl/blog-1/lib/python3.10/site-packages/django/db/models/query_utils.py",
line 178, in __get__ instance.refresh_from_db(fields=[field_name]) File
"/var/django/liakos
Don't forget 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 mo
ebrowser',
'grappelli.dashboard',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
'django.contrib.admindocs',
#'south',
'data',
)&quo
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 received this message beca
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
Op 2015-03-03T17:41:21 UTC schreef Jaap van Wingerde
in the message ,
mid:20150303174121.024af...@jaap.custard.shrl.nl the following text.
> ../locale/en/LC_MESSAGES/django.po:
>
> ...
> #: template.html:4
> msgid "jaar"
> msgstr "year"
>
>
# Uncomment the next line to enable admin documentation:
'django.contrib.admindocs',
'art',
'rosetta',
'dbgettext',
)
...
DEFAULT_CHARSET='utf-8'
FILE_CHARSET='utf-8'
DEFAULT_CONTENT_TYPE='text/html'
..."
"jaap@liakost
27;,
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
Op 2014-09-18T13:41:53 UTC schreef Jaap van Wingerde
in het bericht , ID: <20140918134153.390fc...@jaap.custard.shrl.nl> het
interface>volgende.
> I have suddenly unicode problems with de admin interface:
>
> "DjangoUnicodeDecodeError at /admin/art/photographextra/
&
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 (
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 to work around with PDF's
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 varia
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]
>
>-
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 unsubscrib
30 Invalid filter: 'unlocalize'
...
30 "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 ar
d hopefully provide
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 recei
33 matches
Mail list logo