View only django admin

2009-11-14 Thread Low Kian Seong
to edit records taken away. Hacking the admin stuff is do-able but then if there is something simpler I would opt for that. Any suggestions? Thanks in advanced. -- Low Kian Seong blog: http://lowkster.blogspot.com -- You received this message because you are subscribed to the Google Groups

Re: render_to_response taking 50 seconds!

2009-11-03 Thread Low Kian Seong
omehow it fails to capture the right data and display it. > > it displays the amount of time taken for all of the rendering steps. > It will defiantly help you narrow down the major culprits. > > On Nov 3, 5:12 am, Low Kian Seong <django@gmail.com> wrote: >> Pretty much confi

Re: render_to_response taking 50 seconds!

2009-11-03 Thread Low Kian Seong
t; > On 3 nov, 09:09, Low Kian Seong <django@gmail.com> wrote: >> But I am confused here. How do iterate through the data another time? >> Do I call the select_related in my views.py code like: >> >> manager_info = found_entries.select_related() >> >

Re: render_to_response taking 50 seconds!

2009-11-03 Thread Low Kian Seong
On Tue, Nov 3, 2009 at 3:41 PM, James Bennett <ubernost...@gmail.com> wrote: > > On Tue, Nov 3, 2009 at 1:17 AM, Low Kian Seong <django@gmail.com> wrote: >> There is a query page where the start_date and end_date is being sent. >> Then the do_defender_advance

Re: render_to_response taking 50 seconds!

2009-11-03 Thread Low Kian Seong
com> wrote: > > Your model was not-so-good Python/Django code style so it was bit hard > to read but... > > Low Kian Seong kirjoitti: >> On Tue, Nov 3, 2009 at 3:07 PM, Jani Tiainen <rede...@gmail.com> wrote: >>> Low Kian Seong kirjoitti: >>>&

Re: render_to_response taking 50 seconds!

2009-11-02 Thread Low Kian Seong
On Tue, Nov 3, 2009 at 3:07 PM, Jani Tiainen <rede...@gmail.com> wrote: > > Low Kian Seong kirjoitti: >> On Tue, Nov 3, 2009 at 1:33 PM, Jani Tiainen <rede...@gmail.com> wrote: >>> Low Kian Seong kirjoitti: >>>> I have about 3k plus record in

Re: install help please.

2009-11-02 Thread Low Kian Seong
, etc. Open up a msdos terminal, cd into the untar directory and run the command 'python setup.py install'. Make sure though before this you can run the 'python' command from the command line. > > can i handle this?? thanks > > > > -- Low Kian Seong blog: http://lowkster.blogspot.com --~

Re: render_to_response taking 50 seconds!

2009-11-02 Thread Low Kian Seong
On Tue, Nov 3, 2009 at 1:33 PM, Jani Tiainen <rede...@gmail.com> wrote: > > Low Kian Seong kirjoitti: >> I have about 3k plus record in my db table and am trying to do a >> simple render_to_response of a template sending it the results of a >> query. I debugged this

render_to_response taking 50 seconds!

2009-11-02 Thread Low Kian Seong
I have about 3k plus record in my db table and am trying to do a simple render_to_response of a template sending it the results of a query. I debugged this and found that the total time taken for an operation like this is 50 seconds! Is there anyway to speed this up? -- Low Kian Seong blog

Re: Status of support for compound keys

2009-05-22 Thread Low Kian Seong
On Sat, May 23, 2009 at 11:01 AM, Alex Gaynor <alex.gay...@gmail.com> wrote: > > > On Fri, May 22, 2009 at 9:57 PM, Low Kian Seong <django@gmail.com> > wrote: >> >> Dear all, >> >> Does anyone know what is the status of support for

Status of support for compound keys

2009-05-22 Thread Low Kian Seong
Dear all, Does anyone know what is the status of support for compound primary keys in Django? Thanks. -- Low Kian Seong blog: http://lowkster.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: Ruby on Rails vs Django

2008-12-06 Thread Low Kian Seong
he mapping between urls >> and views (plain functions taking a ``request`` object as first param). > > s/plain functions/callable objects/ > > Remember that classes are callable too, and that Python let you define > your own callable types. > > (snip) > > >

Re: Excel Generating Report

2008-12-06 Thread Low Kian Seong
) > > >response = HttpResponse(temp, mimetype='application/vnd.ms-excel') >response['Content-Disposition'] = 'attachment; > filename=report_school.xls' >return response > > > -- Low Kian Seong blog: http://lowkster.blogspot.com -

