Is it possible to see if a field (in my case an Imagefield) has
changed in the save() method? I want to have a Textfield automatically
changed if a new Image is uploaded, otherwise leave it alone.
class SomeClass:
sometextfield
someimagefield
def save()
if someimagefield has changed
[EMAIL PROTECTED] wrote:
> I'm still not exactly sure what you're trying to do, but if you should
> be able to add fields to the form object you cloned pretty easily with
> appendChild.
>
>
>
I tried that and it works great. Thanks for the suggestion :-)
--~--~-~--~~~--
[EMAIL PROTECTED] wrote:
> But here's a question... why are you trying to put this object into a
> string? Seems like you'd be better off just keeping it an object.
> Perhaps you'd be better off with a simple
> test = document.getElementById('id_embeddedvideo.0.type'); or, if you
> needed to do so
Jay Parlar wrote:
> On 11/8/06, Dagur <[EMAIL PROTECTED]> wrote:
> >
> > Unfortunately that's exactly the filter I tried using when I got that
> >
> > "Caught an exception while rendering: 'FormFieldWrapper' object has no
> > attri
Unfortunately that's exactly the filter I tried using when I got that
"Caught an exception while rendering: 'FormFieldWrapper' object has no
attribute 'replace'"
error.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Sorry for the vague explanation. To make a long story short I'm trying
to put the output of {{ blah }} into a javascript string, but since {{
blah }} prints out multiple lines, it won't work.
--~--~-~--~~~---~--~~
You received this message because you are subscri
I have a form with a drop down box and a few other fields but I want to
put it in a javascript field and printed out when a link is clicked. So
it looks something like this:
function bla(){
var test = 'Type{{ form.embeddedvideo.0.type }}';
return test;
}
the problem is that the formfield
You can also just use the "next" parameter in the login form. Here's how I did it
type="hidden"
name="next" value
="{% if next %}{{ next }}{% else %}/{% endif %}" />
On 29/09/06, Don Arbow <[EMAIL PROTECTED]> wrote:
On Sep 28, 2006, at 6:26 PM, Sean Schertell wrote:>> (2) This is a biggie for me.
I tried with tags and no tags but this is the first post being added. Having one other post didn't change anything.On 08/06/06, Ramiro Morales
<[EMAIL PROTECTED]> wrote:Dagur,
On 6/7/06, Dagur <[EMAIL PROTECTED]> wrote:>> Hi,>> I'm having problems with ManyToMa
Hi,
I'm having problems with ManyToManyField not appearing in the admin
site. I think it's best explained with this screenshot (look at the
bottom): http://dagur.sytes.net/static/djangoshot.jpg
I also put the source for the models in on pasted:
http://paste.e-scribe.com/372/
I'm at the point wh
Has this problem been solved? I've been fighting this problem forever.
Everything seems to work but no matter what i do the data in the new
class never gets saved. I would really love to see some instructions in
the documentation.
--~--~-~--~~~---~--~~
You receive
Hi, I have a ManyToManyField called "authorised" (which is supposed to
be a list of users) and a BooleanField called "is_private" which should
be set to false if there are no users in "authorised" so I did this:
def save(self):
if self.authorised.count() == 0:
self.is_priv
Hi,
I have a model like this (which is based on an old system I'm porting):
class Member(meta.Model):
user = meta.OneToOneField(auth.User, core=True)
ipb_id = meta.IntegerField(default=0)
website = meta.URLField(blank=True, null=True)
hide_email = meta.BooleanField(default=True)
did you know about Ellington (http://www.ellingtoncms.com/) ?
Dan Mahoney wrote:
>I would be interested in hearing what sort of replies you get. I have
>a similar interest.
>
>On 2/18/06, Arthur <[EMAIL PROTECTED]> wrote:
>
>
>>Adrian H. suggested I post a note explaining that I'm very
I'd be paranoid too if I used php
limodou wrote:
NewEdit is a Python Editor base on wxPython. I'm learning django
recently, and I'm beginning develop some extension about django in
NewEdit. The process is continuing. I'v finished something like these:
* django project wizard(need install it) -- you can create a django
project
This might not really be a Django question but I was wondering what is
the best way to write your apps so they can be easily translated (with
as small a performance hit possible of course)
it's not as nice as Django. But I like the turbogears-admin command
line tool
I've been throught this too :)
First of all, you need to use both {{ form.image}} and {{
form.image_file }}
this will create the hidden file and the file input field.
Also, if you forgot like I did, you need to put
enctype="multipart/form-data"
into the form tag.
Thirdly, in the view, do this
Jason F. McBrayer wrote:
> I'm almost certainly missing something very, very simple here, but I
> haven't been able to find what it is on my own.
>
> One view in my app should allow users to upload an OPML file, which the
> app will parse and use to import feeds, but which won't otherwise be
> sto
If you created the database from scratch (i.e. if you're not using an
existing database) you shouldn't need to have the line:
meta.IntegerField('id', primary_key=True),
the primary key would be created automatically. If that's the case you
might want to try creating the tables again.
Oh, sorry. I can't try it until I get home :-P
Thanks, I will do that!
I have a feature suggestion:
The option to open a pop-up window and search for the id.
Is it possible to somehow limit the size of drop-down lists in the
admin interface when editing an item that has a ForeignKey relation to
another table?
I have a rather large database and when I want to edit an item in one
of my tables, the page I get is huge (in kb's) and takes a quite a
while t
24 matches
Mail list logo