Okay it seems that specifying which Foreign-Keys it should follow solves
the problem.
Is this a known issue and can I be sure that this won't cause any
further trouble !?
Von: django-users@googlegroups.com
[mailto:django-users@googlegroups.com] Im Auftrag von Szabo, Patrick
(LNG-VIE)
Gesendet
Thank you, i could cut my queries in half which brings almost a second J
Unfortunately the function seems to effect the results.
If I run the query with select_related() I get 151 objects.
Without select_related() I get 199.
Is there something I can to to overcome this ?!
Von: djang
Thank's for the hints...i'll check it out !
. . . . . . . . . . . . . . . . . . . . . . . . . .
Ing. Patrick Szabo
XSLT Developer
LexisNexis
Marxergasse 25, 1030 Wien
mailto:patrick.sz...@lexisnexis.at
Tel.: 00431 534521573
Fax: +43 (1) 534 52 - 146
-Ursprüngliche Nachricht-
Von:
Hey Renout,
thanks for your answer.
But then I would have something like
(Carrots, Flavor,2.0)
as the result
instead of the desired
(Carrots, Flavour, 2.0)
(Carrots, Smell, 0.0)
(Carrots, Usability, 0.0)
(Carrots, Size, 0.0)
or
(Carrots, Flavour, 2.0)
(Carrots, Smell, null)
(Carrots, Usability
Dear group,
I have two models in a foreign key relation. The 'master' table is
extremely simple, having only the primary key field. The child table
has multiple fields. (The rationale for the master table is that it
has FK relations to a number of otherwise unrelated tables.)
My use case is that
That is what I sort of assumed. You created the table with syncdb, changed
the models.py for it and ran syncdb, which does nothing if the table
already exists.
On Mon, Dec 5, 2011 at 5:04 PM, Reinout van Rees wrote:
> On 06-12-11 01:24, Marc Edwards wrote:
>
>> DatabaseError at/admin/bookmarks/e
So, yes, I know one can combine template filter arguments by quoting
them into a single concatenated string... But what if one needs to do
something that amounts to the following?
{% for object in object_list %}
{{ some_other_var|custom_filter(constant_string, object.field)|
some_other_filter
On 06-12-11 01:24, Marc Edwards wrote:
DatabaseError at/admin/bookmarks/eda_appcatalog/
no such column: bookmarks_eda_appcatalog.eda_app_id
The "eda_app_id" colum is what Django uses to store the foreign key. You
probably added the foreign key after creating the EDA_AppCatalog class.
Your sy
Even when I delete the class definition, re-sync the db, and then re-
define the object, even setting the primary_key=True on a new
CharField, I am still receiving the same error.
Can it be that the database file has become corrupted in some manner
for this object. I have not modified my SQLite f
On Dec 5, 6:05 am, Tsung-Hsien wrote:
> I have been delete the "#, fuzzy" and remain the "#, python-format",
> but the string still show English.
You do need to remove the ", fuzzy" in order for the translations to
be used.
But you also need to recompile the .mo files after you make any
changes t
This is the confusing part. The EDA_AppCatalog imports from my
bookmarks package with no problem.
My class definition for this object has only 1 field, a ForeignKey to
an EDA_App.
I know that the Object Model will be assigning an "ID" to the object
when it stores it in the database. I am not as
Don't mean to sound remedial, but have you verified that the table
bookmarks_eda_appcatalog exists and that it has a column named eda_app_id?
Did you use manage.py syncdb to create the tables?
Furbee
On Mon, Dec 5, 2011 at 4:24 PM, Marc Edwards wrote:
> I am receiving the following error from t
I am receiving the following error from the Django debugger when
trying to access my EDA_AppCatalog object. My class definition is
listed below. I have similar defined objects that are working with no
problem, but I can't seem to clear this error message up.
Thanks, Marc
DatabaseError at /admin
On 05-12-11 23:10, wgis wrote:
Hi guys,
I'm trying to solve this without raw SQL, from the past 4/5 days.
I've been also researching a lot to understand more complex queries in
django so I would realy appreciate your help since I plan to continue
using django in my projects.
I have a:
class V
On Tue, Dec 6, 2011 at 6:48 AM, Vitaliy wrote:
> Hi,
>
> seems http://djangopeople.net gone, anyone know if going to be up or
> who is running it ?..
> I just lost one contact that I definitely know exist on that site :(
Hi Vitaly,
djangopeople.net has historically been managed by Simon Willison
http://www.networksolutions.com/whois-search/djangopeople.net
On Mon, Dec 5, 2011 at 5:48 PM, Vitaliy wrote:
> Hi,
>
> seems http://djangopeople.net gone, anyone know if going to be up or
> who is running it ?..
> I just lost one contact that I definitely know exist on that site :(
>
> --
> You
Hi,
seems http://djangopeople.net gone, anyone know if going to be up or
who is running it ?..
I just lost one contact that I definitely know exist on that site :(
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send emai
Hi guys,
I'm trying to solve this without raw SQL, from the past 4/5 days.
I've been also researching a lot to understand more complex queries in
django so I would realy appreciate your help since I plan to continue
using django in my projects.
I have a:
class VoteContext(models.Model):
Thanks all -
I stepped away from this issue for a few days. I am confident this
thread will point me in the right direction.
I did notice with nmap I am getting:
PORT STATE SERVICE
11211/tcp closed unknown
I will be digging into this issue again soon and this thread helps!
Thanks again
I would like to create my choice fields in my models according to a
hierarchy of conditions, but I can't think of how to specify this in
Python.
For example...pseudo code...
class mod1(models.Model):
choice1 = (
('a', 'A'),
('b', 'B'),
)
choice_a_if_choice1_is_A = (
I try to make a very simple cache usage:
myquery =
UserProfile.objects.select_related('user').filter(status__exact=1).values_list('user__username',
'q_points').order_by('-q_points')[:50]
cache.set('test_cache', myquery, 3600)
print cache.get('test_cache')
I get an error:
UserProfile has no field
heya,
Hmm, I was previously under the impression that for these sorts of things
(importing and instantiating models from CSV), the recommended way to
create a ModelForm, and pass each line of the CSV through that, and have
that handle model validation for you.
In our case, we have a CSV file,
On Mon, Dec 5, 2011 at 10:07 AM, sebastien piquemal wrote:
> Could you post a link to a place where class-based views are being
> criticized ? And also in what sense are they convoluted ?
i have previously expressed some problems with CBVs, maybe not so
solid as criticism; but i understand the po
On Mon, Dec 5, 2011 at 12:37 PM, Reinout van Rees wrote:
> On 03-12-11 19:56, Tobia Conforto wrote:
>>
>> Here is the View base class:http://dpaste.com/hold/665528/
>
> That link will expire in a month, so that's not really suited to posting on
> a mailinglist that people might still read a month
On Mon, Dec 5, 2011 at 10:52 AM, anthony tresontani
wrote:
> I am using Django 1.3, django-nose, sqlite inmemory database.
>
> I tried with TestCase,TransactionTestCase, commit_on_success
> (decorator and context manager) and commit_manually. None of them
> worked.
i'm successfully testing transa
On 03-12-11 19:56, Tobia Conforto wrote:
Here is the View base class:http://dpaste.com/hold/665528/
That link will expire in a month, so that's not really suited to posting
on a mailinglist that people might still read a month from now.
I think most of those copy-paste sites have a "keep for
http://pypi.python.org/pypi/django-debug-toolbar will show the number of
queries, time taken to query, and allow you to see the stack trace for the
code that caused the query to be executed.
Hope that helps,
Tim.
> On Dec 5, 2011, at 3:18 AM, Szabo, Patrick (LNG-VIE) wrote:
>
>> Okay that toolba
Patrick,
try to use select_related() method instead of only filter() when you get a
list of elements, e.g. :
queryset = Model.objects.filter().select_related()
by this way you'll get only one query instead 800
good luck!
Felipe
2011/12/5 Nikolas Stevenson-Molnar
> It would help to know a li
It would help to know a little more about your code here. Could you give some
examples?
_NIk
On Dec 5, 2011, at 3:18 AM, Szabo, Patrick (LNG-VIE) wrote:
> Okay that toolbar is really useful and also looks kind of nice J…Thanks for
> that.
> I’ve already found the problem….somehow my app trigge
Hey Guys,
I am trying to test a transaction rollback in a unit test and it seems
to not work properly.
I am using Django 1.3, django-nose, sqlite inmemory database.
I tried with TestCase,TransactionTestCase, commit_on_success
(decorator and context manager) and commit_manually. None of them
work
2011/12/5 Brian Schott
> What's the best dangothonic way to break up models.py or views.py for that
> matter.
> 1. Create a models.py or views.py at the top level that does a bunch of
> imports? Explicitly or progrmmatically by looping over files?
> 2. Expose the hierarchy to the caller. Ex: fr
Hi all,
I've recently been using the __in filter, and it's pretty nifty.
However, it seems that nesting any of geodjango's spatial filters with
the __in filter is busted. This ticket:
https://code.djangoproject.com/ticket/17314 explains the behavior in
detail, but the précis is: "things =
Thing.o
Hi Tobia !
Could you post a link to a place where class-based views are being
criticized ? And also in what sense are they convoluted ?
Personally, I have started using the class-based views heavily as soon
as they were released, and I think they are great. Very flexible.
However, I'll tell you w
With select related, hole queries can be ommitted but this time for
every score object one hole object will be created. so there will be
alot of hole objects.
On Dec 5, 12:18 pm, Håkon Erichsen wrote:
> 2011/12/5 kenneth gonsalves
>
> > The code looks simple to me, but to analyse 10,000 rounds
First of all You are queryin everything that you have on database for
this view and making django model objects from those. For a large db
this will run very slow and for larger dbs, it will throw memmory
exception.
Try something like this:
for hole in Hole.objects.filter(tee_course=club):
...
That's usually a bad sign when other programmers start naming saints when
reviewing your code :-). I have similar code explosion issues in a models.py
file in a site I'm building.
What's the best dangothonic way to break up models.py or views.py for that
matter.
1. Create a models.py or v
On Sat, Dec 3, 2011 at 4:39 AM, gintare wrote:
> Hello,
>
> Could you please delete all my posts. I look through them and copied
> all needed information. I am not able to find the new questions among
> old messages. After deletion the search with my name as a keyword will
> give me the latest que
Thank you!
the default character of MySQL does not utf-8, so after altering the
character, the message can show on the page.
However, the message shows only English, except I don't use the %
(email)s.
I have been delete the "#, fuzzy" and remain the "#, python-format",
but the string still show Eng
On Sun, Dec 4, 2011 at 2:53 AM, Karen Tracey wrote:
> On Sat, Dec 3, 2011 at 9:37 PM, Nathan McCorkle wrote:
>>
>> when you say 'as long as you don't use the ORM for inserts',
>
>
> You do not want to be building and saving objects individually with the ORM.
> You want to be using some form of bu
2011/12/5 kenneth gonsalves
> The code looks simple to me, but to analyse 10,000 rounds of golf
> (1,80,000 hole scores) my 2 GB laptop takes 20 minutes. Would this be
> considered normal - or slow? If slow, ideas on how to speed it up would be
> appreciated.
>
>
One thing you should look into i
Please look at the thread below:
http://stackoverflow.com/questions/873419/converting-to-safe-unicode-in-python
And you would want to make sure that database encoding style is already set
to UTF-8 (if applicable).
2011/12/5 Tsung-Hsien
> Hello
>I get the wrong message when type a string whi
Okay that toolbar is really useful and also looks kind of nice
J...Thanks for that.
I've already found the problemsomehow my app triggers 800 queries
just for a simple page.
Can I somehow find out which part of my code is causing those queries ?!
patrick
Von: django-users@googlegroup
On Mon, 2011-12-05 at 11:36 +0100, Masklinn wrote:
> >
> https://bitbucket.org/lawgon/djangogolf/src/a86c388f1795/web/views.py#cl-372
> analyses golf scores and calculates the relative difficulty of the holes. The
> code looks simple to me, but to analyse 10,000 rounds of golf (1,80,000 hole
>
On 2011-12-05, at 10:56 , kenneth gonsalves wrote:
> I have a function called holediff - the code is here:
>
> https://bitbucket.org/lawgon/djangogolf/src/a86c388f1795/web/views.py#cl-372
> analyses golf scores and calculates the relative difficulty of the holes. The
> code looks simple to me,
I have a function called holediff - the code is here:
https://bitbucket.org/lawgon/djangogolf/src/a86c388f1795/web/views.py#cl-372
analyses golf scores and calculates the relative difficulty of the holes. The
code looks simple to me, but to analyse 10,000 rounds of golf (1,80,000 hole
scores)
Thx a lot i will check this out !
Von: django-users@googlegroups.com
[mailto:django-users@googlegroups.com] Im Auftrag von Nikolas
Stevenson-Molnar
Gesendet: Montag, 05. Dezember 2011 08:14
An: Nikolas Stevenson-Molnar
Cc: django-users@googlegroups.com
Betreff: Re: Performance
A bit more se
46 matches
Mail list logo