A small correction.
>
> {{ form.choice.1 }}
> [some markup with fields]
> {{ form.choice.2 }}
> etc...
{{ form.choice.0 }}
{{ form.choice.1 }}
of course, 0-based indexes.
Regards,
Max
--~--~-~--~~~---~--~~
You received this message because you are subscribe
Hello.
The problem which I faced today was that I should place several radio
buttons for one ChoiceField in several places. E.g.:
[radio name=choice value=1]
[some markup with fields]
[radio name=choice value=2]
[some markup woth fields]
Of course, I could hardcode the fields to the template, b
Sorry, I misunderstood.
The last association is only deleted when the password is set.
Got it.
Regards,
Max
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send ema
> The problem with using a random password is that you can't answer the
> question "does this account have a password set?". I need to be able
> to answer that question because my OpenID implementation allows users
> to associate mupltiple OpenIDs with a single account. I want to let
> them delete
> Hmm. Aren't objects with __del__ attributes rare in pure python, or
> is there some other way you're thinking the gc couldn't collect the
> cycle?
Well, you don't know how are they rare indeed. Though, weakrefs are
simple and safe.
--~--~-~--~~~---~--~~
You re
One thing - if you alias the top context at the top level, You'll end
up with memory leak - there will be a circular reference. It can be
avoided, if the context variable would hold a weakref.ref to the top
context.
On Apr 12, 5:04 pm, "Max Derkachev" <[EMAIL PROTECTED]> w
Well, you can alias a top-level context in a context variable, and
then set the variable in that aliased context.
class AliasContextNode(template.Node):
def __init__(self, varname):
self.varname = varname
def render(self, context):
context[self.varname] = context.dicts[0]
on profile class
(the example in the code in the message below).
On Apr 4, 5:21 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 4/4/07, Max Derkachev <[EMAIL PROTECTED]> wrote:
>
> > That's not a problem. The API lookup can be easily emulated in cu
The code would be like
So, the code would be something like
def get_profile(self):
"""
Returns site-specific profile for this user. Raises
SiteProfileNotAvailable if this site does not allow profiles.
"""
if not hasattr(self, '_profile_cache'):
On Apr 4, 2:09 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 4/4/07, Max Derkachev <[EMAIL PROTECTED]> wrote:
>
> > Well, User do nothing with the profile other then simply loading it in
> > get_profile.
>
> Except that 'get_profile'
Hi James.
> > Second, models.get_model(app_label, model_name) enforce that the
> > profile object must be a Model subclass and should be in
> > INSTALLED_APPS.
>
> I think this is worth living with -- the standard use case will be
> that it's a Django model class, and if it's not it becomes a nig
Hi.
The offending code is:
1. app_label, model_name = settings.AUTH_PROFILE_MODULE.split('.')
2. model = models.get_model(app_label, model_name)
First, it does not behave properly if the settings.AUTH_PROFILE_MODULE
is something like 'path.to.app.models.Profile'.
Second, models.get_model(app_lab
Hi Adrian,
> Things are in flux with newforms right now, as they've been for a
> while, so the only thing I can say is, please be patient. We're aware
> of the fact that things are in flux, and, speaking as a perfectionist,
> chances are that it bothers me even more than it bothers you. :)
Thank
Hi, Adrian,
> Use django.newforms if you want your code to be forwards-compatible.
Sure. But why not to use the [one] validators set (or at least, one
exception class) in the long term, both in models and forms?
What to do with the validators that are used in models, including
builtin? Model.va
The ValidationError exception from newforms knows nothing of
ValidationError from validators.
That make useless any validators, builtin or custom, that was defined
for model fields, if one wanted to use them in related form field
validation. If the first at least extended the second, we could do
s
Unicode haven't been mentioned in your list and haven't made to
http://code.djangoproject.com/wiki/VersionOneFeatures
http://groups-beta.google.com/group/django-developers/browse_frm/thread/1debd2337965a765
http://groups-beta.google.com/group/django-developers/browse_frm/thread/6268156
Filled as #2996
Regards,
Max
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send
code.djangoproject.com's Trac rejected my ticket as supposed spam, so
I'll try to fill it here:
template.Nodelist.render raised an exception in
return ''.join(bits)
UnicodeDecodeError : 'ascii' codec can't decode byte 0xd1 in position
3128: ordinal not in range(128)
The problem was that the c
FormField and its subclasses should define html2python as a static
method, and FormField.convert_post_data calls the method so that it
must be static:
self.__class__.html2python(data)
So, it is impossible to access the field's instance attributes while
converting data. I've just faced a need of f
There were a lot of words about unicodification of Django, but things
has not been moved a bit further.
The beginning is at
http://groups.google.com/group/django-developers/browse_frm/thread/bad8f2c4628646dc
Regards,
Max
--~--~-~--~~~---~--~~
You received this
Hi!
The first problem I saw with Pyro Event Server is that it seems to me
too complex for the task.
Django uses PyDispatcher as the in-process event subsystem. In order to
make the event objects network-dispatchable, the only thing that should
be done is to find a way to serialize events somehow,
Hi.
I have the very first working prototype. Now it works over UDP, using
asyncore library. UDP is unreliable under heavy load, so I don't
recommend using it in production. However, my dispatch system abstracts
event dispatching from the transport, so any suitable transport can be
plugged in. It's
+1
Let the thing begin.
Regards,
Max.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this grou
Hello all.
Since Django apps tend to function in multi-process environments (both
in mod_python and FastCGI modes), I've faced a necessity to route
events between processes that execute Django application instances.
Django uses PyDispatcher to dispatch events, but it's a single-process
and can not
Hi Adrian,
Thanks for explanation.
I am also against bundling any JS toolkit with *core* framework.
--
Regards,
Max
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group
There's no established use of Dojo with Django yet.
Hopefully, there would be no such "established uses" with any JS
library. Django is a server-side framework. Even id Django is our
framework of choice, let us decide which client-side framework to use
in our applications.
Regards,
Max.
--~--~
>I have not looked at this branch at all, but I'll strongly suggest
> that you remove the YUI stuff.
Adrian, could You explain your opinion a bit more?
Does that mean that there are plans to bundle another toolkit? If yes,
what toolkit?
Regards,
Max
--~--~-~--~~~-
27 matches
Mail list logo