Re: Keeping fields out of the Admin

2008-11-21 Thread maeck
be fund on the internet), however, if you still need to save the form, you nee dto keep that data in a hidden form field which opens up the possibility of people fiddling with POST data. Last resort, create your own custom view. maeck. On Nov 20, 11:46 pm, Lars Stavholm <[EMAIL PROT

Re: open source project management app that uses django?

2008-12-03 Thread maeck
pages. Maeck On Dec 3, 3:41 pm, Margie <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I would like to create a django project managment web app to be used > internally in my company.  I am a software developer, but have little > experience with web apps other than my rece

Re: exclude() method bug

2008-12-04 Thread maeck
If quantity is an integer field, should you not use the exclude as: Place.objects.exclude(itemplace__quantity = 0) If this is not it, please show us the models. Maeck On Dec 4, 4:58 am, Karantir <[EMAIL PROTECTED]> wrote: > Hi, > > I've just found strange django b

Re: open source project management app that uses django?

2008-12-04 Thread maeck
You can use the standard css from the admin for your both the admin pages as the custom reports. Just load the admin css and follow the same html. Works for me. Maeck On Dec 4, 12:04 am, Margie <[EMAIL PROTECTED]> wrote: > Thanks - yes, that is pretty much the approach I am plannin

Re: Reducing the number of my view's database queries

2008-12-08 Thread maeck
ried using raw SQL in you model? See: http://docs.djangoproject.com/en/dev/topics/db/sql/#topics-db-sql You do not have to use the Django ORM for this. Maeck On Dec 8, 7:43 am, DavidA <[EMAIL PROTECTED]> wrote: > If I undestand the problem correctly, in MySQL you could do this in > on

Re: templates database access

2008-12-08 Thread maeck
do this. Never your template. maeck On Dec 8, 2:25 am, Vicky <[EMAIL PROTECTED]> wrote: > Is there any way to insert, retrieve, delete and update tables in a > database from templates itself? --~--~-~--~~~---~--~~ You received this message because you ar

FormSet issue. Pre-populating from queryset

2008-12-11 Thread maeck
The example below is a snippet from a view where I use a form to show 'Parent' and a formset to show its 'Children'. If I get the children as a queryset and pass it on to the formsets initial property, it errors out with: 'Parent' object is not iterable InlineFormSet = formset_factory(InlineFor

Re: FormSet issue. Pre-populating from queryset

2008-12-11 Thread maeck
eldname as 'parent'. (I am using Django 1.0.2) Now I can pass the fieldnames as values('parent') for now, It would be easier if initial did not care if the _id is provided or not. Or am I missing something else? Maeck --~--~-~--~~~---~--~~ You rec

Re: FormSet issue. Pre-populating from queryset

2008-12-11 Thread maeck
. Thanks for Django, Maeck --~--~-~--~~~---~--~~ 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, send email

Issue with saving existing model when using inlineformsets

2008-12-12 Thread maeck
py in save_existing_objects". I noticed an older ticket that talked about the form.id missing on the template. If I am correct managementform takes care of that. I'd appreciate some pointers on this issue. Maeck ### View code class ClassPaymentProductForm(ModelForm): class Meta

Re: Issue with saving existing model when using inlineformsets

2008-12-12 Thread maeck
additional info: The error happens in formset.save() --~--~-~--~~~---~--~~ 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

Re: Issue with saving existing model when using inlineformsets

2008-12-13 Thread maeck
Fixed it. See the code here: http://www.djangosnippets.org/snippets/1246/ --~--~-~--~~~---~--~~ 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

Re: urlpatterns and generic views cheatsheet

2008-08-25 Thread maeck
I have printed this from scribd into a PDF and use it as such, no need for login. Works somewhat, cannot select the text from it (could have run some text recognition on it), but expect to find the original code or pdf somewhere soon (Google code maybe). maeck

Re: Multiple Primary Key

2009-04-07 Thread maeck
You can use the meta variable unique_together. This will do something like this, however, does not work for existing datamodels. On Apr 7, 9:06 am, Alex Gaynor wrote: > On Tue, Apr 7, 2009 at 11:53 AM, sandravigo wrote: > > > Hello, I want to know how I can to declarate multiple primary key i

Re: Django keeps growing, performance keeps dropping

2007-03-07 Thread maeck
First, what database platform do you use: MySQL or Postgres. MySQL has ways of logging slow queries (see /etc/mysql/my.cnf), this will give you an understanding of which queries are slow and you may be able to add indices where necessary. Secondly, if you use PHPmyAdmin it can tell you what tunin

newforms is_valid issue

2007-05-01 Thread maeck
I am confused about the following: If I get a previous saved record, transform it into a form instance and then create a form out of it, the data is not valid nor bound (see below). However, if I print out the form, all fields are populated correctly. Am I missing a step? Thanks, Marcel >>> d =

Re: newforms is_valid issue

2007-05-01 Thread maeck
herlands Addr1: Addr2: Addr3: Addr4: On May 1, 10:10 pm, maeck <[EMAIL PROTECTED]> wrote: > I am confused about the following: > If I get a previous saved record, transform it into a form instance > and then create a form out of it, the data is not valid nor bound (see > be

Re: newforms is_valid issue

2007-05-02 Thread maeck
set correctly (as it is if I do print d.__dict__). I am using Django 0.96 release version on mysql. M. On May 1, 11:19 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2007-05-01 at 21:21 -0700, maeck wrote: > > oops, did not use form_for_instance(d). > > However,