> could you run it and check the output.
14.28 MB
--~--~-~--~~~---~--~~
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 gr
I´m sorry for bothering again, but our site has to be online soon and I
´m currently not able to use the cache_page decorator (which makes me
a bit nervous).
I did some research on smart_str, but I don´t know how and where to
use it and I also don´t see why this should solve the problem.
any feed
>
> http://www.djangoproject.com/documentation/templates/#url
I tried that already...but its not working for me...or i just don't
know whats happening. I always get a link to the current page. i.e the
page links to itself. i can't seem to find more documentation to the
url tag, so that i could s
where might I find the PYTHONPATH variable?
On Aug 11, 6:39 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 8/11/07, Kelsey Ruger <[EMAIL PROTECTED]> wrote:
>
> > I have the same problem even though I have installedMySQLdb.
>
> Open up a Python interpreter, and try:
>
> importMySQLdb
>
> If y
On 27-Aug-07, at 8:18 PM, Iapain wrote:
>> what is your RAM usage? How did you tweak apache to achieve that?
>
> I didnt check RAM usage, but site always work like express instead i
> did clean coding and tried to optimize my code.
this is the command that webfaction uses to check RAM usage:
On 8/27/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
> QuerySet.iterator does what you want.
I was going to follow up with a documentation link, but it appears we
lost the documentation for QuerySet.iterator at some point. Opened a
ticket
In any case, Jeremy's right: the "iterator" method returns
On 8/27/07, Tomas Kopecek <[EMAIL PROTECTED]> wrote:
> I've thought, that QuerySets whose are iterated does not allocate memory
> for all objects.
QuerySet.iterator does what you want.
QuerySet.__iter__ (the python method that is called from the for loop)
returns an iterator over the results of
There isn't much difference. Once you ennumerate,slice, or iterate a
queryset that's when the actual database query occurs. It will pull
in all matching object in order to save you additional queries.
Why not iterate in batches, by slicing the query? That way if you set
you step to say 100, yo
Neo-Cons: Make Bush Dictator Of The World
Maniacal right-wing Family Security Matters organization, which has
ties to Cheney, Rumsfeld and Perle, carries screed that calls for Bush
to declare martial law, become emperor of the planet, lifetime
president, and ethnically cleanse Iraq by means of nuc
I'm unshelving an object that i wrote in the views module and a get
AtributeError, 'module' object has no attribute Myobject. And run one of its
functions.
Any idea what i am doing wrong??
Jorge Hugo Murillo
Hello,
I've thought, that QuerySets whose are iterated does not allocate memory
for all objects. But simple test shows otherwise. When I iterate through
SomeModel.objects.all() I get same memory consumption like with
list(SomeModel.objects.all()). It is very frustrating, because with test
datab
In view:
upload_to = Jewel._meta.get_field( "file" ).upload_to
--~--~-~--~~~---~--~~
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
I am generating a form for a model that contains a CharField with
choices. According to the documentation I expect to see this
translated into a SELECT form field but all I get is a simple TEXT
form field:
models.py:
class Publication(models.Model):
PUBLICATION_TYPES = (
('B', 'Book'
On 7/11/07, Peter Nixon <[EMAIL PROTECTED]> wrote:
...
> In any case, I listed the important packages in use on the system:
> postgresql-server-8.2.4-5
> python-2.5.1-12
> python-psycopg2-2.0.6-2.5
> python-django-snapshot-5646-1
>
> While these are all new packages, the only one which is "unstabl
Maybe this code I whipped up tonight to teach Django to speak RADIUS will be
usefull to someone...
http://peternixon.net/news/2007/08/27/open-source/authenticating-django-against-freeradius/
Cheers
--
Peter Nixon
http://peternixon.net/
--~--~-~--~~~---~--~~
Yo
Thanks a lot for pointing that out. My apologies.
So, for other readers of the thread:
class UserProfile(models.Model):
user = models.ForeignKey(User, unique=True, edit_inline=models.TABULAR,
num_in_admin=1,min_num_in_admin=1, max_num_in_admin=1,num_extra_on_change=0)
: Makes the profile
Hi,
I found this:
http://automatthias.wordpress.com/2006/12/18/killing-phpbb-softly/
excellent post about phpBB and Django integration.
I was wondering if anyone has integrated single sign on with trac?..it
seems trac uses .htaccess and not a database table so maybe it is not
possible?
Thanks
Ian
On Wed 11 Jul 2007, Michael Radziej wrote:
> Hi,
>
> you're using the alpha version of SuSE ... well ... there might very well
> be a problem very deep in one of the libraries. The alpha releases aren't
> very reliable. I'd suggest that you try it with another OS.
Hi Guys
I would like to point o
Looking more into the problem i noticed that when I do a 'assert
False, self.get_photo_filename()' I get nothing in return. When I do
the same thing (without edit_inline) I get the the filename of the
image.
Does anybody know why when I use edit_inline my
self.get_photo_filename statement from w
Hi,
I have posted about a simple way to reuse your model definition in a
more flexible manner than the form_for_model way, and I want also to
have a more nice html rendering than the as_p or as_table methods can
do.
if your are interested this is link , and there is also a demo
project to downl
Hi guys,
I´m improving my forum app and I letting moderator add warnings to
users. A moderator can´t add a warning to a user if this user got a
warning on the last 2 minutes (to avoid 2 moderators give warning with
the same subject). I don´t know how to trigger the admin interface
and, when the w
Thanks John, I am going to try that. That's what I was looking for.
And to answer Jeremy, I don't understand why would I want to have name
as a primary key. The surrogate autofield primary key does a much
better job being referenced as a foreign key all over the place.
Using adaptive-readahead b
On 8/27/07, Darrin Thompson <[EMAIL PROTECTED]> wrote:
> I'm building a real estate search. I have existing and future
> competition. It's to my advantage to track a few preferences and
> favorites for anonymous users before they register.
http://www.djangoproject.com/documentation/sessions/
--
On 8/27/07, Darrin Thompson <[EMAIL PROTECTED]> wrote:
> I'm building a real estate search. I have existing and future
> competition. It's to my advantage to track a few preferences and
> favorites for anonymous users before they register.
>
> I'm pretty sure it isn't that hard and I'm not the fi
On 8/27/07, r_f_d <[EMAIL PROTECTED]> wrote:
>
> Generally, if you want to track or store any
> information about a specific user, you probably would want to create a
> specific user object/db record for the user and require them to
> authenticate. If you could be a bit more specific as far as wh
To answer your specific question about can Django handle 100 page
hits/sec, the answer is yes. Like any other technology, how you
achieve that scale depends on a lot of things other than just the
framework.
There's a nice (but not detailed) interview about Pownce at
http://immike.net/blog/2007/07
I am not sure what exactly you want to model in regard to an
'anonymous' user. By definition, these would be users of an
application that nothing is required to be known about and can only
access information that is provided by views that do not require
authenticated users. Generally, if you wan
Thanks Russell, it works with the get_accessor_name() method combinated with
the model attribute.
2007/8/23, Russell Keith-Magee <[EMAIL PROTECTED]>:
>
>
> On 8/22/07, Grégoire Cachet <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I would like to get the class name from a relation name (OneToOne)
> ..
On Aug 24, 7:28 pm, "Ariel Mauricio Nunez Gomez"
<[EMAIL PROTECTED]> wrote:
> Note: The user profile part was taken from this useful blog entry on James
> Bennet
> site:http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model
Yeah, that's the advice I keep seeing when this questi
If I remember correctly, you'll see the file listing if you don't have
handlers set properly for the location. What is in your httpd.conf or
virtual host config file for the htdocs directory?
I'm assuming you've looked at:
http://www.djangoproject.com/documentation/modpython/
- syd
On Aug 27,
Reading the auth docs for Djano 0.96, it appears to me that there is
no model backing the idea of an anonymous user.
Before I read the docs I was expecting that I could let my model refer
to users and some of them would be anonymous, some of them real.
Now I'm sure that the Django developers hav
You are absolutely right. I have tested this approach and for my
purposes it is working great. Thanks for the insight.
On Aug 23, 9:50 pm, Ned Batchelder <[EMAIL PROTECTED]> wrote:
> You can probably skip the StringIO. HttpResponses support a file-like
> interface, so you can write directly to
On Aug 27, 2007, at 2:05 AM, Kugutsumen wrote:
> cursor.execute("""SELECT id,name from "DNS_domain" WHERE name='%s'
> """
> % domain)
> row = cursor.fetchone()
If you do just need those two fields, and no object methods, you can
use the "values" queryset method. Something like:
d = Domain.obje
On 8/27/07, James Bennett <[EMAIL PROTECTED]> wrote:
> There will never be a situation where that's as fast as the
> straight select.
from __future__ import wayback_machine
:)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Googl
On 8/27/07, Rufman <[EMAIL PROTECTED]> wrote:
> Does anyone have an idea how i can get the day_id and rubric_id in a
> link, if they are not attributes of the model that is being displayed?
> (if i were hard coding with PHP i would just make them get or post
> parameters)
http://www.djangoproject
> i want to make a link in my template dynamic. e.g. I want to click on
> a "rubric" that links to a view that displays all the content. I have
> the following URL patterns to reach the rubric: /rubric/view and to
> reach the content /bullet///view --> the link i
> need in the template that rende
On 8/27/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
> Ah, one more thing-- try commenting out the signalling. There's a
> known performance issue there.
Even without it, the ORM will be slower, and should be expected to be
slower -- doing a straight select doesn't involve much overhead
because it
perrito666 wrote:
> Ah thank you, ill keep an eye, so far the only think I did to it was a
> small hack to handle the error raised by trying to copy a fk to the
> audit table but it is a not very clean hack.
> Perrito.
Took me an extra couple of days, but I've got all my modifications to
AuditTr
so you say I should use __str__ instead of __unicode__, right?
according to the django-docs, that´s not recommended though ...
On 27 Aug., 16:40, Iapain <[EMAIL PROTECTED]> wrote:
> > UnicodeDecodeError at /spezialprogramme/
> > 'ascii' codec can't decode byte 0x80 in position 0: ordinal not in
>
> what is your RAM usage? How did you tweak apache to achieve that?
I didnt check RAM usage, but site always work like express instead i
did clean coding and tried to optimize my code.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
> UnicodeDecodeError at /spezialprogramme/
> 'ascii' codec can't decode byte 0x80 in position 0: ordinal not in
> range(128)
try using smart_str, it it doesnt work then use less restrictive decode
--~--~-~--~~~---~--~~
You received this message because you are su
With using the cache_page decorator, I´m getting a Unicode Error on my
page:
UnicodeDecodeError at /spezialprogramme/
'ascii' codec can't decode byte 0x80 in position 0: ordinal not in
range(128)
Any ideas?
Thanks,
Patrick
--~--~-~--~~~---~--~~
You received thi
Lee Connell wrote:
> Will there be an issue using the django ORM in twisted, being an
> asynchronous framework? Is there going to be threading issues i need
> to be aware of?
Yes, there are issues. :-) The ORM, as the whole of Django, is synchronous
code, and not aware of the async events execut
On 8/27/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
> On 8/27/07, Kugutsumen <[EMAIL PROTECTED]> wrote:
> >
> > Why is my select is 2 times faster than objects.get(name=domain)?
> >
> > Why is there so much overhead?
>
> Have a look at the code. :)
Ah, one more thing-- try commenting out the si
On 8/27/07, Kugutsumen <[EMAIL PROTECTED]> wrote:
>
> Why is my select is 2 times faster than objects.get(name=domain)?
>
> Why is there so much overhead?
Have a look at the code. :)
> d = Domain.objects.get(name=domain) [...]
> Checked 9 domains at 1434 domain/s
>
> Now if instead I just
I´ve just used Fredriks cache view (http://effbot.org/zone/django-
memcached-view.htm) and now I´d like to additionally display all
cached sites/fragments.
Question is: How do I get all the sites/fragments currently in cache?
Thanks,
patrick
--~--~-~--~~~---~--~~
how can I add my custom options to the Meta model class?
--
Lic. José M. Rodriguez Bacallao
Cupet
-
Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo
mismo.
Recuerda: El arca de Noe fue construida por aficionado
hey
i want to make a link in my template dynamic. e.g. I want to click on
a "rubric" that links to a view that displays all the content. I have
the following URL patterns to reach the rubric: /rubric/view and to
reach the content /bullet///view --> the link i
need in the template that renders th
Austin Govella skrev:
> 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...)
>
G
could you please be more specific?
On 8/25/07, Michael Elsdoerfer <[EMAIL PROTECTED]> wrote:
>
>
> I needed a very similar thing and I ultimately decided to use a "type"
> char
> field in the base model that would contain the model name of the subtype.
>
> Michael
>
> > -Original Message-
This is a very broad question, with some very ill-defined adjectives :-)
Generally, given enough resources then Django can scale up to websites
of 'enterprise' (what does that actually mean?) level. As is stated in
the FAQ [1], Django sites have happily held up to million hits/hour
slashdottings.
On 27-Aug-07, at 4:07 PM, Graham Dumpleton wrote:
>> in for more RAM?
>
> BTW, have you also made sure you have read:
>
> http://blog.webfaction.com/tips-to-keep-your-django-mod-python-
> memory-usage-down
yes
>
> Maybe your size problems are due to not turning debug off.
it's off
--
re
On 27-Aug-07, at 3:05 PM, Iapain wrote:
> Yes it is, I am running a huge site on webfaction 40 MB, performance
> wise its excellent.
what is your RAM usage? How did you tweak apache to achieve that?
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
--~--~-
On Aug 27, 12:57 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a site on WebFaction with 40 MB RAM. It is a very small site
> in the sense that it is used for administering an organisation, so
> would have just 2-3 users at a time, mainly doing admin stuff. The
> only load is w
Steven Armstrong skrev:
> Chris Hoeppner wrote on 08/25/07 18:40:
>
>> Hi there!
>>
>> I was just wondering how to dynamically "or" together an indetermined
>> quantity of Q objects. They're constructed from a string like q=a+b+c,
>> which would get stiched together as "(Q(field=a) | Q(field=b)
In case you didn't read it before: Here is very enlightening summary
of things you can do with user model:
http://www.amitu.com/blog/2007/july/django-extending-user-model/
regards
--
Jakub Wiśniowski
--~--~-~--~~~---~--~~
You received this message because you a
Yes it is, I am running a huge site on webfaction 40 MB, performance
wise its excellent.
On Aug 27, 7:57 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a site on WebFaction with 40 MB RAM. It is a very small site
> in the sense that it is used for administering an organisation
ComboField takes a list of fields that should be used to validate a
value, in that order.
>>> f = ComboField(fields=[CharField(max_length=20), EmailField()])
If you just need a dropdown select then use choiceField
>>>t = [('test','select')]
>>>f = forms.ChoiceField(choices=t)
On Aug 23, 4:47 pm
Hello,
I don't know how to do it, I have the same problem.
I manage to do it defining the combo with the select html tag in the
template directly but what I really want to use it in the way you
explain (with form.ComboField).
Any ideas?
On 23 ago, 12:47, altahay <[EMAIL PROTECTED]> wrote:
> Hel
I need a clear info on why Python is good for enterprise web
developement .
Can Python be used for a website having several 100 page hits /sec ?
I am not bothered of coding complexity .
How about linux OS, ,Python and
DB2 express edition for webdevelopement?
Ambrose
PeterMary.com -- coming soo
On Aug 27, 4:47 pm, Paul Rauch <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Kenneth Gonsalves schrieb:> Hi,
>
> > I have a site on WebFaction with 40 MB RAM. It is a very small site
> > in the sense that it is used for administering an organisation, so
> > would
Why is my select is 2 times faster than objects.get(name=domain)?
Why is there so much overhead?
d = Domain.objects.get(name=domain) [...]
Checked 9 domains at 1434 domain/s
Now if instead I just do:
cursor.execute("""SELECT id,name from "DNS_domain" WHERE name='%s'
"""
% domain)
row = cu
62 matches
Mail list logo