Thanks for your replies.
Just to avoid any doubt, I'm using __unicode__ instead of __str__ and
I'm using the latest development version of django (post unicode
merge).
> What is most important to know is (a) what is the data that it is
> trying to render (both type and content).
It's trying to
On Sun, 2007-08-19 at 00:27 -0700, cesco wrote:
> Thanks for your replies.
>
> Just to avoid any doubt, I'm using __unicode__ instead of __str__ and
> I'm using the latest development version of django (post unicode
> merge).
>
> > What is most important to know is (a) what is the data that it i
I am trying to setup django with mysql, After installing django and
mysql I am trying to set up mysql-python.
So I give the command
$ easy_install MySQL-python
And am getting a ton of errors.
On the page http://www.djangobook.com/en/beta/chapter02/, under
comments for mysql it says,
"Don't forget
On Aug 19, 1:29 am, Thejaswi Puthraya <[EMAIL PROTECTED]>
wrote:
> > I'm using mochikit
>
> Try,
>
> onclick="$('button_id').disabled=true;"
>
> It is 'disabled' and not 'disable'.
> Check out button properties
> athttp://www.w3schools.com/htmldom/dom_obj_button.asp
> According the W3Schools...
> Thanks a bunch, but would that go into the markup or into the
> comments.js file? I'm a js newb (really bad one). I'm guessing into
> the js file, the submit button doesn't have an id. Here is my current
> comments.js filehttp://dpaste.com/17243/
It would go into your template and not into your
On Aug 19, 12:52 pm, shabda <[EMAIL PROTECTED]> wrote:
> I am trying to setup django with mysql, After installing django and
> mysql I am trying to set up mysql-python.
> So I give the command
> $ easy_install MySQL-python
> And am getting a ton of errors.
> On the pagehttp://www.djangobook.com/en
Thanks a lot Malcolm, I think we are getting there:-)
> So, have a look at the debug screen and click on the "local variables"
> link just below this last line in the extended traceback. What is "s"
> here (in particular, it would be good know what type(s) is)? Also, what
> is the value of 'encod
On Aug 19, 1:16 pm, shabda <[EMAIL PROTECTED]> wrote:
> But even that is not helping. I am on a centOS box, with python
> 2.3.4.
Since you are on CentOS and yum works...use yum to install python-
devel,mysql-devel,zlib-devel,openssl-devel
and then try compiling MySQL-python...I believe it shou
Hi guys,
we created some RSS feeds from our website using the django
syndication framework and things are working fine from firefox! And we
want the same functionality to be available in other browsers,
specially Internet explorer. We checked several addons for IE but
still couldnt find anything
Trying the solution given at
http://mail.python.org/pipermail/pythonmac-sig/2003-February/007223.html
But even that is not helping. I am on a centOS box, with python
2.3.4.
Tried the following things,
1.
Added to setup.py
thread_safe_library = NO
(NameError: name 'NO' is not defined)
removed tha
Yes the problem was with python-devel. After installing all the
depndebcies, it went through fine.
On Aug 19, 1:20 pm, Thejaswi Puthraya <[EMAIL PROTECTED]>
wrote:
> On Aug 19, 1:16 pm, shabda <[EMAIL PROTECTED]> wrote:
>
> > But even that is not helping. I am on a centOS box, with python
> > 2.3
On Sun, 2007-08-19 at 08:19 +, cesco wrote:
> Thanks a lot Malcolm, I think we are getting there:-)
>
> > So, have a look at the debug screen and click on the "local variables"
> > link just below this last line in the extended traceback. What is "s"
> > here (in particular, it would be good
I'm having some trouble with time zones on my production machine (debian,
apache prefork with mod_python). On Windows, everything works as expected.
I'm running the trunk from maybe two weeks ago.
Basically, I have TIME_ZONE = 'GMT+1', but while datetime.datetime.today()
in a vanilla python shell
On Sun, 2007-08-19 at 11:15 +0200, Michael Elsdoerfer wrote:
> I'm having some trouble with time zones on my production machine (debian,
> apache prefork with mod_python). On Windows, everything works as expected.
> I'm running the trunk from maybe two weeks ago.
More accurately, on Windows, Djan
On Sun, 2007-08-19 at 19:54 +1000, Malcolm Tredinnick wrote:
[...]
> So, either use something like "CET-2" or use the more descriptive names.
> These names used to be in the PostgreSQL documentation, but I just
> noticed that they have been removed in the latest version. So check a
> slightly olde
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
> If my site is under /var/www/html/python, with the settings file as /
> var/www/html/python/foo/settings.py should I write,
> SetEnv DJANGO_SETTINGS_MODULE foo.settings
> (or) SetEnv DJANGO_SETTINGS_MODULE python.foo.settings
Python imports stuff ba
Hello!
I have simple class with ImageField, but cann't add any object:
class Book(models.Model):
name = models.CharField(_('Book Title'), maxlength=200)
book_number = models.IntegerField()
image = models.ImageField(upload_to='%Y/%m/%d/', core=True,
blank
I'm getting an escaped double quotation mark (", rendered as '%22') at
the end of some stuff that I'm using to reference an anchor on the
same page. This isn't a problem in templates, since the links and
corresponding anchors are generated. But if I want to enter a link in,
say, a TextField to one
I am trying do design a iddy biddy site that will replace a site that is only
about 8 static pages. I want to make it wiki-ish, so the 'site admin' can
tweak
things now and then, and it needs pictures. so sort of a hybrid between a wiki
and a gallery.
I figure I need models.FileField() but
Hi,
On 19 août, 19:07, Drasty <[EMAIL PROTECTED]> wrote:
> class Thing(models.Model):
> words = models.TextField()
> note = models.IntegerField()
>
> def note_anchor(self):
> return self.note
>
> (Input:)
>
> words = 'Blah blah.'
> note = '1'
In your example, y
I wanted to ask here before I post a ticket.
If you have an integer field in your model, it can't equal zero if the
field is required (blank=False)
Here's the code out of Field.validate_full that causes this:
if not self.blank and not field_data:
return [_('This field is required.')]
Am I missi
On Sun, 2007-08-19 at 17:31 +, SH wrote:
> I wanted to ask here before I post a ticket.
>
> If you have an integer field in your model, it can't equal zero if the
> field is required (blank=False)
That would definitely be a bug.
Regards,
Malcolm
--
Everything is _not_ based on faith... ta
No, I'm using MySQL. The same thing happens with a SlugField, so I'm
not sure if the string/integer difference matters here. To return
'note' as an integer, would I write:
def note_anchor(self):
return int(self.note)
or something else?
On Aug 19, 12:21 pm, olivier <[EMAIL PROTECTED]> wrote
> def note_anchor(self):
> return int(self.note)
If it's already an integer, you don't need to do this,do you ?
Otherwise, are you not using a buggy middleware that tries to
refactors your html to make it valid XHTML ?
If not, I'm afraid I don't have any clues...
Olivier
--~--~
Hi Carl,
On 8/19/07, Carl Karsten <[EMAIL PROTECTED]> wrote:
>
> I am trying do design a iddy biddy site that will replace a site that is only
> about 8 static pages. I want to make it wiki-ish, so the 'site admin' can
> tweak
> things now and then, and it needs pictures. so sort of a hybrid b
Sorry, I got confused about your input question re: the note integer.
(The confusion is from my accidental use of single quotes around the
input note value.)
I'm afraid I'm not using any buggy middleware, unless the stuff in
django.contrib is buggy.
I'll investigate to see if will successfully
Malcom,
Thank you for the elaborate explanation. That fixed the problem, and I
actually understood it ;)
Michael
> -Original Message-
> From: django-users@googlegroups.com [mailto:[EMAIL PROTECTED]
> On Behalf Of Malcolm Tredinnick
> Sent: Sunday, August 19, 2007 11:54 AM
> To: django-u
I want templates to be accessible and editable via my admin interface
(not *the* admin).
My question is about the best way to achieve this? Should templates be
stored in the database? Or should they be stored in a templates
directory and sucked into a textarea for editing?
This is for a multi-us
Hi,
I'm trying to implement a recursive relationship with a foreignkey, but I
failed to make it work.
My goal is to have a table containing different categories and sub categories
of equipment. the relationship with 'self' is for the subcategories.
But I can't create the Master categories. her
Welcome to Chirkut !!
An Online Community site for Friends...
visit www.chirkut.co.in
Chirkut is an online community website designed for friends.
The main goal of our service is to make your social life, and that of
your friends,
more active and stimulating.
Chirkut`s social network
Hi,
On 19 août, 21:51, Francis Lavoie <[EMAIL PROTECTED]> wrote:
> I'm trying to implement a recursive relationship with a foreignkey, but I
> failed to make it work.
> If I dont use blank=True, the admin interface doesn't let me add the
> category, otherwise I received the error.
You need als
Hello!
What should I do to modify behavior of the URLField in the Admin
Panel? I'd like to have a field that behaves like the URLField but
doesn't require 'http://' part in it's value. Is it possible at all? I
never used old style forms, so the code is not very readable to me.
Regards
--
Jak
I'm hoping to get a sanity check for how I'm using the clean method.
I'm using new forms and I wanted to do a sanity covering the
relationship of two different fields. The form as auto created with
form_for_instance and friends was just fine, I just needed a "clean()"
method of my choosing. I g
I have a FloatField called price that stores the price of different
elements. When the price is 19.99, 19.79, 19.01 etc... everything is
displayed correctly. However, when I have a price of 19.00. The
price when viewed in a browser is just 19. Is there anyway that I can
have it display the two
Hi I was wondering whether anyone can help me out.
I'm currently creating a form to register users, what I'm finding is
that when I then attempt to save the user within the Register:save
method I'm getting an attribute error when trying to access the title
attribute. I've tried referencing both t
On 8/19/07, Greg <[EMAIL PROTECTED]> wrote:
> I have a FloatField called price that stores the price of different
> elements. When the price is 19.99, 19.79, 19.01 etc... everything is
> displayed correctly. However, when I have a price of 19.00. The
> price when viewed in a browser is just 19.
As a first guess I'm not sure that user = User is doing what you would
want. I think instead you want to instantiate a new User object. All
you are doing right now is creating an alias user for User.
On Aug 19, 3:16 pm, MikeHowarth <[EMAIL PROTECTED]> wrote:
> Hi I was wondering whether anyone
I'll take a look at that.
Even commenting that line out and attempting to access self.title I'm
still getting an attribute error thrown: 'Register' object has no
attribute 'title'
On Aug 19, 10:22 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> As a first guess I'm not sure that user = User
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi there!
I thought this is just the kind of questions you love :)
I haven't been able to find concise information about this on the net.
I need to construct a choices var for a field widget at runtime, with
the data from my database. Actually, I wa
Hi,
On 8/19/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi there!
>
> I thought this is just the kind of questions you love :)
>
> I haven't been able to find concise information about this on the net.
>
> I need to construct a choices var f
Hi,
I still have this error with null=True .
model.py:
class Category(models.Model):
name = models.CharField(max_length=36)
description = models.CharField(max_length=200)
parent = models.ForeignKey('self', null=True, blank=True)
class Admin:
# Admin options go here
I should have mentioned that I found such a function
in the ASPN cookbook. Hope this helps (a bit)!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us
> It works like a charm, but I'm obviously getting duplicates, and the
> choices are not sorted.
Looks like set() may do the job (I've never used it, but I'm glad to
learn about those related functions).
Another option may be tacking distinct() onto your query.
.. _distinct: http://www.djangopro
Hi,
I've just started playing around with Django and have a question on
unittesting. The docs mention that tests are looked for in the
models.py files of applications and a tests.py file in the application
directory. This seems to let me write tests specific to the
application. However, when usin
On 8/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> forms.models.form_for_instance(original_laborder, form=LabOrderForm)
>
> Is there a more django-esque to get a custom clean method for an auto-
> generated form like this or is this the way it's supposed to go?
There's actually two ways
{{ price|floatformat:2 }}
On Aug 19, 4:44 pm, Greg <[EMAIL PROTECTED]> wrote:
> I have a FloatField called price that stores the price of different
> elements. When the price is 19.99, 19.79, 19.01 etc... everything is
> displayed correctly. However, when I have a price of 19.00. The
> price w
Is there an existing Django app for managing locations?
Specificall, countries, states/provinces, cities, and specific
locations with addresses.
(I was just adding such an app to my project, but thought I might be
duplicating someone better effort...)
Thanks,
--
Austin Govella
Thinking & M
On 8/20/07, Viraj Alankar <[EMAIL PROTECTED]> wrote:
> My question is why does my test in polls need to know anything about
> the root url configuration of the project? This seems to couple my
> poll-specific unittest to the project and it would be cleaner to not
> need to specify the '/polls/' u
Hi,
On 8/19/07, Drasty <[EMAIL PROTECTED]> wrote:
> I'll investigate to see if will successfully point
> to , though I have my doubts!
Which version of django do you use?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gr
I think you've got some misconceptions about newforms.
http://www.djangoproject.com/documentation/newforms/ should give you
the info you need.
Something more like this:
def save(self):
#set up the objects we are going to populate
user = User() # you want a new -instance- not another referen
Grigory Fateyev wrote:
> Hello!
>
> I have simple class with ImageField, but cann't add any object:
>
> class Book(models.Model):
> name = models.CharField(_('Book Title'), maxlength=200)
> book_number = models.IntegerField()
> image = models.ImageField(upload_to='%Y/%m/%d/', core=Tr
Hi,
Has anyone worked on a quiz/ multiple choice contest design using Django
using Newforms?
RS
--~--~-~--~~~---~--~~
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
It was a typo. Everything works now. Sorry for the fuss!
On Aug 19, 12:07 pm, Drasty <[EMAIL PROTECTED]> wrote:
> I'm getting an escaped double quotation mark (", rendered as '%22') at
> the end of some stuff that I'm using to reference an anchor on the
> same page. This isn't a problem in templa
Vincent and James,
I tired both of your suggestions and I couldn't get either to work.
First, still using my prices as FloatFields. I added the following to
my template: {{ a.price|floatformat:2 }}. When I tried this I got the
following error:
TypeError
float() argument must be a string or a n
Eratothene wrote:
> I think you better not disable cache middleware in tests. If tests
> fail, so will be in production. I had similar problem, I thought it
> was something wrong with tests, but really it was problem in the code.
> My site was running well on django built-in server, but not on apa
Ah, yes, sort of obvious in retrospect. But at least I was in the
neighborhood of a sane way of using it.
Thanks.
On Aug 19, 5:49 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On 8/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> > forms.models.form_for_instance(original_lab
On Aug 19, 11:04 pm, Chris Hoeppner <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> > If my site is under /var/www/html/python, with the settings file as /
> > var/www/html/python/foo/settings.py should I write,
> > SetEnv DJANGO_SETTINGS_MODULE foo.settings
> > (o
hi greg,
just checking - did you try both at once? ie DecimalField in your model
and |floatformat:2 in your template.
-jake
Greg wrote:
> Vincent and James,
> I tired both of your suggestions and I couldn't get either to work.
>
> First, still using my prices as FloatFields. I added the follo
Jake,
No I didn't. When I tried the 'floatformat:2' I made sure that my
model fields were of type FloatField. When I do use the 'floatformat:
3' and view the template. I notice that in my error message my for
statement is highlighted:
TypeError at /rugs/milliken/border/ionica/
float() argumen
greg,
Greg wrote:
> Jake,
> No I didn't. When I tried the 'floatformat:2' I made sure that my
> model fields were of type FloatField.
i have used DecimalField in my model and |floatformat:2 in my template
and gotten the behavior you're looking for; that's probably the
combination you want here
Is it normal to experience a sudden sharp spike in cpu and memory
usage for about a minute or so after a start/stop and restart? I'm
running the pre-fork mpm, FreeBSD 6.2, and latest mod_python. I've
tried disableing mod_python and it went away, so it's clearly mod
python. I know that the pre-fork
On Aug 20, 3:01 pm, Sasha Weberov <[EMAIL PROTECTED]> wrote:
> Is it normal to experience a sudden sharp spike in cpu and memory
> usage for about a minute or so after a start/stop and restart? I'm
> running the pre-fork mpm, FreeBSD 6.2, and latest mod_python. I've
> tried disableing mod_python a
On Sun, 2007-08-19 at 15:21 -0400, Austin Govella wrote:
> I want templates to be accessible and editable via my admin interface
> (not *the* admin).
>
> My question is about the best way to achieve this? Should templates be
> stored in the database? Or should they be stored in a templates
> dire
On Sun, 2007-08-19 at 18:41 -0400, Francis Lavoie wrote:
> Hi,
>
> I still have this error with null=True .
>
> model.py:
> class Category(models.Model):
> name = models.CharField(max_length=36)
> description = models.CharField(max_length=200)
> parent = models.ForeignKey('self', nu
On Sun, 2007-08-19 at 14:30 -0700, MikeHowarth wrote:
> I'll take a look at that.
>
> Even commenting that line out and attempting to access self.title I'm
> still getting an attribute error thrown: 'Register' object has no
> attribute 'title'
Doug Ballanc has explained how you should be writing
65 matches
Mail list logo