Re: A lots of foreign keys - Django Admin

2012-09-26 Thread rentgeeen
Also how can I use "select_related()" for admin? Should I put it in admin.py or settings like a setting or how? thanks On Wednesday, 26 September 2012 10:16:29 UTC-4, rentgeeen wrote: > > Here is mysql profiling: > > Results: > > Query: > > http://cl.ly/

Re: A lots of foreign keys - Django Admin

2012-09-26 Thread rentgeeen
Here is mysql profiling: Results: Query: http://cl.ly/image/0311392u0Z0S CPU Profile: http://cl.ly/image/2D210h0f1L06 On Wednesday, 26 September 2012 09:38:03 UTC-4, rentgeeen wrote: > > If you want I can send you a zip of the project > > On Wednesday, 26 September 2012 09

Re: A lots of foreign keys - Django Admin

2012-09-26 Thread rentgeeen
If you want I can send you a zip of the project On Wednesday, 26 September 2012 09:34:33 UTC-4, rentgeeen wrote: > > Here is the SQL again it overlap in previous post dont know why it posted > twice: > > *SELECT* `auto_type`.`id`, `auto_type`.`client_id`, > `auto_

Re: A lots of foreign keys - Django Admin

2012-09-26 Thread rentgeeen
*ON* (T15.`client_id` = T16.`id`) *ORDER* *BY* `auto_type`.`id` *DESC* * * *below are screenshots * On Wednesday, 26 September 2012 09:33:02 UTC-4, rentgeeen wrote: > > I am sorry I post the old one here is the update: > > Screenshot: > > http://cl.ly/image/2A3z1q2l053l >

Re: A lots of foreign keys - Django Admin

2012-09-26 Thread rentgeeen
y indicates that you're still doing foreign keys > against TITLE fields, which are strings. So something is definitely > still incorrect in your models. > > Make sure that your foreign keys really point to ID field (basically > that is leaving out > > 26.9.2012 9:24, rentgeeen ki

Re: A lots of foreign keys - Django Admin

2012-09-26 Thread rentgeeen
): list_display = ( 'title', ) admin.site.register(Project, ProjectAdmin) NO FKs then it runs in 0.01ms Screenshot: http://cl.ly/image/3w3D3g0h3h1A On Wednesday, 26 September 2012 01:25:05 UTC-4, Jani Tiainen wrote: > > 26.9.2012 3:08, rentgeeen kirjoitti: > > I did that already, removed

Re: A lots of foreign keys - Django Admin

2012-09-25 Thread rentgeeen
> Try changing all your models to "correct" and remove "field_to" > definitions from foreign keys. You should see quite a major speedup > after rebuilding the database. > > 25.9.2012 2:17, rentgeeen kirjoitti: > > Have a SQL problem, adding this model al

Re: A lots of foreign keys - Django Admin

2012-09-24 Thread rentgeeen
; queries so large that they end up being slow. > > In these situations, you can use the depth argument to > select_related() to control how many "levels" of relations > select_related() will actually follow" > > Hope this helps! > > cheers > L. >

Re: A lots of foreign keys - Django Admin

2012-09-24 Thread rentgeeen
ister(Page, PageAdmin) FOREIGN KEYS cannot be in list_display? How to optimize them? On Monday, 24 September 2012 19:17:45 UTC-4, rentgeeen wrote: > > Have a SQL problem, adding this model all works correctly, the problem is > in ADMIN. > > When I add the data just few to each t

A lots of foreign keys - Django Admin

2012-09-24 Thread rentgeeen
Have a SQL problem, adding this model all works correctly, the problem is in ADMIN. When I add the data just few to each table, by clicking on TYPE & PAGE in ADMIN the page is loading so slow, installed debug_toolbar and SQL took 17 seconds for the TYPE. When I tried the PAGE it gave me

Re: List viewable on the website

2012-06-04 Thread rentgeeen
Yes but thats like 2 years ago it was like django 0.96 that wont work On Monday, 4 June 2012 16:32:32 UTC-4, Nikolas Stevenson-Molnar wrote: > > Have you seen this? https://github.com/ojii/django-mailchimp > > _Nik > > On 6/4/2012 1:02 PM, rentgeeen wrote: > > Hel

List viewable on the website

2012-06-04 Thread rentgeeen
Hello, Would like to ask I have Django website and would like to do following: I know I can view LIST in mailchimp and also can download csv from mailchimp and upload to my host and view on the website. What I want to do, how can I make it automatic, best would be CSV or LIST sync with

Password protected URLs Django - choose which to be protected also in admin

2012-04-14 Thread rentgeeen
Hello, I have quite interesting problem with password protected content in Django. I can successfully protect my content or URLs in Django by using "@login_required" decorator. Example: **Urls.py** urlpatterns = patterns('', url(r'^(?P[a-zA-Z0-9_.-]+)/$', 'example.sort'), ) **Views.py**

Re: Internationalization and localization

2011-12-06 Thread rentgeeen
ed the approach described > > in http://snippets.dzone.com/posts/show/2979 . You must remember however > > that in the end Django Models are only a representation of the data in your > > database, you can design you database to handle multiple languages just as >

Internationalization and localization

2011-12-06 Thread rentgeeen
I have a question about internationalization - https://docs.djangoproject.com/en/dev/topics/i18n/internationalization/ What I want to how to translate stuff from DB, all at django official say is about static content, what I have only found is this: