Thanks Russ!
How I create a combobox in ModelForm contains data from other database?
for exemple:
class Client(models.Model):
group = models.IntegerField() # this contains a id from another DB
...
class ClientForm(ModelForm):
group = ModelChoiceField(queryset=???)
class Meta:
Hi!
I've been pulling my hair out all day...
I have a Django 1.1.x project running under Twisted Trunk (27392)
using WSGI.
I've been having mega-problems with forms not showing up in Django's
REQUEST object so I decided to nail it down to the simplest case. I
though
On Oct 30, 2009, at 10:00 PM, Mike Ramirez wrote:
> On Friday 30 October 2009 18:44:02 sstein...@gmail.com wrote:
>> Normally validation is the first thing I check but the w3c validator
>> can't validate localhost addresses so I had to use the old "cut &
>> paste" method to submit my HTML.
>
> I
It actually turns out that there is appears to be a bug serving the
application under Twisted where normal forms are not being properly
reflected in Django's REQUEST object.
When I 'solved' the problem, I was running under the development
server (since it nicely restarts itself on code chan
On Fri, Oct 30, 2009 at 7:00 PM, Mike Ramirez wrote:
> On Friday 30 October 2009 18:44:02 sstein...@gmail.com wrote:
>> Normally validation is the first thing I check but the w3c validator
>> can't validate localhost addresses so I had to use the old "cut &
>> past" method to submit my HTML.
>>
>
On Friday 30 October 2009 18:44:02 sstein...@gmail.com wrote:
> Normally validation is the first thing I check but the w3c validator
> can't validate localhost addresses so I had to use the old "cut &
> past" method to submit my HTML.
>
> Thanks,
>
> S
>
If it's important to you, you can instal
On Oct 30, 2009, at 8:58 PM, Karen Tracey wrote:
> On Fri, Oct 30, 2009 at 8:30 PM, ssteinerX
> wrote:
>
> Hi!
> I'm trying to submit a simple:
>
> Subject: type="text" name="subject" maxlength="100" />
>
>
>
> type form but when I submit, it's nowhere to be found in the REQUEST
> object (
On Sat, Oct 31, 2009 at 12:34 AM, Gustavo Henrique wrote:
>
> Hi!
> I have a project using mysql and it have to access a firebird BD for
> get data.
> What the better way to use 2 databases in django? What you recommend
> me to do? Maybe SQLAlchemy?
Right now, Django doesn't have an easily acces
On Fri, Oct 30, 2009 at 8:30 PM, ssteinerX wrote:
>
> Hi!
> I'm trying to submit a simple:
>
> Subject: type="text" name="subject" maxlength="100" />
>
>
>
> type form but when I submit, it's nowhere to be found in the REQUEST
> object (GET or POST) that I've been able to find.
>
> Where do
Hi Steve,
It should be found in request.REQUEST['foo']
Try that
Sumanth
On Oct 30, 5:30 pm, ssteinerX wrote:
> Hi!
> I'm trying to submit a simple:
>
> Subject: type="text" name="subject" maxlength="100" />
>
>
>
> type form but when I submit, it's nowhere to be found in the REQUEST
>
Hi!
I'm trying to submit a simple:
Subject:
type form but when I submit, it's nowhere to be found in the REQUEST
object (GET or POST) that I've been able to find.
Where does it go?
I have no problems with regular Django forms, but this is a legacy
app I'm moving and I don't want to
Quiet annoying!
On Fri, Oct 30, 2009 at 3:51 AM, Russell Keith-Magee wrote:
>
> On Fri, Oct 30, 2009 at 6:18 PM, Crispin Wellington
> wrote:
> >
> > In my book, posting this kind of thing to a mailing list not about
> > religion constitutes a one way ticket to hell.
>
> FYI - django-users is a
This problem turned out to be an application issue. I am using GeoDjango and
calling buffer() with a negative value which caused problems on certain
polygons for the underlying GEOS library. Thanks to everyone who responded
off list.
--
--Leo
On Fri, Oct 30, 2009 at 8:48 AM, Leo Shklovskii wrote
On Fri, Oct 30, 2009 at 2:58 PM, Anthony Simonelli
wrote:
> On Fri, Oct 30, 2009 at 10:58 AM, Tom Evans wrote:
>> When you iterate through the fieldset, you should be iterating through form
>> instances. Because they are forms from a ModelFormSet, they will be
>> ModelForm instances, and so will
On Fri, Oct 30, 2009 at 4:05 PM, TiNo wrote:
> SQL's GROUP BY is made for this isn't it?
no, it's not.
SQL's GROUP BY discards 'individual' rows off the result, showing only
'grouping' rows.
--
Javier
--~--~-~--~~~---~--~~
You received this message because you
On Fri, Oct 30, 2009 at 4:36 PM, Preston Holmes wrote:
>
>
>
> On Oct 30, 12:00 pm, Bill Freeman wrote:
>> Yet another option is to write a widget that subclasses the existing
>> one, and adds
>> disabled='disabled' to the dictionary that will be used to populate
>> the attributes
>> (usually th
FIXED!
Found the problem from this post:
http://groups.google.com/group/django-users/browse_thread/thread/7ff96003bed5ca5c/6950d58ae914d1d4?lnk=gst&q=apache+javascript#6950d58ae914d1d4
Summary:
In my apache config, I was using ,
which matches more than anticipated because it wasn't anchored to th
On Fri, Oct 30, 2009 at 15:05, Tom Evans wrote:
> SQL cant do this, so do it in python...
SQL's GROUP BY is made for this isn't it?
And it is also possible in django. I guess this is what you need:
http://stackoverflow.com/questions/327807/django-equivalent-for-count-and-group-by
>
>
> item
On Oct 30, 12:00 pm, Bill Freeman wrote:
> Yet another option is to write a widget that subclasses the existing
> one, and adds
> disabled='disabled' to the dictionary that will be used to populate
> the attributes
> (usually the 'attrs' argument, I think, and you will have to handle
> the poss
On Fri, Oct 30, 2009 at 10:58 AM, Tom Evans wrote:
> When you iterate through the fieldset, you should be iterating through form
> instances. Because they are forms from a ModelFormSet, they will be
> ModelForm instances, and so will have an instance attribute that you can use
> to output the fie
Yet another option is to write a widget that subclasses the existing
one, and adds
disabled='disabled' to the dictionary that will be used to populate
the attributes
(usually the 'attrs' argument, I think, and you will have to handle
the possibility
that you will be passed None instead of a dict).
It works for me.
Maybe you're not getting to those statements? Another module of the same name
on the path being imported instead? When I stick it in a view
function and it doesn't
hit it's usually because I've botched urls.py.
Try putting them at top level in the module, in which case it shou
Hi,
I have seen a peculiar behavior while uploading files using flash
uploader. (fancy uploader).
When I use following function for uploading files it always gives me
error in Flash saying :
"Error caused a send or load operation to fail (Error #2038)"
def upload_notes(request):
ret = {
Hi,
i've been trying to use pdb inside my django code, but it never
breaks the program flow. I insert this into my code:
import pdb
pdb.set_trace()
but it just continues execution - is there something i need to be
doing?
thanks!
--~--~-~--~~~---~--~~
You rece
Hi,
I'd like to write some code, probably middleware, that look at various
types of HTML in templates and prepends a setting from settings.py.
For example, I'd like to pickup all .js, .css, .jpg, .png, .gif - and
stick a custom setting from settings.py on the front - effectively a
path.
Ideally
On Fri, 2009-10-30 at 14:09 +0100, Thomas Guettler wrote:
>
>
> Adam Nelson wrote:
> > All,
> >
> > In case people hadn't heard, DARPA just announced what I think is the
> > coolest competition ever:
> >
> > http://networkchallenge.darpa.mil/
> >
> > On December 5, DARPA will raise 10 red wea
Hi!
I have a project using mysql and it have to access a firebird BD for
get data.
What the better way to use 2 databases in django? What you recommend
me to do? Maybe SQLAlchemy?
Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
I have a fedora 9 linux web server box. I compiled php and apache. It
has the python 2.5.1 rpm's that came with fedora 9.
Now I have to support django on my web server. I compiled mod_python
and installed the django rpm's that come with fedora 9 ( version 1.0.2
final ).
I followed the tutorial
h
When you iterate through the fieldset, you should be iterating through form
instances. Because they are forms from a ModelFormSet, they will be
ModelForm instances, and so will have an instance attribute that you can use
to output the fields you don't want in the form. You can then restrict the
fie
Hello,
I implemented the comments module. When all fields properly field and
after a post everything is fine. Still on the same page. But when I
don't enter all fields I get another page with the error messages not
in the current page.
http://emberapp.com/niels390/images/comments-form-not-in-or
On Oct 30, 5:47 am, Anthony Simonelli wrote:
> Is there any way to display the fields as text rather than as input fields?
My suggestion would be to write your own widget that simply renders as
text, and make all the uneditable fields use that widget. Have a look
in the django code (django/form
I've got a strange problem that I've been trying to figure out over the past
few days with apache suddenly taking up 100% of memory and swap, effectively
killing the server.
The setup is:
Ubuntu Jaunty (fully updated)
nginx/0.6.35 serving static and proxying to:
Apache/2.2.11 (Ubuntu)
mod_wsgi
Pyt
I didn't realise there was a "settings" option for syncdb - it works
beautifully! I now have multi site with multiple databases and one
application installation! Cool...
On Oct 30, 11:29 am, Stodge wrote:
> Oops - this might be what I need:
>
> SetEnv DJANGO_SETTINGS_MODULE mysite.other_settings
Oops - this might be what I need:
SetEnv DJANGO_SETTINGS_MODULE mysite.other_settings
So I created my new settings file that points to a different database
and made a new Apache alias to the new virtual Django site that I want
(so /django/fred instead of just /django). But how do I sync this DB
Sorry, forgot to say that is with mod_python.
On Oct 30, 10:48 am, Stodge wrote:
> Just wondering whether I could write a middleware that parsed
> request.path, say:
>
> /django/site1/index
>
> extracted and removed the site name as "site1" and switched the
> settings on the fly to use settings_
Just wondering whether I could write a middleware that parsed
request.path, say:
/django/site1/index
extracted and removed the site name as "site1" and switched the
settings on the fly to use settings_site1.py instead.
settings_site1.py would use DB named "site1_db".
Then it would process the r
Hello group, first post for me!
Anyone know the equivalent of checked_by_default for the
CheckboxSelectMultiple widget? I'm using it like so:
myinput = forms.MultipleChoiceField(
choices=((OPTIONONE, 'option1'),(OPTIONTWO, 'option2')),
required=False,
widget=forms.Checkbo
small correction
On Fri, Oct 30, 2009 at 7:41 PM, Subramanyam wrote:
> Hi
>
> Firstly you can try using the following auth-backend
> http://www.djangosnippets.org/snippets/74/
>
> secondly
> while rendering the signup form to the user
> you can write a clean method in your signnup form like
>
>
Hi
Firstly you can try using the following auth-backend
http://www.djangosnippets.org/snippets/74/
secondly
while rendering the signup form to the user
you can write a clean method in your signnup form like
def clean_email(self):
try:
user=User.objects.get(email__exact=self.
SQL cant do this, so do it in python...
items = ItemOwned.objects.filter(user=id)
data = { }
for item in items:
cur_set = data.get(item.setId, {'setId': item.setId, 'items':[]})
cur_set['items'].append({'id': item.id, })
data[item.setId] = cur_set
return HttpResponse(content=simplejson.dumps
Hi,
The unique problem is username = email.
You could create auth backend for login with email but email != username
I use:
http://code.google.com/p/django-profile/
In django-profile login is with username and email is opcional...
But i add email auth backend and user can login with your email
Adam Nelson wrote:
> All,
>
> In case people hadn't heard, DARPA just announced what I think is the
> coolest competition ever:
>
> http://networkchallenge.darpa.mil/
>
> On December 5, DARPA will raise 10 red weather balloons somewhere in
> the US. The first person to get the location of al
Hi,
I am facing problem in using Fancyuploader
http://digitarald.de/project/fancyupload/
along with django.
The fancy uploader is working fine with PHP backend but when it is
coming with django its throwing error.
Upload failed: Error caused a send or load operation to fail (Error
#2038)
Has a
Hi,
I have a middleware that checks if URLs are broken.
I discovered that request.get_full_path() removes double slashes. Unfortunately
REQUEST_URI is optional. For example, it is not set by the test client
of django.
Is there a way to get the real URL, like seen by the user in the browser,
wit
Any ideas anyone?
I'm completely stumped ...
On Oct 30, 12:59 pm, The Danny Bos wrote:
> If helpful, here's the table structure.
>
> class ItemOwned(models.Model):
> user = models.ForeignKey(User)
> item = models.ForeignKey(Item)
>
> class Item(models.Model):
> set = m
On Fri, Oct 30, 2009 at 6:18 PM, Crispin Wellington
wrote:
>
> In my book, posting this kind of thing to a mailing list not about
> religion constitutes a one way ticket to hell.
FYI - django-users is a moderated mailing list, but Google Groups is
currently suffering from a publicized exploit (o
On Fri, Oct 30, 2009 at 6:03 PM, Continuation wrote:
>
> I'm new to Django. Having a great time learning from the doc.
>
> Normally the doc explains the topics in hand very clearly. But on 1
> subject I'm still confused after going over the doc: URL Namespaces.
>
> Can someone explain to me what
In my book, posting this kind of thing to a mailing list not about
religion constitutes a one way ticket to hell.
Crispin Wellington
On Fri, 2009-10-30 at 15:19 +0530, vivian gonsalves wrote:
> My dear children, I write this to you so that you will not sin. But if
> anybody does sin, we have on
On Oct 29, 9:04 pm, Daniel Roseman wrote:
> On Oct 29, 5:32 pm, Marco wrote:
>
>
>
> > Hi all,
>
> > I going a little bit crazy that's why I'm posting here ...
>
> > I have a view :
>
> > def index(request):
> > request.session['hello'] = 'world !!!'
> > print "hello!!!"
> > return re
I'm new to Django. Having a great time learning from the doc.
Normally the doc explains the topics in hand very clearly. But on 1
subject I'm still confused after going over the doc: URL Namespaces.
Can someone explain to me what URL Namespaces is for and how does it
work? Any external articles
My dear children, I write this to you so that you will not sin. But if
anybody does sin, we have one who speaks to the Father in our defense—Jesus
Christ, the Righteous One. 2 He is the atoning sacrifice for our sins, and
not only for ours but also for the sins of the whole world. 1 John 2:1-2
--~
On 29 oct, 18:33, Daniel Roseman wrote:
> On Oct 29, 4:42 pm, bruno desthuilliers
> wrote:
> > (FWIW and IIRC, the appropriate english term is 'Customer' - please
> > someone correct me if I'm wrong)
>
> OK... the French word 'client' maps to both 'client' and 'customer'. A
> lawyer, doctor,
On 29 oct, 17:51, Ross wrote:
> For which cases would a user wish to write their own views rather than
> using generic views?
I'd rather formulate this the other way round : for which cases would
you use generic views rather than your own ? And the answer is
obvious : whenever your view ends u
On 29 oct, 23:49, Andew Gee wrote:
> Hi,
>
> I have the following models
>
> class Person(models.Model):
> name = models.CharField(max_length=100)
>
> class Employee(Person):
> job = model.Charfield(max_length=200)
>
> class PhoneNumber(models.Model):
> person = mo
On Thursday 29 October 2009 22:33:27 Brett wrote:
> Hey all, I'm writing a small internal website for a lab, trying to
> create a system to organize our various genes/proteins etc. Since we
> only use a small number of bacteria and strains, I wanted to offer the
> user a series of drop boxes - one
Anyone have any ideas why this is broken or thoughts on where to
troubleshoot further?
I tend to assume something this basic has to user error, but I can't
find any reason why the calendar and time javascript selection buttons
are missing from my admin pages for the datetime fields. I've
verifie
Hey all, I'm writing a small internal website for a lab, trying to
create a system to organize our various genes/proteins etc. Since we
only use a small number of bacteria and strains, I wanted to offer the
user a series of drop boxes - one for the species, another for the
strain, etc. But what
57 matches
Mail list logo