I deleted the db and resync done, but still got the same problem.
I add a few toppings and it works.
I add one pizza with some toppings and their quantities: admin says
everything is right, but really it isn't: pizza_pizzatopping is an
empty table, while pizza_pizza got the right entry. The pizza
django is perfect!!
On 6/1/07, Margaret <[EMAIL PROTECTED]> wrote:
>
>
> Ok, I sawed your photo.aha
>
> On 6/1/07, Kelvin Nicholson <[EMAIL PROTECTED]> wrote:
> >
> > > In his talk he said at least 4 times that he likes
> > > Django. And I'm very excited about this.
> >
> > Thanks for telling the
On Fri, 2007-06-01 at 10:10 +0400, Ivan Sagalaev wrote:
> Russell Keith-Magee wrote:
> > On 6/1/07, char <[EMAIL PROTECTED]> wrote:
> >> Obviously, the performance deteriorates rapidly as the number of
> >> GamesOfInterest added to a Profile increases. Is there any way to
> >> avoid this?
> >
> >
Russell Keith-Magee wrote:
> On 6/1/07, char <[EMAIL PROTECTED]> wrote:
>> Obviously, the performance deteriorates rapidly as the number of
>> GamesOfInterest added to a Profile increases. Is there any way to
>> avoid this?
>
> This is a known problem, and one of the many reasons that the forms
>
On 6/1/07, Doug B <[EMAIL PROTECTED]> wrote:
>
> I've been looking around the limited signals documentation and the
> code hoping to find a signal that basically says 'django is done
> importing models ready to receive requests', but haven't found it
> yet. The closest I've found is connecting a
I've been looking around the limited signals documentation and the
code hoping to find a signal that basically says 'django is done
importing models ready to receive requests', but haven't found it
yet. The closest I've found is connecting a receiver to
request_started, and then removing that rec
?python,???asii
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, s
On 6/1/07, char <[EMAIL PROTECTED]> wrote:
>
> Obviously, the performance deteriorates rapidly as the number of
> GamesOfInterest added to a Profile increases. Is there any way to
> avoid this?
This is a known problem, and one of the many reasons that the forms
framework is being replaced with 'n
I've got a model with a few foreign keys. Normally this isn't a
problem except in one case when I create a Profile ChangeManipulator,
it results on the following query repeated once per GameOfInterest
associated with the given Profile:
'time': '0.046', 'sql': 'SELECT
"game_room_app_game"."id","g
The solution I implemented for my app has worked without a hitch at
the moment. Unfortunately the problem still persists in the admin.
eg: when I log into the admin, the first page always shows up the
'Auth' and 'Sites' apps but intermittently shows up the app i've
written.
I would like t
Ok, I sawed your photo.aha
On 6/1/07, Kelvin Nicholson <[EMAIL PROTECTED]> wrote:
>
> > In his talk he said at least 4 times that he likes
> > Django. And I'm very excited about this.
>
> Thanks for telling the list about this! Being somebody interested in
> Django, and doing business/life in Ch
> In his talk he said at least 4 times that he likes
> Django. And I'm very excited about this.
Thanks for telling the list about this! Being somebody interested in
Django, and doing business/life in China, this was great news to hear!
--
Kelvin Nicholson
Voice: +886 9 52152 336
Voice: +1 50
I'm just wondering my expectations are correct:
Using 0.96, given a model with an ImageField, the admin interface
gives me (what looks to be) a file upload widget.
I should be able to select a file from that widget, and once I save
the model, it *should* copy my image file into the upload_to pat
I am using a ModelChoiceField (default_project) in a form and want the
initial queyset to change when the form is created.
I've tried doing it like this:
forms.py --
class UserAccountForm(forms.Form):
.
default_project =
forms.ModelChoiceField(queryset=Project.objects.all(), requir
When you are in the shell you might be accessing the models field and
when you are in the template you are accessing the form field. You
might just want to pass the url of the attachment in through the view.
On May 31, 4:01 pm, "John Goodleaf" <[EMAIL PROTECTED]> wrote:
> Awright. I just know I'
I have the common scenario where if the user selects "other", then I
need an "explain" box to become required. How can I do this?
Additional validator on the field or something?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goo
On 5/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I have the common scenario where if the user selects "other", then I
> need an "explain" box to become required. How can I do this?
> Additional validator on the field or something?
You probably want django.core.validators.RequiredIfOt
Just ignore me. I like to overlook obvious bits then wonder why it
isn't working. I was using "editable=False" in several of the fields I
wanted to hide, but missed one. So the "editable=False" solution *is*
the fix I was looking for, I just gooned it up by missing a field. :-)
--~--~-~-
What is the best practice for handling this?
Let's say I have a form with 3 fields:
name, b-day, status
I want a form that will allow the user to edit "name" and "b-day",
then keep "status" whatever it was before the edit. Should I send this
through as a hidden field?
Of course, I'm talking abo
Awright. I just know I'm missing something stupid here.
I have a model for file attachments that are uploaded. In one of my
templates, I'd like to display a URL whence the attachment could be
recalled. So I've put in {{ a.get_bugfile_url }} in the template, but
the output HTML looks like Title.
Ok, I just read into middleware a bit more and I see the possibilities
now. I'm going to attempt to write this and I'll post the results
once I'm done. This seems like something people might want at their
disposal. Thanks for the assistance.
ringemup wrote:
> On May 31, 3:14 pm, tyman26 <[EMA
vida wrote:
> After reading the docs and looking for posts relating this problem
> here and in .developers, I found no "standard" way of checking for a
> user's group permissions in the templates.
>
> So what I did is to add the following method to auth.models.User
> (yeah, yeah, it *should* be i
Tim Chase <[EMAIL PROTECTED]> writes:
>>> Sorry, my email is
>>
>> Ermmm It tells us that in the mail header.
>
> But it doesn't tell us where this is geographically in the
> header, the body, or in the follow-up email :)
It's in cyberspace, man.
--
Nic Ferrier
http://www.tapsellferrier.
Michael Lim <[EMAIL PROTECTED]> writes:
> Not in Google Groups. The email is masked off as shown in the reply
> thread shown below :-)
Bizarre!
--
Nic Ferrier
http://www.tapsellferrier.co.uk
--~--~-~--~~~---~--~~
You received this message because you are su
One addition:
On 31 mei, 21:35, SanPy <[EMAIL PROTECTED]> wrote:
> Try this:
> # in your view
> raw_image_data = form.cleaned_data['photo']['content']
> thumbnail_content = resize_image(raw_image_data)
> filename = form.cleaned_data['photo']['filename']
Change the filename's extension to jpg, be
Nic,
Not in Google Groups. The email is masked off as shown in the reply
thread shown below :-)
Have a nice day!
Cheers,
Michael
On Jun 1, 3:41 am, Nic James Ferrier <[EMAIL PROTECTED]>
wrote:
> Michael Lim <[EMAIL PROTECTED]> writes:
> > Hi all,
>
> > Sorry, my email is
>
> > lim ck michae
>> Sorry, my email is
>
> Ermmm It tells us that in the mail header.
But it doesn't tell us where this is geographically in the
header, the body, or in the follow-up email :)
-tim
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
Michael Lim <[EMAIL PROTECTED]> writes:
> Hi all,
>
> Sorry, my email is
>
> lim ck michael gmail com
Ermmm It tells us that in the mail header.
--
Nic Ferrier
http://www.tapsellferrier.co.uk
--~--~-~--~~~---~--~~
You received this message because y
On May 31, 3:14 pm, tyman26 <[EMAIL PROTECTED]> wrote:
> That makes a lot more sense to me now, thanks for the explanation!
> The only thing that worries me is repetition. It seems like it would
> get very repetitive implementing this inside every view in the entire
> project. Is there somewhe
Try this:
# in your view
raw_image_data = form.cleaned_data['photo']['content']
thumbnail_content = resize_image(raw_image_data)
filename = form.cleaned_data['photo']['filename']
upload_to_s3(filename, thumbnail_content)
def resize_image(buf, size=(100, 100)):
f = cStringIO.StringIO(buf)
Hi all,
Sorry, my email is
lim ck michael gmail com
Thanks,
Michael
On Jun 1, 3:14 am, Michael Lim <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> We are incubating a web startup, and we are looking for the talented,
> entrepreneurial and passionate Django developers who are keen to be
> part o
That makes a lot more sense to me now, thanks for the explanation!
The only thing that worries me is repetition. It seems like it would
get very repetitive implementing this inside every view in the entire
project. Is there somewhere else you can check everytime a request is
made?
On May 31, 1
Hi there,
We are incubating a web startup, and we are looking for the talented,
entrepreneurial and passionate Django developers who are keen to be
part of a great founding team.
With this job, you are able to:
* Work on the cutting edge of Web 2.0 development
* Be part of a founding tea
hmm, yeah, that's about what I am looking for (the site lang
approach). I'll look into that some more.
For this particular app, there are no stored user profiles (e.g. there
is no logging in), so as much as I'd like to store this setting in a
user profile, and requiring login, I can't guarantee t
> I see what you are saying, but I want the user to be automatically
> logged out after a period of inactivity for security purposes.
Yes, this accomplishes that.
> 1) Do you mean I would check the last time they saved and then
> compare it with a time limit everytime they alter a session?
Yes
I see what you are saying, but I want the user to be automatically
logged out after a period of inactivity for security purposes.
1) Do you mean I would check the last time they saved and then
compare it with a time limit everytime they alter a session?
2) If the time limit has been surpassed,
I have 3 models, Shift, Person & Shiftmap.
class Shift(models.Model):
name = models.CharField()
date = models.DateTimeField()
class Person(models.Model):
first_name = models.CharField()
last_name = models.CharField()
class Shiftmap(models.Model):
shift =
On May 31, 1:20 am, "Vagmi Mudumbai" <[EMAIL PROTECTED]> wrote:
> Check out Google Gears.http://gears.google.com
There's a lot of interesting things about Google Gears...
It provides a browser local SQLite accessible via Javascript.
It provides a local HTTP server for storing/retrieving cached
Because of the dependants you might need to either manually add the
tables to the db or if you don't have any values in that table delete
all the rows in pizza and run syncdb again. Sometimes when working
within the same class the syncdb doesn't change the database all the
way (and rightly so). Gi
Why not store a parameter in the session indicating when it was last
saved. On each page load, first check that parameter and if it's too
long ago, discard the session and begin a new one. Then update the
parameter with the current time.
You may need middleware to accomplish this, but it ought
Thanks to you all, I took something from all the replies and I wrote
this modifying Michael code:
class Topping(models.Model):
name = models.CharField(maxlength=255, unique=True)
def __str__(self):
return self.name
class Admin:
pass
class Pizza(models.Model):
n
I also need to implement this type of feature. Did you find anything
on this?
On May 2, 12:29 pm, [EMAIL PROTECTED] wrote:
> Hi all,
>
> I use django.contrib.sessions with SESSION_EXPIRE_AT_BROWSER_CLOSE=True.
>
> I need a way toexpireasessionon certain amount of time of inactivity in the
> bro
On Thursday 31 May 2007 11:44:51 Tim Chase wrote:
> It would also be helpful to know things about the usage
> patterns--particularly the read-to-write ratio and
> currency-demands.
>
> If most of your hits are reads, and stale data is okay (only
> updated every N minutes), then you're a top candid
Nis;
Thanks for catching that I left the manytomany field there. There is
no need for that.
revised code:
class Topping(models.Model):
# ...
class Pizza(models.Model):
# ...
class PizzaToppings(model.Model):
pizza = models.ForeignKey(Pizza, help_text='Toppings to go on
Pizza: num in
> And what if I need to say that I can have two or three times the same
> topping on my pizza? Something like twice mozzarella cheese and 3
> times green olives topping?
>
> I though about an intermediary class and indeed this is the same
> solution found in those old posts mentioned before:
>
>
Well, just a follow up for future spelunkers to this list.
Updating my code to the changes in 5173 and 5211 worked (it now loads
fixtures that are not named initial_data.json). For some reason,
straight code from 0.96 doesn't work, I never figured out why.
And I patched get_sql_flush() to use
Gio wrote:
> Hi,
> I searched about this subject and found only a few very old posts, so
> maybe there is a better solution now.
>
> As you may guess the model I'd like to code is similar to the Pizza -
> Toppings you know from the "Creating Models" documentation:
>
> class Topping(models.Model):
You could need an extra class for this but it should work:
class Topping(models.Model):
# ...
class Pizza(models.Model):
# ...
toppings = models.ManyToManyField(Topping)
class PizzaToppings(model.Model):
pizza = models.ForeignKey(Pizza, help_text='Toppings to go on
Pizza: num in
>> AFAIK, the bottleneck tends to be the database, so a cache
>> solution like memcached should make the deal. Think of a
>> 256Mb cache for 10 seconds maybe.
>
> Yes, the database is generally the main bottleneck these days.
> memcached is definitely on my radar.
It would also be helpful to kno
Hi,
I searched about this subject and found only a few very old posts, so
maybe there is a better solution now.
As you may guess the model I'd like to code is similar to the Pizza -
Toppings you know from the "Creating Models" documentation:
class Topping(models.Model):
# ...
class Pizza(mo
On May 30, 9:29 am, Rob Hudson <[EMAIL PROTECTED]> wrote:
> I was kind of wondering the same... is the Django Book going to align
> with Django 1.0?
If it's going to press in June as Apress currently claims, then I'm
guessing "Pro Django" won't cover Django 1.0. Jacob? It is nice to
see that it
Daniel Ellison <[EMAIL PROTECTED]> writes:
> On Thursday 31 May 2007 11:26:37 Nic James Ferrier wrote:
>> Daniel Ellison <[EMAIL PROTECTED]> writes:
>> > Sounds like this might end up being the highest-traffic Django site there
>> > is! :)
>>
>> Errr... I might be in competition with you there.
>
I think my question wasn't clear: we're having NO problem putting
files on S3, that's dead simple (ie what Holovaty blogged about).
What we need to do is take an *in-memory Image* and put it directly
onto S3. We need a way to convert a PIL Image instance into a format
S3 can accept WITHOUT havi
On Thursday 31 May 2007 11:26:37 Nic James Ferrier wrote:
> Daniel Ellison <[EMAIL PROTECTED]> writes:
> > Sounds like this might end up being the highest-traffic Django site there
> > is! :)
>
> Errr... I might be in competition with you there.
>
> /8->
Fine. Sounds like this might end up being
Daniel Ellison <[EMAIL PROTECTED]> writes:
> Sounds like this might end up being the highest-traffic Django site there
> is! :)
Errr... I might be in competition with you there.
/8->
--
Nic Ferrier
http://www.tapsellferrier.co.uk
--~--~-~--~~~---~--~~
You
OK never mind about this. It was my error, I was creating some URLs
like this:
/{{var}}/path1/path2/
and sometimes var wasn't set so the url becomes:
//path1/path2/
which replaces everything in the browser...
--~--~-~--~~~---~--~~
You received this message bec
On Thursday 31 May 2007 10:31:24 John M wrote:
> I would love to know your site.
Well, I'll reveal that when the site launches, but suffice to say it's for a
very popular network TV show. We did the current site and are now redesigning
and rearchitecting the entire thing for the next season.
D
On Thursday 31 May 2007 09:03:32 Christian Markwart Hoeppner wrote:
> AFAIK, the bottleneck tends to be the database, so a cache solution like
> memcached should make the deal. Think of a 256Mb cache for 10 seconds
> maybe.
Yes, the database is generally the main bottleneck these days. memcached
I have a problem with flatpages.
When putting links in my templates, I use absolute URLs without
prepending http://hostname.com/
For example, Home gets interpreted by the browser as a
link to http://hostname.com/, and all is correct.
However, when a flatpage is being served, those links get int
After reading the docs and looking for posts relating this problem
here and in .developers, I found no "standard" way of checking for a
user's group permissions in the templates.
So what I did is to add the following method to auth.models.User
(yeah, yeah, it *should* be in appname.models.UserPro
I would love to know your site.
On May 31, 5:26 am, Daniel Ellison <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm about to start a Django project that will be replacing an existing
> high-profile Drupal site. The existing site has extremely high traffic -
> approximately 1,440,000 page views per ho
> Since full model-aware validation doesn't exist yet, example code would
> be premature. :-)
Ah, sorry, I thought you were saying that models have an existing
validate() method that could be called on an object constructed by a
form.
On May 30, 3:18 pm, "Alfonso Ali" <[EMAIL PROTECTED]> wrote:
I'm trying to use django-tagging in my application but when I generate
a form with "form_for_model" from a model which contains a TagField I
get this error message:
TypeError at /bookmarks/add/
__init__() got an unexpected keyword argument 'form_class'
Request Method: GET
Request URL:
You mean White Space in the url of the image?
On May 31, 6:42 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> On 31-May-07, at 4:05 PM, Alessandro Ronchi wrote:
>
> > I am using ImageWithThumbnailField from nesh utils. if I upload a file
> > with a white
> > space it doens't work, and the file
Hi,
On Thu, 31 May 2007 04:04:58 -0700, Grupo Django wrote:
> If someone tell me what documents should I look to modify the django
> code, I'll try to do it, and propose it.
> I built a complete multilingual system for a PHP framework in just a
> few hours.
Achtually, you do not need to modify *
On 5/30/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
> On 5/30/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> >
> > I'll add something suitably informative when I get a chance.
>
> It's my mess - I'll clean it up. Ticket #4426 for future reference.
FYI - Fixed in [5391]
Yours,
Russ Ma
Hi there,
AFAIK, the bottleneck tends to be the database, so a cache solution like
memcached should make the deal. Think of a 256Mb cache for 10 seconds
maybe.
Of course, the hardware should be able at least to serve that amount of
static pages, and maybe you should think about running the datab
Hi all,
I'm about to start a Django project that will be replacing an existing
high-profile Drupal site. The existing site has extremely high traffic -
approximately 1,440,000 page views per hour, or 400 per second. This is only
possible with the help of Akami. Without Akami the site would mel
Grupo Django napisał(a):
> Can you please provide me some document where I can find some
> information and examples?
This is how this all gettext machinery works. It doesn't matter where in
the sources the key is located, if gettext finds the key, it will
replace it with its translated value or
Many people know that Guido like django, that's right! Today Google
Developer Day is held in Beijing, and Guido also made a python
introduction. In his talk he said at least 4 times that he likes
Django. And I'm very excited about this. And I think maybe it's a
great opportunity for Django develop
> 2. import bar.module
> the application is more portable, but its path has to be included in
> PYTHON_PATH (at least under mod_python)
A simpler variation of this is, "put it in your PYTHON_PATH".
Personally, I have found this the easiest way to both maintain apps
and deploy them.
--
-Ben
Can you please provide me some document where I can find some
information and examples?
Thank you.
On 31 mayo, 12:11, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
> Grupo Django napisał(a):
>
> > Hello, I'm going to start a new multilingual site. I think that the
> > django tools are very powerful for
> > - Could it be implemented in futures django releases?
>
> I think something like this could go in django.contrib. But I'm not sure
> how many people need this.
IMHO I think it's quite useful and it would be a great improvement.
Django is so good that it's possible to use it for very professio
a lot of information in http://www.real-article.com/
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this
On 31-May-07, at 4:05 PM, Alessandro Ronchi wrote:
> I am using ImageWithThumbnailField from nesh utils. if I upload a file
> with a white
> space it doens't work, and the file name is thumbnail-none.jpg
ahh - thanks for that tip, some of my sites people were complaining
that they were gettin
I am using ImageWithThumbnailField from nesh utils. if I upload a file
with a white
space it doens't work, and the file name is thumbnail-none.jpg
How can I solve this problem? Maybe I can change the name before
creating the field and after uploading the file in the admin?
--
Alessandro Ronchi
"=?ISO-8859-1?Q?Fr=E9d=E9ric_Sidler?=" <[EMAIL PROTECTED]>
writes:
> openfount provide something that does the trick
> http://www.openfount.com/blog/s3dfs-for-ec2
>
> and adrian holovaty did something like that some weeks ago for
> chicagocrime.org
> http://www.holovaty.com/blog/archive/2006/04/0
openfount provide something that does the trick
http://www.openfount.com/blog/s3dfs-for-ec2
and adrian holovaty did something like that some weeks ago for
chicagocrime.org
http://www.holovaty.com/blog/archive/2006/04/07/0927
2007/5/31, Nic James Ferrier <[EMAIL PROTECTED]>:
>
>
> Kyle Fox <[EMAIL
Grupo Django napisał(a):
> Hello, I'm going to start a new multilingual site. I think that the
> django tools are very powerful for this purpose, but I need a bit
> more.
> I have to translate the content from the database and I have a few
> options:
The simplest thing that comes to my mind is t
Hello everyone
We're having a similar issue, still trying to debug it now.
We don't have a form on the page where the issue is, but there is a
slight difference in error message. We get the same as Jon but hsi
line is also in there.
File "/usr/local/lib/python2.5/site-packages/django/core/serv
Hi,
On Thu, 31 May 2007 01:30:31 -0700, Grupo Django wrote:
> - Does anyone know a better solution for doing it?
Use django-multilingual or django-utils (nesh.translation). Yesterday I
started my own translation system which works like nesh.translation.
> - Could it be implemented in futures dj
Kyle Fox <[EMAIL PROTECTED]> writes:
> The S3 API requires the file data to be in the format the
> open(myfile).read() returns (whatever that is).
>
> Is there a way to get the same data from an in-memory Image instance,
> so I don't need to save/re-read/delete each thumbnail file?
Surely the be
2007/5/30, Panos Laganakos <[EMAIL PROTECTED]>:
>
> direct_to_template sounds like a nice way to handle the index page
> serving.
>
> But how can it be fed the dynamic content of one or more apps to
> display? Not sure how it's supposed to be done
> through "template tags" as Michel mentioned.
Yo
> to migrate i do this:
> 1. all code is anyway on svn, so i do a checkout in the new machine
> 2. i do a pg_dump on the old machine, and after setting up the
> database run:
> psql -f dumpfile newdatabase
Unfortunately, I have different versions of PostgreSQL database on my
local enviroment a
> Are you overriding save() in any of your models (in particular,
> anything querying StaticPage model?
Yes, I am. I have there some check code, which prevent to save object,
which will refer to itself.
> The only workaround I know of for this is to do your dump in stages,
> so that the data req
Hello, I'm going to start a new multilingual site. I think that the
django tools are very powerful for this purpose, but I need a bit
more.
I have to translate the content from the database and I have a few
options:
- Translate it using the standard way, I mean, using po files.
Problems: Eve
On 31-May-07, at 1:39 PM, Michal wrote:
> I would like migrate data from my Django project on notebook
> (computer1)
> to another machine (computer2). To perform this, I follow this steps:
to migrate i do this:
1. all code is anyway on svn, so i do a checkout in the new machine
2. i do a pg_d
Check out Google Gears. http://gears.google.com
On 5/30/07, Tom <[EMAIL PROTECTED]> wrote:
>
>
>
>
> On May 23, 2:51 am, Robert Coup <[EMAIL PROTECTED]>
> wrote:
> > Rob Hudson wrote:
> > > Cool. What's the best way to coordinate the effort? A wiki page to
> > > start with?
> >
> > Current trend
On 5/31/07, Michal <[EMAIL PROTECTED]> wrote:
>
> Hello,
> I would like migrate data from my Django project on notebook (computer1)
> to another machine (computer2). To perform this, I follow this steps:
> ...
> Is this approach correct?
Looks correct to me.
> I ask you for this, because I have
Hello,
I would like migrate data from my Django project on notebook (computer1)
to another machine (computer2). To perform this, I follow this steps:
1) On computer1 I call ./manage.py dumpdata > all.json
2) On computer2 I setup exactly same version of my Django project. Next
I call ./manage.py
90 matches
Mail list logo