Continuing the discussion from http://code.djangoproject.com/ticket/9893
here.
Summary: FileField and ImageField have a problem when the length of
the file path relative to MEDIA_ROOT exceeds 100 characters (or the
overridden max_length). I get a 500 server error (with PostgreSQL) and
the
I couldn't find a ticket for this issue yet. Simon, mind if I create a
ticket and dump your description of the issue there?
-Antti
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post
Jacob's comment on #django-dev:
> that's been discussed ad-nauseum in the past. models don't
> have __setattr__ hooks for speed, so you can say
> "model.intfield = "Fish"" for all Django cares.
> [...] it's a well-known problem, but one without a "good" fix.
> I think model validation will
According to the backwards incompatible changes wiki page:
> you must either store a python decimal value in the model attribute or a
> string (which will then be converted to a decimal)
But what is "then" in "will then be converted"? It appears that the
conversion doesn't take place when
It's confusing that the django.utils.text.smart_split() function un-
escapes quotes and backslashes inside the literal string while
preserving the surrounding quotes:
>>> print ' '.join(smart_split(ur'arg1 "the \"second\" argument"
"the \\third\\ argument"'))
arg1 "the "second"
The django.utils.text.smart_split() function used to split template
tag contents seems to strip backslashes. On the other hand, string
literals in variables (like {{"mystring"}}) are passed to the filter
expression parser with backslashes intact.
This complicates things a bit. Forget the part
On 22 touko, 18:47, "Nicolas Lara" <[EMAIL PROTECTED]> wrote:
> objet it refers since I dont see any case in which it would make sense
> to have the replies away from the objects being replied upon.
I've experimented with both approaches on a couple of websites, and
the "correct" solution
While I was trying to implement allowing filter expressions as
arguments to some built-in template tags (see #5756), I found
inconsistencies in the handling of literal strings in the template
system.
Collin Grady's patch [1] for {% ifequal %} looks good, but using the
same logic for other tags
I need to allow users to log in to my Django site with their old Unix
usernames and passwords, which may be encoded with MD5-based crypt.
Yuri, I don't believe your hook provides that functionality.
--~--~-~--~~~---~--~~
You received this message because you are
Titus Brown, the author of twill, fixed this issue in the latest
snapshot. It's available from
http://darcs.idyll.org/~t/projects/twill-latest.tar.gz
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
I tried old versions of twill, and it seemed to work correctly in
0.8.4, but version 0.8.5 introduced this duplicating behavior. I can
see that the application result reading mechanism was heavily modified
at that point.
Here are relevant snippets of the source for your convenience.
twill
(twill 0.9b1 is of course as close as saying "easy_install twill" if
you have setuptools installed)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to
Here is a simple test case. Place twilltest.py and urls.py in a
directory and run "PYTHONPATH=. python twilltest.py". Make sure Django
and twill exist in your PYTHONPATH.
--- twilltest.py -
#!/usr/bin/python
from django.conf import settings
I'm desperately trying to get twill to work together with Django using
twill's WSGI intercepting.
The problem is, I always get the content of the page concatenated
twice together. I've debugged and narrowed down the problem so it must
be either in twill.wsgi_intercept.wsgi_fake_socket.makefile()
Changeset 5073 [1] added support for Unix DES crypt passwords (see
ticket 3316 [2] for discussion).
Many systems use MD5-based crypt shadow passwords (see e.g. man 3
crypt or its on-line version [3], under heading "GNU Extension"). This
extension to the crypt library prefixes the encrypted
Am I correct in my conclusion that formset_for_model() in the newforms-
admin branch doesn't offer any convenient way to define the form's
prefix?
Is my best option currently to subclass BaseModelFormSet and override
the defalt value of the prefix= kwarg in its __init__()?
If so, wouldn't it
Malcolm,
That's basically what I hoped to hear :)
I started looking at model validation in the db model and admin
modules, but following the code led me to newforms, which did left me
wondering if something's still missing.
Thanks for the update, I'll stay alert and jump in to test the new
Today I challenged myself to dive into newforms-admin source code and
try to figure out how to fix the unique_together problem for inline
forms in admin.
I thought I'd share what I found and where I got stuck in case someone
wants to shed some light on the matter. I realize that my knowledge of
I'm having a hard time trying to do my unit testing in unicode. I'm
using the unicode branch of Django.
Here's a simple tests.py example:
# -*- encoding: utf-8 -*-
u"""
>>> print u'\u00e4'
this output should not match the above test
"""
When I run this with manage.py test, I get the following
Just use datetime.now without the function call parentheses.
See
http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#RemovedLazyDate
for an explanation.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
I've opened another bug which could have something to do with this:
http://code.djangoproject.com/ticket/2080
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send
My guess is that there's no way to do it on the db level. You can
retrieve the results for both queries as lists and then merge:
results = list(queryset1.filter(criteria...)) +
list(queryset2.filter(criteria...))
results.sort(lambda a, b: cmp(a.date, b.date))
> If I understood docs correctly this is now possible in m-r branch.
Sounds interesting! Which part of the docs?
Wouldn't you need to specify the translated field in the i18n_for_foo
table as well? For example an Article object would need translations
for both the title and the content.
tonecmd, maybe you need:
events[0].what.get_what_display()
for more information, see:
http://www.djangoproject.com/documentation/db_api/#get-foo-display
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
I admit there's nothing you can do on the client side to avoid the need
for server-side validation. But allowing only a tight subset of tags in
TinyMCE does solve many user experience problems when pasting formatted
text.
--~--~-~--~~~---~--~~
You received this
My solution was to prevent harmful tags and attributes in TinyMCE's
configuration. Even copy-pasting from word processors works ok now.
For more information see:
http://groups.google.com/group/django-users/msg/60ad1f2a544ec2d4
--~--~-~--~~~---~--~~
You received
Open the generated admin page in your browser. Take a look at the HTML
source. Check that the paths in the
If you have /var/www/mysite/settings.py
then you need PythonPath "['/var/www']+sys.path"
just like limodou just instructed.
Your DocumentRoot should be outside the Django project tree.
I usually have:
/home/myproject/public_html
/home/myproject/django/myproject
and define:
DocumentRoot
I don't see why you couldn't use compile_string (from
django.core.template) or your own parser to resolve variables in your
template tag. A custom parser might be faster, but then again with
compile_string you get more features.
29 matches
Mail list logo