Re: How to create a form with dynamic number of fields?

2008-11-16 Thread Low Kian Seong
dlers > to the form that django is aware of, thus you get all the benefits of > using the form framework. Let me know if this is a bit thick and I'll > be happy to explain it and perhaps blog a more coherent example. > > --Ryan > > > > > > -- Low Kian Se

How to create a form with dynamic number of fields?

2008-11-15 Thread Low Kian Seong
Dear all, Could anyone here please let me know of the logic or example of doing a form with dynamic number of fields (ie. a field with a 'Add more field' button). I know how to do it using javascript. However it's the logic behind that gets me. Suggestions? -- Low Kian Seong blog: http

Re: Two related select boxes, update the second depending on the first

2008-11-11 Thread Low Kian Seong
several options.Then, depending on this selection, update > (maybe through ajax) the values available on the second one. > > > Could anyone give me some guidelines or documentation about how is the > best way to do this? > > > Thanks a lot. > > > > &

Re: ' Change History' for audit, compliance

2008-11-11 Thread Low Kian Seong
udit and >> Compliance purposes. >> >> >> An application should provide information who changed what data, when >> did they change the data , the old value and the new value etc >> >> >> Can Django help automate this? >> >> >&g

help regarding generic views

2008-11-05 Thread Low Kian Seong
ed to http://localhost/stocks_edit and bombs plus it's not updated. Please let me know if I am missing out on something important here. P/S - For Create and Delete using a similar syntax it works fabulously. Thank you in advance. -- Low Kian Seong blog: http://lowkster.bl

custom query as the choices for dropdown

2008-11-05 Thread Low Kian Seong
Dear all, In the quest to build my web sales inventory system, I want to specify that only stock that are available be listed in the dropdown. So my question is can I use a custom query to feed the choices for my field? Thank you. -- Low Kian Seong blog: http://lowkster.blogspot.com

Re: How to use post_save signal

2008-11-05 Thread Low Kian Seong
My code is here http://dpaste.com/88831/ It's not working I really don't know why the other part of the post_save is not even being executed On Wed, Nov 5, 2008 at 4:04 PM, Antoni Aloy <[EMAIL PROTECTED]> wrote: > > 2008/11/5 Low Kian Seong <[EMAIL PROTECTED]>: >> >&

Re: align a ModelForm

2008-11-04 Thread Low Kian Seong
contrib/admin/templates/admin/includes/fieldset.html file. > I tried it but failed. How can i specify the fieldset tags by not > create any fieldsets using ModelAdmin. > I can't use ModelAdmin for creating my own form to display it in my > own page. > Is there any mistake from me? &

Re: align a ModelForm

2008-11-04 Thread Low Kian Seong
>> Suggestion:http://docs.djangoproject.com/en/dev/ref/contrib/admin/http://groups.google.com/group/django-users/browse_thread/thread/536e... >> >> HTH, >> Thomas >> >> -- >> Thomas Guettler,http://www.thomas-guettler.de/ >> E-Mail: guettli (*) t

How to use post_save signal

2008-11-04 Thread Low Kian Seong
the signals and post_save? It seems like a very powerful component of the django architecture. Thank you in advance. -- Low Kian Seong blog: http://lowkster.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Overriding admin templates

2008-11-01 Thread Low Kian Seong
http://www.djangobook.com/en/1.0/chapter17/ On Sat, Nov 1, 2008 at 6:20 PM, Lars Stavholm <[EMAIL PROTECTED]> wrote: > > Low Kian Seong wrote: >> You are supposed to put the admin template you want to override in >> your own template directory definition in settings.py

Re: Help to Upload image

2008-11-01 Thread Low Kian Seong
> ) > --- > > Hope this helps. > > > Cheers, > > Giles > > -- > Giles Thomas > MD & CTO, Resolver Systems Ltd. > [EMAIL PROTECTED] > +44 (0) 20 7253 6372 > > Try out Resolver One! <http://www.resolversystems.com/

Re: Using Django

2008-11-01 Thread Low Kian Seong
Finding out a bit about urls.py and how it functions would do a world of good. It is very flexible and powerful once you learn how to wield it. Low Kian Seong http://lowkster.blogspot.com On Sat, Nov 1, 2008 at 5:20 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hello,

Re: multiselect populated by another app

