Weeel, there is the newforms-admin branch. I haven't tried it myself
though, I've just seen people om the IRC channel discuss it. Judging
from the roadmap, it should be pretty usable.
http://code.djangoproject.com/wiki/NewformsAdminBranch
--~--~-~--~~~---~--~~
You
If I have a model with something like
class A (models.model):
parent = meta.ForeignKey('self', blank=True, null=True,
related_name='child')
Is it possible to do a select for some results in A along with a count
of all their children?
-Dougal
--~--~-~--~~~---~-
Maybe I'm misunderstanding ,but if you just need to validate why give
your form a custom clean() method to take the p_id parameter and
verify with self.clean_data?
If you have to pass it in on creation, this is what I did when I
extended extended the form class to handle a bunch of OneToOneField
On 17-Mar-07, at 7:05 AM, Kenneth Gonsalves wrote:
>> figure out
>> how to create an account, so I had to do it anonymously.
>
> edit preferences so your email address is recognised and appears -
> good enough for all purposes
oops - s/preferences/settings/
--
regards
kg
http://lawgon.livejo
On 3/17/07, Michael <[EMAIL PROTECTED]> wrote:
>
> > You can try db_dump.py tool, it's not a web-gui based, but a command line
> tool.
> >
> > http://www.djangosnippets.org/snippets/14/
> >
>
> It is a very good tool to work with Mysql or sqlite3 but not with
> Postgresql.
An alternative is to us
On 17-Mar-07, at 2:45 AM, Todd O'Bryan wrote:
> I just edited a Wiki page and maybe I'm dense, but I couldn't
> figure out
> how to create an account, so I had to do it anonymously.
edit preferences so your email address is recognised and appears -
good enough for all purposes
--
regards
>self.data.get('p_id')
I tried it, getting error:
Exception Type: AttributeError
Exception Value: 'str' object has no attribute 'get'
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" grou
On 3/16/07, Jens Diemer <[EMAIL PROTECTED]> wrote:
>
> limodou schrieb:
> > You can try db_dump.py tool, it's not a web-gui based, but a command line
> > tool.
> >
> > http://www.djangosnippets.org/snippets/14/
>
> Very cool! It seems to work without problems ;)
>
> I made a hack to put it into m
On 3/17/07, Michael <[EMAIL PROTECTED]> wrote:
>
>
> On 3/17/07, limodou <[EMAIL PROTECTED] > wrote:
> >
> > On 3/16/07, Jens Diemer <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > I would like to backup and restore my django App-Database. This should
> > > be usable with a Web-GUI.
> > > I thought f
On 2007-03-16 13:51:17 -0600, "johnny" <[EMAIL PROTECTED]> said:
>
> I have a forms.py that uses newforms. It has a class
> SalesForm(forms.Form). I need to pass an argument, p_id to SalesForm,
> which is used to retrieve related product from product model. When I
> run it, I get an error:
>
On Mar 16, 4:49 pm, "johnny" <[EMAIL PROTECTED]> wrote:
> Now within SalesForm, how do I get p_id?
self.data.get('p_id')
--
Jeff Bauer
Rubicon, Inc.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django user
I need to validate the data user enters, based on the product they
have viewed.
--~--~-~--~~~---~--~~
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.co
On 3/16/07, Jens Diemer <[EMAIL PROTECTED]> wrote:
>
> Generally: I have possibly wrong data in the data base. But i think
> django does not help, to find these wrong data.
> I made "django-admin dumpdata" and i got this error:
> """
> Unable to serialize database: ContentType matching query does
I did it using PHP. It can be circumvented but it's not something
the average user would do. Everytime an user logins, the session id is
stored on a table, with the time and the user id. On every request by
every logged in user, I put every previous session ids from the user
id on an array, rem
> I would like to find a way to prevent users from simultaniously
> logging in from different computers but using the same username and
> password.
How do you define "different computers"?
A remote IP address, possibly cookies, and possibly JavaScript
are about all you have to work with to dete
The quick answer would be to check through
the session data for a matching user id, but
there's one possible wrinkle: How do you
know when a user has logged off?
In my case (not yet implemented), I'll have
a timeout, but that still doesn't address
the issue of a user losing a connection and
atte
I did this: forms.SalesForm(request.POST, p_id). Inside class
SalesForm(forms.Form) which init was overwrote, as you mentioned like
below. Now within SalesForm, how do I get p_id?
> class SalesForm(forms.Form):
> def __init__(self, *args, **kwargs):
> super(SalesForm, self).__init__(
Hi,
In order for users to use my Django site they must login. I am using
the standard auth app. I set the session to expire when the browser is
closed or when the user clicks a log out button.
I would like to find a way to prevent users from simultaniously
logging in from different computers but
On 3/16/07, Todd O'Bryan <[EMAIL PROTECTED]> wrote:
> I just edited a Wiki page and maybe I'm dense, but I couldn't figure out
> how to create an account, so I had to do it anonymously.
You should be able to get Tract to remember you by clicking the
"settings" link right above the nav bar and fil
On Fri, 2007-03-16 at 17:15 -0400, Todd O'Bryan wrote:
> I just edited a Wiki page and maybe I'm dense, but I couldn't figure out
> how to create an account, so I had to do it anonymously.
It's a little hidden, I would agree. I considered it a real find when I
worked out how to do this when I fir
> super(ConfirmForm2,self).__init__(*args,**kwargs)
Copy paste edit: ConfirmForm, not with the 2. :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
Here's another brainstorm that's sort of a combination. :) It's a
Form that handles confirmation validation, but does so at the field
level. Code will help illuminate what I mean:
class ConfirmForm(forms.Form):
"""
...
"""
def __init__(self, *args, **kwargs):
super(Conf
I just edited a Wiki page and maybe I'm dense, but I couldn't figure out
how to create an account, so I had to do it anonymously.
Is there a way to get a Trac account or are those reserved for the
nobility?
Todd
--~--~-~--~~~---~--~~
You received this message be
I don't work much with form_for_model, but you
could probably do something like this:
IconForm = forms.models.form_for_model(Icon)
if request.method == 'POST':
form = IconForm(request.POST)
Then perform your own validation, assigning an error
to the field and returning:
context = {'form
johnny,
Place p_id as a field in the template (it can be a hidden)
so you don't need to pass it as a parameter to SalesForm.
If you still need to override the __init__ method in
SalesForm, do it in the following manner:
class SalesForm(forms.Form):
def __init__(self, *args, **kwargs):
On 3/17/07, limodou <[EMAIL PROTECTED]> wrote:
>
>
> On 3/16/07, Jens Diemer <[EMAIL PROTECTED]> wrote:
> >
> >
> > I would like to backup and restore my django App-Database. This should
> > be usable with a Web-GUI.
> > I thought fixtures would be well usable for it. But there are some
> > problem
James,
> While I can understand feeling frustrated at writing custom validation
> methods,
To clarify, I only feel frustrated at writing custom code for
ubiquitous validation needs.
> And that distinction -- between Field-level validation and Form-level
> validation -- also makes intuitive sens
On Mar 16, 2:18 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> And that distinction -- between Field-level
> validation and Form-level validation -- also
> makes intuitive sense to me; it feels right
> that a Field only needs to know about itself,
I'm not particularly concerned about field
vali
Hi,
I don't understand very well what you are trying, but the error is clear:
class SalesForm(forms.Form):
def __init__(self, p_id):
do some stuff here
SalesForm constructor only expect one parameter plus the object itself
(self). You are passing request.POST, and that
param
I have a forms.py that uses newforms. It has a class
SalesForm(forms.Form). I need to pass an argument, p_id to SalesForm,
which is used to retrieve related product from product model. When I
run it, I get an error:
Exception Type: TypeError
Exception Value:__init__() takes exac
On Mar 16, 1:57 pm, "Todd O'Bryan" <[EMAIL PROTECTED]> wrote:
> I guess what I want is some way to create a form with a variable number
> of fields rather than a fixed number.
http://www.djangosnippets.org/snippets/82/
--
Jeff Bauer
Rubicon, Inc.
--~--~-~--~~~---~--
[EMAIL PROTECTED] wrote:
> Hello,
>
> I have a site that offers a bunch of appartments for rent. Each of
> these rentals has a image gallery showing the look&feel of that place.
> My models currently look like this:
>
> class Photo( models.Model ):
> name = models.ImageField( upload_to='rent
On 3/16/07, Ian <[EMAIL PROTECTED]> wrote:
> The purpose of web development frameworks is to make common web
> development tasks easier, or give them to you for free. A forms
> framework which requires custom code for password comparisons does not
> satisfy this fundamental requirement.
While I
Atilla wrote:
> ... If you're using the newforms admin ...
Is there one? The code in django/contrib/admin looks like it's using
oldforms to me. If there's a version based on newforms somewhere I'd
love to take a look :-)
L.
--~--~-~--~~~---~--~~
You received thi
On 3/16/07, Todd O'Bryan <[EMAIL PROTECTED]> wrote:
>
> On Fri, 2007-03-16 at 17:41 +, Rubic wrote:
> > Just use a ChoiceField with a radio or checkbox widget.
> >
> > http://www.djangosnippets.org/snippets/26/
> >
> > --
> > Jeff Bauer
> > Rubicon, Inc.
>
> Sorry, wasn't clear. I know how t
On Fri, 2007-03-16 at 17:41 +, Rubic wrote:
> Just use a ChoiceField with a radio or checkbox widget.
>
> http://www.djangosnippets.org/snippets/26/
>
> --
> Jeff Bauer
> Rubicon, Inc.
Sorry, wasn't clear. I know how to do it if the question has already
been created. My problem is how to
The purpose of web development frameworks is to make common web
development tasks easier, or give them to you for free. A forms
framework which requires custom code for password comparisons does not
satisfy this fundamental requirement.
I've seen the test codes that tell you how to compare multi
Just use a ChoiceField with a radio or checkbox widget.
http://www.djangosnippets.org/snippets/26/
--
Jeff Bauer
Rubicon, Inc.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to thi
In newform, how do I allow a single regexField to accept either a
whole number, or number with decimal places?
Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
Try:
transaction.commit_unless_managed()
I originally found it in the django scripts code (
http://code.djangoproject.com/browser/django/trunk/django/bin/daily_cleanup.py),
and it forces a commit when you're not under transaction management. I never
found any references to it in the documentation
> Hi all. I try to edit user in DJANGO ADMIN, I can see user list but
> when I click on one of them I get Page not found (404).
What URL does your browser show when you get that 404 error?
--~--~-~--~~~---~--~~
You received this message because you are subscribed
The django development server isn't multithreaded by default, and it's
probably having some trouble serving back the files. There were some
hacks/mods on this last a few months back talking about how to change the
dev server so that it was multithreaded and make it a tad more reliable.
I'm afraid
I'm trying to design a form for multiple choice questions:
Question:
Answer A:
Answer B:
Answer C:
Correct Answer:
A
B
C...
Explanation:
The problem is that I don't want to fix the number of possible answers
so tha
On 3/16/07, johnny <[EMAIL PROTECTED]> wrote:
>
> In newform, how do I allow a single regexField to accept either a
> whole number, or number with decimal places?
doesn't r"\d+(\.\d*)?" work?
--
John Lenton ([EMAIL PROTECTED]) -- Random fortune:
The trouble with a lot of self-made men is that t
Thanks Benedict.
I just figured out a way to do what I wanted, and I thought I'd update
this thread for completion.
If you pass a dict to the form wrapper with the form field results,
the FormWrapper will parse the results in as default values ...
new_data = {
'user
Antonio Cangiano is the author of the IBM DB2 tools for Rails and his
team and him are going to do the same for Django and Python. Right now
he's asking for help to collect ideas to do a proper job.
I think it's great having this kind of support for Python and Django.
Here's the blog post:
http
limodou schrieb:
> You can try db_dump.py tool, it's not a web-gui based, but a command line
> tool.
>
> http://www.djangosnippets.org/snippets/14/
Very cool! It seems to work without problems ;)
I made a hack to put it into my web install section:
http://pylucid.net/trac/changeset/930
Hi,
I have the same or similar problem. I'm using update_object to
reproduce the inline editing of a foreignkey join table that works
very well in the admin interface. When editing a publication, I need
to be able to add authors to the publication, who are linked to
publications by an explicit j
dbee schreef:
> I'm trying to output an account form, with the user's values already
> in place. So that if they wish to change any value, they can just
> change the
> I'm using .95 with oldforms, and I can't seem to find anyway of
> outputting a default value with my form. That's a serious prob
Rubic schreef:
> Benedict,
>
> You add a clean_XXX method to your form class,
> where XXX corresponds to the field name you wish
> to validate.
>
> In your clean_XXX method, you return
> self.clean_data['XXX'] if your data validates,
> otherwise raise a ValidationError exception.
>
> I just po
On 3/16/07, Jens Diemer <[EMAIL PROTECTED]> wrote:
>
>
> I would like to backup and restore my django App-Database. This should
> be usable with a Web-GUI.
> I thought fixtures would be well usable for it. But there are some
> problems with this. Look at:
> http://groups.google.com/group/django-us
Benedict,
You add a clean_XXX method to your form class,
where XXX corresponds to the field name you wish
to validate.
In your clean_XXX method, you return
self.clean_data['XXX'] if your data validates,
otherwise raise a ValidationError exception.
I just posted a similar response on this group
I'm trying to output an account form, with the user's values already
in place. So that if they wish to change any value, they can just
change the http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---
I would like to backup and restore my django App-Database. This should
be usable with a Web-GUI.
I thought fixtures would be well usable for it. But there are some
problems with this. Look at:
http://groups.google.com/group/django-users/browse_thread/thread/6a4e9781d08ae815
What is a good/othe
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
TypeError at /test/polls/
a2b_base64() argument 1 must be string or read-only character buffer,
not array.array
>>
>> I use openSuse10.2 x86_64
>>
>> in order to repeat it I just have to activate the builtin
>> django-admin-mod
Hi,
i have a model (using newforms) where i have an image upload field.
Now i'm trying to check the image dimensions amongst other things.
I thought i could do this using validators.
It doesn't seem to call the validator specified in the model though.
How can i validate data?
def validate_image
Generally: I have possibly wrong data in the data base. But i think
django does not help, to find these wrong data.
I made "django-admin dumpdata" and i got this error:
"""
Unable to serialize database: ContentType matching query does not exist.
"""
I can set "--verbosity=2", but i get no more i
You can download now the unofficial Portuguese(pt_PT) translation of
Django in http://mariz.org/downloads/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to d
On 3/15/07, Paul Rauch <[EMAIL PROTECTED]> wrote:
>
> Malcolm Tredinnick schrieb:
> > On Thu, 2007-03-15 at 19:22 +0100, Paul Rauch wrote:
> >> -BEGIN PGP SIGNED MESSAGE-
> >> Hash: SHA1
> >>
> >> Hello,
> >>
> >> I use django with python 2.5.
> >> I already got the same error during tutor
>
> >> number_of_meds = kwargs.pop('number_of_meds', 4)
>
> This is how I optionally passed the number of
> fields I wanted to display in the form. If there's
> no 'number_of_meds' in kwargs, a minimum of 4 fields
> are displayed. The trick is to use kwargs.pop() before
> super is called, or you
> > I realize now that signal do not preserve it (I guess that are run in a
> > different thread, correct?)
>
> What do you mean by "preserve it"? A signal dispatch is just a series of
> function calls. They happen in the same thread as whatever does the
> dispatch.
I mean that I find the u
> If i don't import the loader i get the error:
Amazing you should post this ... I was just about to do the same!
(I just ran across this error tonight, and was typing up a message
to the list)
--
Mike Cuddy ([EMAIL PROTECTED]), Programmer, Baritone, Daddy, Human.
Fen's Ende Software, Redwood C
I used a base.html template and extends it with a String-Template.
Example:
--
from django.template import Template, Context #, loader
my_example_string_template = """
{% extends "example.html" %}
blabla...
"""
c = Context(context)
t = Temp
I'm running into this exact scenario and haven't been able to confirm
that checked encoding is officially supported by XML-RPC but the
request is there nonetheless. Does anyone know of a python solution
that will handle chunked encoding calls properly?
PS: You work at RSTL perhaps?
On Mar 2, 5:4
64 matches
Mail list logo