On Tue, 2007-05-01 at 06:53 +, Bryan Veloso wrote:
> > In fact, that whole thread possibly has some relevance to your problem.
> > Note that the solution in the particular post I've highlighted works on
> > Python 2.3 and up, but if you are using 2.4 or later, Ned Batchelder's
> > post is of m
hi there,
i want to use ajax in newforms library. but when i use the below here:
class RegForm(forms.Form):
personalid = forms.CharField(label='ID',
widget=forms.widgets.TextInput({'onKeydown':
'Element.update("NO_CHECK", " http://mydomain/arrows.gif>");'
...
the html output is
ID, " ch
Julio and James,
Thank you both for your help.
I know that frames could be useful to help solve my problem but...
Let's suppose this:
where you can see two frames( iframes).One Authors ( list of
authors)and the other Descriptions( their replies).
As you can see each frame must consists
Python uses PYTHONPATH instead of PATH. Make sure your using the first.
Chris
El mar, 01-05-2007 a las 01:24 +, whidbey escribi�:
> I dint' use the host's django.
> I make my own django folder in my home path ,It's last trunk 0.96
> ~/dango/django_src
>
> and in my .bash_profile I export my
On 5/1/07, Trilok <[EMAIL PROTECTED]> wrote:
>
> I am creating a new second admin page with features different from the
> existing one and it would save me a lot of time if I could use
> components from the django Admin interface. I don't want to modify the
> existing admin interface. Is there a w
hoamon wrote:
> how can i customize the fields in the newforms, or i walk the wrong
> way ??
What you described is an issue but I want to advice a different
technique that doesn't suffer from this issue and also considered more
robust.
You shouldn't mix your HTML with Javascript, instead you s
hi all,
I noticed that recently has been added InterityError as a common
exception
for all db (django.db.IntegrityError), so I wanted to make my view
aware
of that, but I'm uncertain on how to accomplish this.
I added a snippet like this one, in a sort of generic view:
if form.is_vali
OK, I understand the problem to be this: you have a user table and a
team table, and the user table has a foreignkey field that relates
back to team. Assuming a user table named USERS and a team table
named TEAM, in your view, you would do a lookup like this:
team_members =
TEAM.objects.get(team
Dear All,
I'm having problems with the Many-to-Many relations in my model.
I've got a list of questions, each of which has a number of marks
associated with it. The marks are in another table in the DB. I've
modelled it as Many-to-Many because it seems that each question can
have many marks, and
I've encountered a problem whereby my searches in the database are not
distinguishing between upper and lower case.
Having read in other posts about MySQL being case insensitive by
default, I have tried using the __exact method to force exact
matching, however, this still finds the alternative ca
Honza Král wrote:
>> Is it possible to have css classes attached to newforms widgets? I would
>> like to be able to distinguish between fx. checkboxes, radio buttons,
>> submit buttons, text fields (which are all 's).
> well, you can pass args={'class' : 'whatever'} to the widget's __init__()
> or
> Having read in other posts about MySQL being case insensitive by
> default, I have tried using the __exact method to force exact
> matching, however, this still finds the alternative case version in
> the table. Note there are no duplicates in the table on this field.
>
> Example:
> x=Datatabl
I have a small gallery application with unit tests. I have my
fixtures in gallery/fixtures/test_data.json. When I try to run the
tests, I get the following error:
Problem installing fixture '/home/vfoley/django/copieplus/../copieplus/
gallery/fixtures/test_data.json': Gallery matching query doe
On 5/1/07, MattW <[EMAIL PROTECTED]> wrote:
>
> I'm having problems with the Many-to-Many relations in my model.
You'll need to include the model.py code, so people can see what is going
on.
--~--~-~--~~~---~--~~
You received this message because you are subscribe
Just found it, it probably won't work long...
http://tinyurl.com/2en7ge
it looks like the vid is from before her pregnancy, from what i can
tell her body is definitely in shape.
__
and some pictures
http://data.blogg.de/18079/images/britney.jpg
http://www.the-planets.com/br
I am on a mac using the svn version, not sure which one though, I
tracked it down to that same portion of the code, but did not have a
chance to write a patch for it. I let it sit for a couple of days,
came back and refactored the whole application, and it ended up
working. I am not sure what c
On May 1, 5:47 am, Pythoni <[EMAIL PROTECTED]> wrote:
> Julio and James,
> Thank you both for your help.
> I know that frames could be useful to help solve my problem but...
>
> Let's suppose this:
>
> height="30"style="height:10.8em" marginwidth="0" marginheight="0">
>
>
> height="60"style="he
Try using the related_name option in you manytomany feilds as it might
clear up some of your tables. I agree however posting your models.py
will quickly clear this problem up.
On May 1, 9:46 am, MattW <[EMAIL PROTECTED]> wrote:
> Dear All,
>
> I'm having problems with the Many-to-Many relations i
On Apr 29, 6:37 pm, kamil <[EMAIL PROTECTED]> wrote:
> Hi Michael. You are right there was module named utils (coincidentally
> same name as django module) in the nesh thumbnail app.
> Problem resolved :)
> Thank You Very Much for the time You dedicate me.
> I feel in debt with U and I feel real
On Apr 30, 7:21 pm, Mike H <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm sure this has been discussed elsewhere, but common terms like
> "using" "django" "models" and "scripts" make it hard to find! ;)
>
> I've written a nice multi-user mp3 jukebox for our office, it lets users
> add tracks to the
On 5/1/07, Michael K <[EMAIL PROTECTED]> wrote:
>
> Joe's post is on the money. You shouldn't need to use the shell at
> all, but can directly import django's pieces directly in another
> script (such as your streamer.py).
While it is entirely possible to use Django modules in scripts, you may
e
Maybe I'm missing something, but there's nothing specific in this example to
Django - you would reference a link from within any page the same way as
plain ole HTML.
and then link to it with an Jump to foo.
-joe
On 5/1/07, Pythoni <[EMAIL PROTECTED]> wrote:
>
>
> Let's suppose I have, in o
Story archive
{% for date in date_list %}
{{ date.year }}
{% endfor %}
Not sure how to do this
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
Michael,
Thank you for your reply.
I agree the solution with DIVs instead of IFRAMEs would be nice.
But it needs AJAX. and you say a little AJAX.
Can you give me an idea how to use that little AJAX together with my
described problem?
Thank you
L.
You say
> The best way (in my opinion) to do this
On May 1, 12:38 pm, Pythoni <[EMAIL PROTECTED]> wrote:
> Michael,
> Thank you for your reply.
> I agree the solution with DIVs instead of IFRAMEs would be nice.
> But it needs AJAX. and you say a little AJAX.
> Can you give me an idea how to use that little AJAX together with my
> described proble
I've got a model that includes FloatFields as well as IntegerFields and
CharFields.
When I access the CharFields, I get strings. When I access the
IntegerFields, I get integers, but when I want to use the Floatfields, I
always have to add float() to convert the string to an actual float. Not
that
How can a get_or_create cause an integrity constraint error?
--Brandon
File "/usr/lib/python2.4/site-packages/django/db/models/manager.py", line 76,
in get_or_create
return self.get_query_set().get_or_create(**kwargs)
File "/usr/lib/python2.4/site-packages/django/db/models/query.py", l
Hi,
I'd like to understand how to manage newforms save when coping with
a form
that should edit both heading info and details. As an example let's
think
at an invoice splitted between invoice_headings/invoice_detail in a
way similar to the following:
class InvoiceHeading(Model):
c
On 5/1/07, Brandon Low <[EMAIL PROTECTED]> wrote:
>
> How can a get_or_create cause an integrity constraint error?
The error is on key 2, which is an additional unique index you
presumably have in your model. get_or_create should not cause
integrity errors on the primary key, but that's not what'
On 5/1/07, Brandon Low <[EMAIL PROTECTED]> wrote:
>
> How can a get_or_create cause an integrity constraint error?
Also... It's hard to see exactly what's going on because the code in
the traceback is using **kwargs. If you use get() or get_or_create(),
it's looking for a match on all the paramet
On 5/1/07, Chris Brand <[EMAIL PROTECTED]> wrote:
>
> I've got a model that includes FloatFields as well as IntegerFields and
> CharFields.
> When I access the CharFields, I get strings. When I access the
> IntegerFields, I get integers, but when I want to use the Floatfields, I
> always have to a
Hi,
I use something similar to this. What I did was override the __init__
to take extra arguments with the instances it's editing and store them
for future use.
so it would look something like this:
class MyForm(forms.Form):
def __init__(self, objects=[], *args, **kwargs):
super(Form, self).
I've got the solution, you can download it here:
http://purplesquirrelgroup.com/order_list.tar.gz
Here's the readme:
To use these models you will want to do the following:
For your Collection class:
from order_list.models import Order_List
from django.db import models
class Collection( Order_
I think you want something like
{% for date in date_list|dictsort:"year" %}
On May 1, 11:28 am, Frank Peterson <[EMAIL PROTECTED]> wrote:
> Story archive
>
> {% for date in date_list %}
> {{ date.year }}
> {% endfor %}
>
>
> Not sure how to do this
--~--~-~--~~
Except I wouldn't use "name", just use an ID... instead of Foo or whatever, just say Foo.
Same thing, just cleaner.
On May 1, 11:08 am, "Joseph Heck" <[EMAIL PROTECTED]> wrote:
> Maybe I'm missing something, but there's nothing specific in this example to
> Django - you would reference a link fro
my model is very simple:
class Referrer(models.Model):
url = models.CharField(maxlength=255, unique=True)
here is the relevent view code:
referrer = request.META.get('HTTP_REFERER','-')
r, r_new = Referrer.objects.get_or_create(url=referrer)
thanks for your replies!
--Brandon
On
> What version of Python are you using? I *think* FloatFields are
> returned as Python Decimal objects, which don't exist before
> Python-2.4, which means you would then get a string from MySQLdb. We
> might need a fix for Django on Python-2.3 to work around this.
"python -V" reports "Python 2.4.
I'm using sqllite as my database. I've added a Image Field to one of
my tables. I am wondering how i get my database to register this new
column. I thought running the command 'python manage.py syncdb' would
update my database. However, after I do that my admin errors out
saying ' no such colu
On 5/1/07, Brandon Low <[EMAIL PROTECTED]> wrote:
>
> my model is very simple:
>
> class Referrer(models.Model):
> url = models.CharField(maxlength=255, unique=True)
>
> here is the relevent view code:
>
> referrer = request.META.get('HTTP_REFERER','-')
> r, r_new = Referrer.objects.ge
On 5/1/07, gsmith <[EMAIL PROTECTED]> wrote:
>
> I'm using sqllite as my database. I've added a Image Field to one of
> my tables. I am wondering how i get my database to register this new
> column. I thought running the command 'python manage.py syncdb' would
> update my database. However, aft
If it's an existing table, the easiest thing is to go directly to the
db and create the column manually.
On May 1, 4:09 pm, gsmith <[EMAIL PROTECTED]> wrote:
> I'm using sqllite as my database. I've added a Image Field to one of
> my tables. I am wondering how i get my database to register this
Hello,
I have a class Object(models.Model) which contains model.BooleanFields.
I'm trying to add rows to it, like this:
o = Object()
o.a1 = 'a1'
o.a2 = 'a2'
o.save()
I don't set boolean values here. save() results in the following
ProgrammingError:
ERROR: invalid input syntax for type boolean:
On 5/1/07, Baurzhan Ismagulov <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I have a class Object(models.Model) which contains model.BooleanFields.
> I'm trying to add rows to it, like this:
>
> o = Object()
> o.a1 = 'a1'
> o.a2 = 'a2'
> o.save()
>
> I don't set boolean values here. save() results in t
On Tue, May 01, 2007 at 11:58:44PM +0200, Honza Král wrote:
> >Boolean fields have the value ''. Should I initialize all the fields to
> >false either in code, or in the constructor? I would expect that Django
> >does this for me.
>
> if you want that you have to supply default value via default
Can't seem to get django and postgres to hook up. MySQL or sqlite3
work fine. postgres seems to work fine with SQLAlchemy, so I'm
thinking psycopg2-2.0.6b1.win32-py2.4-pg8.2.1 installation is OK. Is
the problem obvious from the following:
C:\django\testproject>manage.py syncdb
Traceback (most
Hello,
I have a Zope background and new to Django and mainly interested how
people build large websites with it. Imagine a portal with many kinds
of sections: blogs, forums, articles, faqs, etc.
Building such site on Zope platform is more or less straightforward.
As underlying storage is an objec
So initially, when you said that, I thought to myself, "Of course, how
could I be so dumb" but then I did:
>>> from django.db import connection;
>>> cursor = connection.cursor()
>>> cursor.execute("select @@autocommit;")
1L
>>> row=cursor.fetchone()
>>> row
(0L,)
at the shell and it looks like a
Ugh, why would autocommit be set to 1 in the site but 0 in the shell???
--Brandon
On 2007-05-01 (Tue) at 18:13:55 -0500, Brandon Low wrote:
>
> So initially, when you said that, I thought to myself, "Of course, how
> could I be so dumb" but then I did:
>
> >>> from django.db import connection;
On 5/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Problem installing fixture '/home/vfoley/django/copieplus/../copieplus/
> gallery/fixtures/test_data.json': Gallery matching query does not
> exist.
>
> Does anyone know what that means? I have other applications using
> fixtures/test_data
Although I've successfully used the multi-db branch experimentally, it
looks to be getting more and more out of date with the django trunk.
I do completely understand the desire of the django devs to ensure a
solid commitment to a branch and also that there have not been enough
requests to drive i
> they're different objects. Very simple. If you need to build a sitemap
> or menu or breadcrumbs, you can travel the objects tree and build it.
> You can attach a new page (section) with arbitrary functionality to
> any node of the site tree with no effort.
>
> On the other hand, Django uses ORM
On 02-May-07, at 4:17 AM, Eugene Morozov wrote:
> I don't want to start Zope vs Django flame. I just want to know what
> approaches people use for building large sites on Django.
if you want CMS with all types of thingies plugged in - zope/plone is
for you. If you want flexibility - especiall
I'm using the multi-db branch actively on a large project I have
found a few bugs, but am uncertain if they are specific to the branch
or if are also found in the trunk, as I haven't ever installed the
trunk.
I would like to try and take on maintenance of the branch...but am
unsure of how to
my server is fastcgi. and i depoy my django project on it.
when i start the django simple server . the result is true
and when i start the fastcgi the result is
Request URL:
http://
Exception Type:
TypeError
Exception Value:
unpack non-sequence
Exception Location:
/usr/local/lib/python
I am confused about the following:
If I get a previous saved record, transform it into a form instance
and then create a form out of it, the data is not valid nor bound (see
below). However, if I print out the form, all fields are populated
correctly.
Am I missing a step?
Thanks, Marcel
>>> d =
oops, did not use form_for_instance(d).
However, is_valid is not telling me that the form is correct.
What am I doing wrong?
>>> d = Person.objects.get(id=1)
>>> p = forms.models.form_for_instance(d)
>>> f=p()
>>> print f
Name:
Country:
-
USA
Netherlands
Addr1:
Addr2:
Addr3:
Addr4:
O
On 5/2/07, Brian Luft <[EMAIL PROTECTED]> wrote:
>
> Although I've successfully used the multi-db branch experimentally, it
> looks to be getting more and more out of date with the django trunk.
...
> Just for the sake of lively discussion, I would go so far as to say
> that only being able to acc
On 5/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I'm using the multi-db branch actively on a large project I have
> found a few bugs, but am uncertain if they are specific to the branch
> or if are also found in the trunk, as I haven't ever installed the
> trunk.
>
> I would like to
On 5/2/07, Kula <[EMAIL PROTECTED]> wrote:
>
> TEMPLATE_DIRS = (
> # Put strings here, like "/home/html/django_templates".
> # Always use forward slashes, even on Windows.
> '/var/www/virtual/kula.51boo.com/htdocs/web/template/'
> )
Looks like this might be your problem. Sequences wit
On 5/1/07, Eugene Morozov <[EMAIL PROTECTED]> wrote:
> Building such site on Zope platform is more or less straightforward.
> As underlying storage is an object oriented database, every page is an
> object.
...snip...
> On the other hand, Django uses ORM and this means that each site
> section m
On Tue, 2007-05-01 at 05:42 -0700, sandro.dentella wrote:
> hi all,
>
> I noticed that recently has been added InterityError as a common
> exception
> for all db (django.db.IntegrityError), so I wanted to make my view
> aware
> of that, but I'm uncertain on how to accomplish this.
>
> I
On Tue, 2007-05-01 at 16:28 -0400, Andy Dustman wrote:
> On 5/1/07, Chris Brand <[EMAIL PROTECTED]> wrote:
> >
> > I've got a model that includes FloatFields as well as IntegerFields and
> > CharFields.
> > When I access the CharFields, I get strings. When I access the
> > IntegerFields, I get int
thanks for your help.
i changed the
'/var/www/virtual/kula.51boo.com/htdocs/web/template/' to the './template'
but the question is also.
the problem puzzled me 2 days ..
Best Regards
Kula
On 5/2/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
>
>
> On 5/2/07, Kula <[EMAIL PROTECTED]> wrote:
>
Hi Russ,
Thanks for the detailed response and I agree with all of your
sentiments. You're doing a great job and you are a tremendous asset
to this list. Keep up the great work.
Having been a committer to other framework projects, I understand the
constant pressure to integrate feature X,Y, and
On Tue, 2007-05-01 at 21:21 -0700, maeck wrote:
> oops, did not use form_for_instance(d).
> However, is_valid is not telling me that the form is correct.
> What am I doing wrong?
Well, if f.bound is True and f.is_valid() is false, f.errors will
contain the validation errors. That would be a good
On 5/2/07, Kula <[EMAIL PROTECTED]> wrote:
> thanks for your help.
> i changed the
> '/var/www/virtual/kula.51boo.com/htdocs/web/template/' to
> the './template'
> but the question is also.
> the problem puzzled me 2 days ..
Perhaps I didn't explain well enough. The problem isn't the directory
na
i am so happy to see your reply .
and i am not good at english so i have a mistake to understand your
sentence.
i try to use 'python django.fcgi' to lunch my django application.
and i try
' /var/www/virtual/kula.51boo.com/htdocs/web/template/'
'/var/www/virtual/kula.51boo.com/htdocs/web/template
67 matches
Mail list logo