2008-11-01 Thread Low Kian Seong
I think this might be useful: http://www.zoia.org/blog/2007/04/23/using-dynamic-choices-with-django-newforms-and-custom-widgets/ On Fri, Oct 31, 2008 at 5:36 AM, webcomm <[EMAIL PROTECTED]> wrote: > > Bump. > > There must be a way to do this, right? I have looked all over... the >

Re: Overriding admin templates

2008-11-01 Thread Low Kian Seong
You are supposed to put the admin template you want to override in your own template directory definition in settings.py So, if you defined it as /home/stava//template/admin/change_list.html On Sat, Nov 1, 2008 at 5:32 PM, Lars Stavholm <[EMAIL PROTECTED]> wrote: > > I'd like to override part

Re: Help regarding Login form in Django

2008-10-30 Thread Low Kian Seong
Why not use the login.html of the admin interface? {% extends "admin/base_site.html" %} {% load i18n %} {% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/login.css{% endblock %} {% block bodyclass %}login{% endblock %} {% block content_title %}{% endblock %} {% block

Re: Noon Help

2008-10-27 Thread Low Kian Seong
This sounds good. Keep me informed. I am currently writing a carpet inventory based on django. On Mon, Oct 27, 2008 at 2:27 PM, Jeff Anderson <[EMAIL PROTECTED]> wrote: > Johnny Utah wrote: >> Hi Guys, >> >> If I'm posting this on the wrong site, my apologies. >> >> I'm a beginner to both Python

Re: Can python/django match the features of php/zend framework?

2008-10-26 Thread Low Kian Seong
guess it does: http://mail.python.org/pipermail/python-list/2007-July/448007.html On Mon, Oct 27, 2008 at 5:24 AM, walterbyrd <[EMAIL PROTECTED]> wrote: > > I was going to go with zend framework, then I read about php using "\" > character as it's namespace separator. > > A few things I like

datetime widget without admin

2008-10-25 Thread Low Kian Seong
Dear all, I am using generic views to create my forms without using the admin interface. When I try to recreate the form in my template using the form function: {{ form.as_p }} Everything is okay except that my date fields have no datepicker. My question is there a way to re-create the admin

Re: Breaking up models into smaller files

2008-10-25 Thread Low Kian Seong
s.py >> etc. >> >> # __init__.py >> from stocks import StockModel >> from customers import CustomerModel >> etc. >> >> Now you can still use the same import commands as before, and syncdb should >> be able to find them as well. >> >

Breaking up models into smaller files

2008-10-25 Thread Low Kian Seong
I am trying to build an app in django which has a few components: 1. Stocks 2. Customers and 3. Sales I noticed that my models.py is getting huge and unwieldy. I tried digging around but could not find anything good but is there a guide on properly breaking a huges models.py into smaller chunks

Re: admin DATE_FORMAT not working?

2008-10-24 Thread Low Kian Seong
Maybe this would shed some light: http://code.djangoproject.com/ticket/2203 On Fri, Oct 24, 2008 at 4:57 PM, Lars Stavholm <[EMAIL PROTECTED]> wrote: > > I've got... > > TIME_ZONE = 'Europe/Stockholm' > DATE_FORMAT = "Y-m-d" > TIME_FORMAT = "H:i" > DATETIME_FORMAT = DATE_FORMAT + " " +

Re: css

2008-10-24 Thread Low Kian Seong
Read up on serving static files from django. The documentation is quite complete and you should be up and on your way in no time by just adapting examples from there. On Fri, Oct 24, 2008 at 2:46 PM, srini <[EMAIL PROTECTED]> wrote: > > Dear users, > >I am beginner in Djago, Well i

Add more details into history

2008-10-23 Thread Low Kian Seong
Dear all, I want to extend django's history function to show more information about activities inside the admin interface. I want to add in the detail of what is the original value of a field that has been changed and the value that it has been changed into. Can someone tell which part of django

Re: alternative for foreignkey fieldset

2008-10-19 Thread Low Kian Seong
Just curious but has anyone done this is a production environment? On Sun, Oct 19, 2008 at 1:05 PM, Russell Keith-Magee <[EMAIL PROTECTED] > wrote: > > On Sun, Oct 19, 2008 at 2:40 AM, Low Kian Seong <[EMAIL PROTECTED]> > wrote: > > Dear all, > > > > Is

alternative for foreignkey fieldset

2008-10-18 Thread Low Kian Seong
Dear all, Is there another form the foreignkey field can take besides the dropdown? I mean if there are 10,000 enteries for a particular foreign key and I am not using the admin interface won't it slow things down? Thanks. --~--~-~--~~~---~--~~ You received this