ase
interaction after the failing save, which is a get in the beginning of the
function on the next time through the loop, fails with:
current transaction is aborted, commands ignored until end of
transaction block
Perchance I also need to create a savepoint and do savepoint_rollback?
Bill
On Th
have ascii representations. Or
something is trying to use a utf-8 string under the presumption
that it is ascii. Rendering to the web should probably be rendering
utf-8.
Are there custom template tags involved?
Bill
On Thu, Apr 15, 2010 at 11:54 AM, zayatzz wrote:
> Hello
>
> I rec
mmit_on_success's wrapper will
have called commit. I'm assuming that the rollback will only roll back to
the most recent commit, so I won't be loosing things from previous
successful iterations of the loop that calls the wrapped function. So I
don't need to become involved in savep
The problem is reported at line 78 of the template, which uses a tag
named "result_list". That isn't one of the standard tags. Where does
it come from? Can you provide the source code?
Bill
On Thu, Apr 15, 2010 at 1:59 PM, zayatzz wrote:
> Header is like that:
>
>
I don't find it on
http://docs.djangoproject.com/en/1.1/ref/templates/builtins/ .
It may be provided by one of your installed apps. What {% load ... %} tags
are there in the template?
On Thu, Apr 15, 2010 at 2:32 PM, Daniel Roseman wrote:
> On Apr 15, 4:54 pm, zayatzz wrote:
>> Hello
>>
>> I r
m unaware of any of those needing to convert anything to
ascii.
Alan, can you expand the local vars in a few interesting stack frames, like the
bottom several, and maybe the one in options.py further up, and send just the
stack trace part again?
Bill
On Thu, Apr 15, 2010 at 2:54 PM, Daniel Roseman
ption, you may be
able to figure
out why it thinks it has to convert something to ascii (which is probably the
default string encoding, use sys.getdefaultencoding() to find out). Probably
something is applying str() to a unicode object.
I'm sorry that I can't provide a shortcut. Perhaps someo
t you're doing, or a couple of hours if you need to read a bunch
of documentation.
[ * I've got 2.4 (for zope/plone), 2.5, 2.6, 2.7, 3.0, and 3.1 on my laptop. ]
Bill
On Fri, Apr 16, 2010 at 2:29 AM, zayatzz wrote:
> Okay. I will try to test it in the way suggested by Bill and Ka
Beware! There are a number of security vulnerabilities you can have when
handling credit card numbers. There is something called PCI (Payment Card
Industry, if I'm not mistaken) compliance, the intent of which is to
try to avoid
some of the big credit card number stealing hacks that have been in
Why not add a "site" field to the model(s)? You can filter for the current
site by hand, or have individual model managers for the various sites
that you select at the top of the view (maybe in a decorator?).
On Mon, Apr 19, 2010 at 1:49 PM, Kepioo wrote:
> Hi Ben- i actually want all the climbi
;t match, the request has been tampered with, treat it as expired.
Bill
On Fri, Apr 23, 2010 at 10:36 AM, Nick Serra wrote:
> Just create a model that stores the url and the expiration time. If
> the url is hit past the expiration time, delete it, if it's still
> within the time
will compose and execute an update
query on the database to set the fields in the row according to the
attribute values of the instance.
Bill
On Fri, Apr 23, 2010 at 3:15 PM, Margie Roginski
wrote:
> I have a situation where I have a handle to a db object and I've
> modified a field in i
installed somewhere intresting, like just before you form.is_valid()
call and step on in.
But I'm sure that other development environments interface can also
use it well.)
2. Start a new thread and provide a lot more detail, including code
snippets and exact
validation error messages.
Bill
the install. (You can do this in a subshell and not affect other
operations.)
Bill
On Sat, Apr 24, 2010 at 9:36 AM, pjmorse wrote:
> On Apr 24, 3:03 am, Rob wrote:
>> Maybe this is more of a general python question, but when I run `sudo
>> python setup.py install` it insists
list uses (or used)
a Mac, and he's way smarter than me.
But really, the better way to do this kind of stuff is probably virtualenv.
Bill
On Tue, Apr 27, 2010 at 4:38 AM, Rob wrote:
>
> Thanks, but none of those suggestions seem to work. I'm not going to
> worry about thi
spent a long time setting breakpoints in
firebug, but it was an initialization issue (the plugin stuff was hard
to debug).
Bill
On Wed, Apr 28, 2010 at 9:01 AM, Bobby Roberts wrote:
> not sure how to do that... i'm not really getting any javascript
> errors or anything.
>
> On Apr
Presumably the user entered data into a form to perform the search.
I'd save the form field values, possibly slightly pre-processed.
Remember to include stuff that you're pulling out of, for example,
request.user. Then you can change the details of your search
function, your database schema, and a
here's one of these at
every stack level.
On Wed, Apr 28, 2010 at 10:38 AM, Bobby Roberts wrote:
> hey bill i'm getting this traceback:
>
>
> NoReverseMatch at /tinymce/filebrowser/
>
> Reverse for 'filebrowser-index' with arguments '()' a
url() must be given a url, not a file path. You need to put the image
somewhere that is being served by apache, or by the development
server (usually a subdirectory of 'media/' or similar) and then use
the corresponding url. For example, when running the devolopment
server in /home/me/djprojects/
I do notice that you have 'player_option' in the fields tuple, while
there is no such model field, but instead a field named 'player_options'
(plural). If that's actually in the source, I'd fix it before looking any
harder.
On Wed, Apr 28, 2010 at 10:32 AM, knight wrote:
> I have the following f
r/2010 17:49:54] "GET /media_sito/images/sf300.jpg HTTP/1.1" 404
> 2032
>
> Any sugg.
>
> Thanks
> Luca
>
> On 28 Apr, 17:07, Bill Freeman wrote:
>> url() must be given a url, not a file path. You need to put the image
>> somewhere that is being served
The request may have references to objects that will no longer
exist, or may be inappropriate when rerun later. I can't promise
that it won't work, but I believe that pickling the request is at
best a fragile solution.
To save just the required parameters won't take much code,
especially if you r
enerate the
>> Queryset that way.
>>
>> Peter
>>
>> On 4/28/10 12:28 PM, "Bill Freeman" wrote:
>>
>>
>>
>> > The request may have references to objects that will no longer
>> > exist, or may be inappropriate when rerun later.
to send to the pages cms folks.
Bill
On Thu, Apr 29, 2010 at 3:28 PM, zayatzz wrote:
> Buh... took me a while to get around to do it. After first installing
> the django trunk it revealed another problem first though. Not sure if
> this can be the cause or not?
>
> The problem was d
I think that there's an extra "samples.description LIKE" in there (occurs
twice).
But, should you want to do this with the ORM, assuming that samples
is a model (or could be made one, see the legacy database stuff in the
docs), I think that it could be done with Q objects using
description__contai
elector, perhaps)
and see if the value is bad there. If bad, the problem looks to be in the ORM.
I can't tell more from the stacktrace, since the relevant variable values are
objects, and the strings are inside them and not displayed in the
frame varables.
And, of course, I can't easily
f8')
By the way, what database are you using, and how is it
configured to store strings?
Bill
On Sat, May 1, 2010 at 3:21 PM, zayatzz wrote:
> Well i put this if and following import & trace to several places, but
> all i got was the 500 error and pdb prompt did not show up.
>
Does your __init__.py import the otehr files, or does it import the
models from them? If the former, then model Foo in foo.py of
the models package of app bar must be referred to as
bar.models.foo.Foo, whereas in the later case, as with having
everything in a models.py file, bar.models.Foo will wo
Do you want, as your first posting says, to select players not on your
team, that is,
have a queryset that returns such, or do you want a single or multi-select field
on a form having those players, as playing with self.field['members'] in your
second post would seem to imply?
You need the first i
creation and saving, rather than
calling the super-class save method).
Bill
On Tue, May 4, 2010 at 1:19 AM, Felippe Bueno wrote:
> Btw,
>
> I read about django don't accept @ in usernames, but I can create a User
> using
> User.create_user(m...@email.com, m...@email.com, mypassword)
See:
http://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors
On Wed, May 5, 2010 at 10:06 AM, Martin Tiršel wrote:
> Hello,
>
> I need to insert some data from database onto every page, so I inserted them
> into base.html. Until now, I was using generic views but it doesn'
, or have your own object structure that you
know how to render for the requester.
Much more coding than the dom, but you don't need the whole
document in memory at once.
Bill
On Thu, May 6, 2010 at 3:34 PM, Ross wrote:
> Reading more it sounds like the memory usage issue, particularly for
Is AUTH_PROFILE_MODULE set correctly in settings.py?
On Tue, May 11, 2010 at 6:43 AM, django_jedi wrote:
> OK, I'm baffled. I must be missing something right in front of my
> face...
>
> I'm trying to create a form that will allow users to update their
> profiles. No matter what I try, I get a
Yep. Probably should have been called AUTH_PROFILE_CLASS.
On Tue, May 11, 2010 at 7:29 PM, CrabbyPete wrote:
> should be
>
> AUTH_PROFILE_MODULE = 'app_name.Profile'
>
> On May 11, 10:15 am, Bill Freeman wrote:
>> Is AUTH_PROFILE_MODULE set correctly in settings
h the next multiple of ts columns.
Bill
On Thu, May 13, 2010 at 10:10 AM, Jirka Vejrazka
wrote:
> Ravi,
>
> the "default" lines where you just uncommented existing lines (like
> the "include admin") start with spaces, the lines you've created start
> w
Update still takes exactly one argument: self.
I'm still not completely clear on what the OP is trying to do so I'll
guess that for a given User object (id == 11) you want to adjust
a set of attributes not known apriori, but available as key - value
pairs from an itterator I'll call 'd.items()':
.objects.filter(pub_date__year=2007).update(headline='Everything
> is the same')
>
> Regards
> Scott
>
>
> On May 13, 3:14 pm, Bill Freeman wrote:
>> Update still takes exactly one argument: self.
>>
>> I'm still not completely clear on what the
t I could go look at the code, but
I've got a sneaking suspicion that that it's a worker method used
in the implementation of filter, exclude, etc.
So, the only way that I know to run a SQL UPDATE is with custom
SQL. (I'm pretty sure that you can't do it with extra().)
Bill
On
" below, and do:
User.objects.filter(id=11).update(**d)
Bill
On Fri, May 14, 2010 at 10:30 AM, Tom Evans wrote:
> On Fri, May 14, 2010 at 3:26 PM, Bill Freeman wrote:
>> Actually, there would be a real advantage to doing update in the
>> DB rather than instantiating the model, chang
Two choices:
1. Use apostrophe instead of a left or right signle quote when filling
out the form. ;^)
2. Encode the description as utf-8 before writing it. description is
almost certainly
a unicode string. It gets coerced to be a bytes string when passed to
python's (not
django's) csv writer.
I'll be that you can have a private site-packages directory, or whatever
you want to call it, which you can add to sys.path. You can manipulate
sys.path in your manage.py, but if you don't need to override basic
django stuff that is imported before settings.py is read, you could do
the manipulatio
Because the incantation is ". activate", not "./activate". "." is a
shell command
a.k.a. source, which reads the file and executes it in the current shell. It is
not a command to run as a sub-process.
On Tue, May 18, 2010 at 1:15 PM, ryan west wrote:
> Hey Tom,
>
> Any idea why ./activate would
Make one of the urls pass an argument using parentheses in the pattern. Then
make that an option argument in the view function. Reverse will return one if
you supply the argument, and the other if you don't.
But why not use named patterns and reverse by pattern name?
In either case you have to
You could put a method on your basket object which calculates the shipping.
Then if the basket object is included in the context, you can trivially call it.
Or perhaps better, fix up you all_purchases iterable to append it.
Something like:
def add_shipping(purchaces_iterable):
for i, p i
On Thu, May 20, 2010 at 4:24 AM, shofty wrote:
> thanks for the swift response.
>
> On May 19, 10:05 pm, Bill Freeman wrote:
>> You could put a method on your basket object which calculates the shipping.
>> Then if the basket object is included in the context, you can
Perhaps see the django-filebrowser product. It may have things that
you don't need, but
makes thumbnails, and associates them with an image field, so it is at
least a sample
of what's involved.
Bill
2010/5/31 Ricardo Bánffy :
> Hi folks
>
> I am having huge problems wrapping
get
a response. (COMET, on the other hand, is different.)
Bill
On Tue, Jun 1, 2010 at 10:16 PM, Carl Nobile wrote:
> I have modified my admin site so that a state/province will be loaded
> through an AJAX call when the country is chosen. I had
> @login_required(redirect_field_name='
On Wed, Jun 2, 2010 at 9:35 AM, Carl Nobile wrote:
> Nothing has changed at all. I was just going through the steps to
> migrate my code base to Django 1.2.1 and this stopped working. If I
> comment out the decorator everything works just fine minus the
> protection of cause. The internal wrapper
orders for different model forms on the same
model (I make it
match the fields set from the Meta class in my application).
Bill
On Thu, Jun 3, 2010 at 11:05 AM, Thomas Allen wrote:
> How can I create my own form renderer, like as_p, as_table, etc? I see
> that the form class provides _htm
Actually, you might try adding them in your form's __init__ method,
again, after calling
the superclass method. I've done this with choices on a field.
Since self.fields is a
deep copy, you might be safe setting an attrs attribute on the field's widget:
self.fields['fieldname'].widget.attrs.up
e the 1 to a 0.
Bill
On Fri, Jun 4, 2010 at 12:42 PM, __alex__ wrote:
> Hi all,
>
> I've been trying to figure this out for hours and hours, but I simply
> can't understand how to make it work.
>
> Now, we have a very simple custom template tag. Let's say that w
People are more likely to have ideas if you give us your Apache
configuration stanzas, particularly the WSGIScriptAlias and, if used
your WSGIDaemonProcess and WSGIProcessGroup directives,
any directory stanzas you have for serving the media, admin-media,
and any other static content trees. All pr
Note: The order of fields in the Feta class fields object does not affect the
order of fields on the page.
If the set of fields is truely dynamic, you will need, I believe, to
use internal
interfaces of the forms machinery, which are not guaranteed to remain the
same from one Django version to the n
out.
This is all much more work than just installing stuff fresh, in these bold
new days of distribute and pip install.
Bill
On Tue, Jun 8, 2010 at 10:32 AM, Alex Robbins
wrote:
> You don't want to just copy site-packages. If you have any compiled
> modules (pyyaml, PIL, etc) they
al DB
configuration), you could raise an exception if it is not, while holding lots of
interesting stuff in local varuables so that they could be examined in the
stack trace.
Bill
On Tue, Jun 8, 2010 at 3:19 AM, zayatzz wrote:
>> Guarantee the problem is with your __unicode__ method on the Ga
.
You are perfectly welcome to have a view for editing profiles that
isn't part of the
admin app, where you could have whatever password management option you
want, but the admin stuff just uses basic django model capability to
display that
box.
Bill
On Thu, Jun 10, 2010 at 9:13 AM, stanl
On Fri, Jun 11, 2010 at 6:19 AM, tsmets wrote:
...
>
> Any help on how to run python scripts directly to create my data
> sets ?
> What I do now is fine but could be better automated ?
>
...
One possibility is to write yourself one or more management commands
which you could invoke by hand,
plates, or
just css, images, and js, but I wouldn't be surprised. The pages templates are
examples, IIRC, and you make your own to stick in
project_root/templates/pages/ .
Bill
On Tue, Jun 29, 2010 at 8:56 AM, John Griessen wrote:
> I made a buildout with the config below that didn't wo
y: start with the default, then consider changing things that don't
work for your purpose.
Bill
On Wed, Jun 30, 2010 at 11:34 AM, AllenDang wrote:
> I'm new to django, it's amazing! But after I did some research from
> google, I found out that some people say that the defa
Does it happen when running the development server? If so, you get
a lot more debugging info right up front (access to variables in each
stack from, for instance). If it's still not clear you can use the trace
as a guide as to where to put a pdb.set_trace() (possibly in an if that
makes it only t
What's in the database probably isn't legal UTF-8. It is easily possible
to have a sequence of characters in some other encoding which only
results in the wrong characters if treated as UTF-8, but it is also possible
to violate the UTF-8 structure with such a sequence. PostgreSQL, if
set for UTF-
gt; information.
>
> On Jul 1, 9:28 am, Bill Freeman wrote:
>> Does it happen when running the development server? If so, you get
>> a lot more debugging info right up front (access to variables in each
>> stack from, for instance). If it's still not clear you ca
mood = Emotion.objects.get(mood='thoughtful')
The above raises DoesNotExist if the emotion hasn't been defined. If
you want to raise a different one, then catch this one and raise your
own. Then use mood in your query on the person's emotions.
On Thu, Jul 1, 2010 at 10:31 AM, Doug Warren wrote
You might have a poisoned DNS cache. Since this is Windows, you could
try rebooting, but there could be other DNS caches between you and a
good name server.
On Thu, Jul 1, 2010 at 3:37 PM, FC wrote:
> On Jul 1, 3:41 pm, Carsten Fuchs wrote:
>> Hi all,
>>
>> Am 01.07.2010 19:40, schrieb FC:
>>
>
he browser
location bar doesn't seem to work, making me presume that the site
is in an apache or equivalent).
Another nifty tool for diagnosing DNS problems is nslookup, but, again,
I can't tell you what to use on windows.
Bill
On Fri, Jul 2, 2010 at 2:19 PM, mhulse wrote:
>> try reb
I suspect that you can do what you want with mod_rewrite, but
there is a learning curve.
Bill
On Fri, Jul 2, 2010 at 11:39 AM, garagefan wrote:
> So i realize this isn't a specific django question but more of a
> python question and setting up the config file for the server.
>
&
of the DB settings, is invalid, then it's not Django's job to fix it for
you.
N.B.; There's no guarantee that that web page correctly identified its
encoding either.
Bill
On Mon, Jul 5, 2010 at 8:52 AM, Yateen wrote:
> Thanks Bill.
>
> Do you mean even Postgres also sho
Just for fun, try specifying the non-ASCII strings as unicode strings
and let us know how you make out.
On Tue, Jul 6, 2010 at 10:09 AM, Alexander Brill wrote:
> Hi,
>
> I got some translation strings set up. But they aren't translated if
> the translation string contains a non-ascii character.
>
I agree that the "as" clause makes me expect it to render nothing, but it
has worked this way at least back to 1.0, so I guess changing it is not
an option.
On Wed, Jul 7, 2010 at 11:55 AM, ringemup wrote:
> Er, that was sloppy of me. Actual output:
>
>
> a
> a
> b
> b
> a
> a
>
>
> On J
You could perhaps put it in a span with display:none; .
Or you can always create your own template tag with the desired behavior.
The source for the existing tag is in .../django/template/defaulttags.py .
On Wed, Jul 7, 2010 at 12:25 PM, ringemup wrote:
> I guess that's a workaround. It would b
My bet is that FullProfile.objects.get is raising the error because
there is no profile with that email address. You might expect this
to be caught by the "try" and raise a validation error instead, but
since you have no "except" clause, its not going to happen.
On Wed, Jul 7, 2010 at 1:22 PM, Ni
#x27;m looking at is
your profile model) isn't likely to win "best practice" accolades.
Bill
On Tue, Jul 20, 2010 at 10:08 AM, reduxdj wrote:
> HI,
>
> So I tried for an hour or so to access the current user's first name,
> so I can send out a personalized invitatio
Example, no, but you could create a custom field, based on the DecimalField,
which a custom validator that checks for and removes a leading dollar sign.
I think that django snippets has a good chance of having examples of "currency"
fields, and if not, Satchmo has one. Perhaps they do the dollar s
ate from the database,
though caching could make this look as though it is working).
>
> On Jul 20, 10:33 am, Bill Freeman wrote:
>> You don't say what model this is. Since it doesn't exactly match
>> django.contrib.auth.models, I'm going to guess that you may
I'm not sure that we are understanding one another.
In an earlier post you mentioned the phrase "current user". I
interpreted that to be the user which had "logged in" to the site,
using django.contrib.auth (such as to be able to use the admin, though
certainly not all such users need be given ad
On Wed, Jul 21, 2010 at 9:28 PM, Ron Barak <
google_maps_forum.comve...@9ox.net> wrote:
> Hi,
>
> I'm starting to learn Django, and was wandering if there were any free
> web-hosting sites that would support modern Python (e.g. > 2.5) and
> Django ?
>
> Once the site I have in mind is developed an
ut that the generic views
url generation uses reverse().
Bill
On Thu, Jul 22, 2010 at 3:48 AM, maciekjbl wrote:
> Hi,
>
> I wrote two apps in same project. There're quite similar, and this is
> the problem here. They have two idetical urls.py files :
>
do the appropriate
encoding and decoding.
Bill
On Thu, Jul 22, 2010 at 8:58 AM, Yateen wrote:
> Ok, I did some changes and things look to be working.
>
> My intention was to receive URLs, parse them to get the base URL, put
> them in database (Postgres), and then through a http q
That's because list have no attribute "forloop". forloop is for use inside a
{% for ... %}
tag, where
{{ forloop.counter0 }}
works just fine.
On Fri, Jul 23, 2010 at 1:30 PM, ydjango wrote:
> I tried {{labels.forloop.counter0}} . It did not work. where labels
> is a list.
>
> --
> You re
.py".
The tutorial at python.org really is worthwhile.
I also believer that the directory containing these files must be
named "templatetags".
I don't know, from reading your question, whether you got that part.
Bill
On Mon, Jul 26, 2010 at 8:56 AM, Joseph wrote:
> hi
&g
angle, as seen from the center
of the sphere, and typically in radians.
Bill
2010/7/28 Alexandre González :
> Hi! I'm using the Django GEOS API [1] in my project to see the distance
> between two users.
> I get the coordinates from google maps in latitude/longitude mode and I need
>
well.
Bill
2010/7/29 Alexandre González :
> Hi!
> I'm searching near people in my app. I'm doing it a this way:
> 37 people = Person.objects.all().exclude(user=request.user)
> 38
> 39 near_people = list()
> 40 for person in people:
>
A couple of possible optimizations:
First, because cos is single valued over the range of possible angles
(as measured
from the center of the earth, 0 <= d <= PI) distance is monotonic with
cos distance.
So you can pre-calculate the cos of the distance, and compare the
innder expression
to that:
There is a CheckBoxSelectMultiple widget in django.forms, suitable
for use with a forms.ModelMultipeChoiceField, and probably with
other stuff.Doesn't it do what you need? Or are you just reinventing
the wheel.
And, of course, your code as shown doesn't work because Cat and
Category are not b
uff you
do paste in.
On Fri, Aug 6, 2010 at 3:26 PM, lingrlongr wrote:
> @Bill
>
> Thanks. I just stumbled across that widget. I know models.Model
> weren't there, I was trying to simplify thinking we'd all know they
> were there. I guess, never assume ;)
>
> Looks l
r, an
instance of which is
passed to bound_field.as_widget() to capture teh name, data (values)
and attrs. If there's
an 'id' attr, you also have to dumy up an enhanced version for each checkbox.
About 80 lines of code, if I can count the blank lines for prettyness.
Bill
On Wed,
I suspect that you must refrain from setting self.widget if widget is in kwargs.
On Thu, Aug 12, 2010 at 1:22 PM, omat wrote:
> Hi All,
>
> I have a custom TagField form field.
>
> class TagField(forms.CharField):
> def __init__(self, *args, **kwargs):
> super(TagField, self).__init__(*
Ok. I have permission from my boss, and have cleaned it up a bit. See:
http://djangosnippets.org/snippets/2151/
Bill
On Sat, Aug 14, 2010 at 7:25 AM, Andreas Pfrengle wrote:
> Hello Bill,
>
> thanks for your answer. However, I've never written a template filter
> yet. Woul
Have you tried looking at the raw data to see if it is what you
expect (capture to a file or pdb.set_trace() is your friend)?
Have you tried (assuming relatively recent python, >= 2.6
I think) loads from the json module?
Bill
On Fri, Aug 20, 2010 at 8:16 AM, irum wrote:
> Hi,
> I am
Andreas,
I'll give it a try, but it won't be soon. Other projects are hot.
Bill
On Sun, Aug 22, 2010 at 9:07 AM, Andreas Pfrengle wrote:
> Hello Bill,
>
> thanks for the code. It took half the weekend, but finally I built
> upon this to get a radiobutton-iterato
sed in the signal.
Bill
On Sun, Aug 29, 2010 at 9:12 AM, bruno desthuilliers
wrote:
> On 27 août, 18:07, AK wrote:
>> From what I can tell in the documentation, a post_save signal only
>> passes sender, instance, created, and using. I would love to use this
>> signal to upd
kage installation scripts usually take care of
this, but it sometimes needs to be done by hand, if you're just, for
example, unpacking a tarball. I don't know the equivalent for osx.
Good luck.
Bill
On Tue, Aug 31, 2010 at 12:41 PM, keynesiandreamer
wrote:
> Howdy!
>
> I h
This seems to me to be a job for the template. The forms documentation has
a section on custom rendering which shows you how to iterate through the
fields, or access them by name. You would insert whatever HTML construct
was appropriate for your text, providing a context variable giving its conte
n the view and pass it as a boolean in another
context variable to use in an if tag (or calculate in a model or form method
that is easy to call from the template code).
Or I may be totally misunderstanding the original problem.
Bill
On Wed, Sep 1, 2010 at 9:48 PM, bobhaugen wrote:
> On S
erence
in the template.
So, is this what you want, and if so have you tried it, and if so what don't
you like about the result?
Bill
On Thu, Sep 2, 2010 at 3:06 PM, bobhaugen wrote:
> Bill,
>
> Thanks a lot for sticking with this question.
>
> On Sep 2, 1:44 pm, Bill Freeman wr
ure it with a named argument rather than extracting ti from
kwargs.) Does that fit?
Bill
On Thu, Sep 2, 2010 at 4:08 PM, bobhaugen wrote:
> On Sep 2, 2:54 pm, Bill Freeman wrote:
>> Let's start by agreeing on common terminology. "property" has
>> a meaning in Python sli
Don't use [] subscripting, use dot. The template engine tries using
the thing after the dot in various ways, including as a dictionary key
and as a list index. So, for example:
{% ifequal param1_trunc.i "-" %}
On Thu, Sep 2, 2010 at 5:11 PM, Bradley Hintze
wrote:
> Hi,
>
> Django says that t
There was an email from twitter to it's users, yesterday or the day before,
saying that they've changed their auth API. I think it was a change to
requiring OAUTH, but you may want to check whether port or SSL changes
have occurred.
On Fri, Sep 3, 2010 at 10:08 AM, ashy wrote:
> Hi All,
>
> I am
No. I'm not actually using twitter anywhere. I just remember the
email saying that the API changed on Tuesday, so I'm not surprised if
things that worked before are broken now.
On Fri, Sep 3, 2010 at 10:26 AM, ashwin morey wrote:
> Hi Bill,
>
> Did you try using django-t
dvice).
Bill
On Mon, Sep 6, 2010 at 12:39 AM, ashy wrote:
> Hi All,
>
> Now I am getting 'Cannot send request' exception.
> Exception Location: /usr/lib/python2.6/httplib.py in putrequest, line
> 802
> Some problem with httplib. Any ideas?
>
> thanks
> ashwin
101 - 200 of 990 matches
Mail list logo