Re: Forms, fields and widgets

2009-02-09 Thread Sergey Koval
Hello, I read mentioned thread and still can't figure out how I can pass arbitrary values to widgets. OK, I'll rephrase question (it was "task" in the previous email): how I can make widget that takes two values out of the model without changing ModelForm behavior or doing separate query in the

Re: looking for working example of mptt

2009-02-09 Thread Antoni Aloy
2009/2/10 laspal : > > hi, > Does anyone has a working example of django mptt. I am not able to > implement it. > On the docs you have the way to go. I've followed them and it works for me. Django-page-cms also uses it, so you can also look there. Hope it helps -- Antoni

Re: including non-editable fields in forms?

2009-02-09 Thread phuong
Ramdas S wrote: > I am looking at a solution oustide django-admin. > > I am in using forms and classic views > > Ramdas > > On Tue, Feb 10, 2009 at 11:28 AM, Malcolm Tredinnick > > wrote: > > > On Tue, 2009-02-10 at 11:05 +0530,

comparisons with java framework

2009-02-09 Thread igorlash
Hi everybody. I'm java developer , and I like comparing web frameworks. Members of django community talk a lot about easiness of django especially comparing with java frameworks. But they have not compared all aspects. And I want to compare one of them. As user of good web framework I want to

Re: including non-editable fields in forms?

2009-02-09 Thread Malcolm Tredinnick
On Tue, 2009-02-10 at 12:20 +0530, Ramdas S wrote: > I am looking at a solution oustide django-admin. > > I am in using forms and classic views The same answer still applies. It's really got nothing to do with non-editable fields. It's a separate problem. Malcolm

looking for working example of mptt

2009-02-09 Thread laspal
hi, Does anyone has a working example of django mptt. I am not able to implement it. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: including non-editable fields in forms?

2009-02-09 Thread Ramdas S
I am looking at a solution oustide django-admin. I am in using forms and classic views Ramdas On Tue, Feb 10, 2009 at 11:28 AM, Malcolm Tredinnick < malc...@pointy-stick.com> wrote: > > On Tue, 2009-02-10 at 11:05 +0530, Ramdas S wrote: > > I think in many practical cases, > > s/many/some

Re: including non-editable fields in forms?

2009-02-09 Thread Malcolm Tredinnick
On Tue, 2009-02-10 at 11:05 +0530, Ramdas S wrote: > I think in many practical cases, s/many/some (maybe)/ > you may require permissions also to be tied in. I have a case where a > form editing rights are tied to a some of the fields, ie employee > cannot edit certain fields, while managers

Re: including non-editable fields in forms?

2009-02-09 Thread Alex Gaynor
On Tue, Feb 10, 2009 at 12:35 AM, Ramdas S wrote: > I think in many practical cases, you may require permissions also to be > tied in. I have a case where a form editing rights are tied to a some of > the fields, ie employee cannot edit certain fields, while managers can edit

Re: including non-editable fields in forms?

2009-02-09 Thread Ramdas S
I think in many practical cases, you may require permissions also to be tied in. I have a case where a form editing rights are tied to a some of the fields, ie employee cannot edit certain fields, while managers can edit the fields in a form. How do we do such cases? I could not find a reliable

Re: ABC/MTI and Generic Date Based Views

2009-02-09 Thread seanbrant
Thanks I'll deal with the performance hit for now, and keep my figures crossed :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: ABC/MTI and Generic Date Based Views

2009-02-09 Thread Alex Gaynor
On Tue, Feb 10, 2009 at 12:22 AM, seanbrant wrote: > > Sorry about my initial post, Im new here. I'll try harder next time ;) > > I choose MTI and added a entry_type field to the main Entry model. > > > ...(note that this could turn > a Base.objects.all() query into O(n)

Re: ABC/MTI and Generic Date Based Views

2009-02-09 Thread seanbrant
Sorry about my initial post, Im new here. I'll try harder next time ;) I choose MTI and added a entry_type field to the main Entry model. > ...(note that this could turn a Base.objects.all() query into O(n) queries). Is there a way out of the box to preform joins up front, when going from

Re: including non-editable fields in forms?

2009-02-09 Thread Malcolm Tredinnick
On Mon, 2009-02-09 at 21:14 -0800, Margie wrote: > I have a model that contains a 'created' field where 'editable' is set > to False in the model. > > I'd like to display the created field in my form, but not allow it to > be modified. I tried putting it in > the include list for the form, but

Re: including non-editable fields in forms?

2009-02-09 Thread Alex Gaynor
On Tue, Feb 10, 2009 at 12:14 AM, Margie wrote: > > I have a model that contains a 'created' field where 'editable' is set > to False in the model. > > I'd like to display the created field in my form, but not allow it to > be modified. I tried putting it in > the

including non-editable fields in forms?

2009-02-09 Thread Margie
I have a model that contains a 'created' field where 'editable' is set to False in the model. I'd like to display the created field in my form, but not allow it to be modified. I tried putting it in the include list for the form, but that didn't seem to have any affect (it didn't display in the

Looking for CTO/ Tech. Lead NY Based Startup

2009-02-09 Thread steve8004
Hello: I'm hoping someone in the group can help identify a senior level manager who is familiar with a CMS called Ellington and knows Django inside and out. Here's a more detailed description: We're a startup offering a fun, dynamic and challenging experience within an entrepreneurial work

Question about Filtering on a Related model (I think) - with example code.

2009-02-09 Thread Almost George
On the following example models (actual models, removed of cruft that doesn't seem to apply) I'd like to add a "get_upcoming_events" method to Band like the one on Venue, but because of the relationship I'm not sure how to use the API/filter. (An Event has the same bands, at possibly different

Re: django admin not showing the models related data

2009-02-09 Thread Atishay
On Feb 9, 11:40 pm, Alex Gaynor wrote: > On Mon, Feb 9, 2009 at 11:36 PM, Atishay wrote: > > > I just added admin related info in models.py > > The models however do not show up in django admin. I am using 1.0.2 > > version currently. they were

Re: Strange 404 error in admin

2009-02-09 Thread Karen Tracey
On Mon, Feb 9, 2009 at 11:45 PM, Julien Phalip wrote: > > On Feb 10, 3:19 pm, Karen Tracey wrote: > > On Mon, Feb 9, 2009 at 4:17 PM, Julien Phalip wrote: > > > Hello again, > > > > > I finally fixed it with the following nasty hack: >

Re: Strange 404 error in admin

2009-02-09 Thread Julien Phalip
On Feb 10, 3:19 pm, Karen Tracey wrote: > On Mon, Feb 9, 2009 at 4:17 PM, Julien Phalip wrote: > > Hello again, > > > I finally fixed it with the following nasty hack: > > > class Entry(models.Model): > >        ... some fields ... > > >         objects =

Re: django admin not showing the models related data

2009-02-09 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 11:36 PM, Atishay wrote: > > I just added admin related info in models.py > The models however do not show up in django admin. I am using 1.0.2 > version currently. they were displaying properly in .97 version > > 31 > 32 def __str__(self):

Re: Subclass conflict with admin widgets

2009-02-09 Thread Karen Tracey
On Mon, Feb 9, 2009 at 5:18 PM, phoebebright wrote: > > Yes I see that, it's just if I don't put the custom form in it works > fine: > > class DirectoryAdmin(admin.ModelAdmin): > > >fieldsets = [ >(None, {'fields': ['cat','name','is_live']}),<

django admin not showing the models related data

2009-02-09 Thread Atishay
I just added admin related info in models.py The models however do not show up in django admin. I am using 1.0.2 version currently. they were displaying properly in .97 version 31 32 def __str__(self): 33 return "name: " +self.first_name + " " + self.mi + " " + \ 34

Django and jQuery trouble

2009-02-09 Thread min
Hi, everyone. I have a question for the following example. Firstly, in the view.py: def test_1(request, zipcode, pro): if zipcode == 'a' and pro == 'b': city = 'c' else: city = '' return HttpResponse(city) def test_0(request): return render_to_response('test_0.html', {})

Re: Strange 404 error in admin

2009-02-09 Thread Karen Tracey
On Mon, Feb 9, 2009 at 4:17 PM, Julien Phalip wrote: > Hello again, > > I finally fixed it with the following nasty hack: > > class Entry(models.Model): >... some fields ... > > objects = models.Manager() # Nasty hack >published =

Re: A ManyToMany Field question.

2009-02-09 Thread khsing
Alex, thanks, now it work. now have a new problem is may a group can contain itself, this will be a loop. how to avoid this condition? On Tue, Feb 10, 2009 at 11:28 AM, Alex Gaynor wrote: > > > On Mon, Feb 9, 2009 at 10:18 PM, khsing wrote: >> >>

Re: removing cached form fields

2009-02-09 Thread Louis Sayers
Ok, I'm not doing any django for the next couple of days, so will post when I have a watered down example (unless of course doing this solves the problem :)) On Feb 10, 4:36 pm, Malcolm Tredinnick wrote: > On Mon, 2009-02-09 at 17:17 -0800, Louis Sayers wrote: > > I've

Re: select_related(depth=5) not working in templates

2009-02-09 Thread Malcolm Tredinnick
On Mon, 2009-02-09 at 19:11 -0800, flyonthewall wrote: > So I have this piece of code question.answer_set.select_related > (depth=5) and the depth property doesn't work in a template so I'm > wondering how to limit the set to only 5 items. I think you are either not explaining what you are

Re: removing cached form fields

2009-02-09 Thread Malcolm Tredinnick
On Mon, 2009-02-09 at 17:17 -0800, Louis Sayers wrote: > I've got a django Form which contains a dictionary of strings. I've > given the form a submit button and a preview button. When the preview > button is pressed after entering some information, a POST is sent, and > the strings in the

django is not able to load a URL

2009-02-09 Thread Atishay
Hi I am using captcha [you would have seen my prev posts]. I have posted code at http://dpaste.com/118796/ when I run "python manage.py runserver " I get error that django is not able to locate a image file [09/Feb/2009 21:23:15] "GET /captcha/captchas/cP-29Cu/

Re: A ManyToMany Field question.

2009-02-09 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 10:18 PM, khsing wrote: > > I want design a group that can contain other groups, and one group can > belong many groups. > > I write such code below, but not right. > > class Group(models.Model): >groups = models.ManyToManyField(Group) > > any

Re: How to detect inactivity session time out?

2009-02-09 Thread Malcolm Tredinnick
On Sun, 2009-02-08 at 12:07 -0800, ydjango wrote: > I am setting inactivity session time out using - > a) request.session.set_expiry(900) and > b) SESSION_COOKIE_AGE = 900 > > I believe both work exactly the same way. Please correct me if they > have any different behavior. > >

A ManyToMany Field question.

2009-02-09 Thread khsing
I want design a group that can contain other groups, and one group can belong many groups. I write such code below, but not right. class Group(models.Model): groups = models.ManyToManyField(Group) any suggestion? or how to design such a group. thanks. -- A man live in jail and want to

Re: urlize

2009-02-09 Thread Malcolm Tredinnick
On Mon, 2009-02-09 at 07:29 -0800, Emily Rodgers wrote: > Hi, > > I have written a django app that manages 'change requests' (and > approvals) for IT infrastructure changes in our company, and I am > using the urlize filter when displaying certain fields (like > description of change, test plan

select_related(depth=5) not working in templates

2009-02-09 Thread flyonthewall
So I have this piece of code question.answer_set.select_related (depth=5) and the depth property doesn't work in a template so I'm wondering how to limit the set to only 5 items. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Question about INNER JOIN vs LEFT JOIN and some strange issue when model binds to in self through many-to-many relationship.

2009-02-09 Thread Malcolm Tredinnick
On Mon, 2009-02-09 at 06:56 -0800, AlexMVdovin wrote: > At first step I will describe my models: > > class Meter(models.Model): > id = models.IntegerField(primary_key=True) > > some stuff here... > > collector = models.ManyToManyField("self", > through='MeterCollector',

Re: Prepoplulate admin form with previously entered data

2009-02-09 Thread Adam Woodbeck
Would it be possible to extend the ModelForm for my encounter model, automatically filling the form when I add a new entry? On Feb 9, 9:51 pm, Adam Woodbeck wrote: > I'm building my first Django app and I've run into a roadblock.  I'm > hoping someone with more

Re: Problem with set_language generic view

2009-02-09 Thread Malcolm Tredinnick
On Sun, 2009-02-08 at 20:34 -0800, yav wrote: > Hello, > > I have a problem with the generic view set_language. I used it but it > doesn't change the language. I have read the doc but I didn't find > what is the problem. I have read the doc but I didn't find what is the > problem. I have setup

Prepoplulate admin form with previously entered data

2009-02-09 Thread Adam Woodbeck
I'm building my first Django app and I've run into a roadblock. I'm hoping someone with more knowledge of django 1.0 can point me in the right direction. What the app does is allow me to enter SOAP notes for each of my daily patient encounters. A good amount of the data I enter from visit to

Re: pre-populating multiplechoicefields with session data

2009-02-09 Thread Malcolm Tredinnick
On Sun, 2009-02-08 at 09:57 -0800, Bobby Roberts wrote: > Hi group. Please look at this view: > > # this form runs the search mechanism > def DoSearchForm (request): > if request.method =='POST': > form=SearchForm (request.POST) > if form.is_valid(): > try: >

Re: ABC/MTI and Generic Date Based Views

2009-02-09 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 9:11 PM, Malcolm Tredinnick wrote: > > On Sat, 2009-02-07 at 12:40 -0800, seanbrant wrote: > > Im have troubling figuring about a good solution for blog posts. I > > have created a ABC called Entry which Post, Link, Photo, Quote > > inherit. > >

Re: Extending the User model

2009-02-09 Thread Malcolm Tredinnick
On Sun, 2009-02-08 at 12:16 -0800, Patricio Palma wrote: > Greetings > > I've a model > class MyUser(auth.User): > location = meta.CharField(maxlength=100, blank=True) > > class META: > replaces_module = 'auth.users' > admin = meta.Admin( > list_display =

Re: Memory Leaks

2009-02-09 Thread Malcolm Tredinnick
On Sat, 2009-02-07 at 19:27 -0800, python6009 wrote: > Hi, > > I am using matplotlib/pyplot on my site to dynamically generate PNG > plots. And I am experiencing dramatic memory leaks. Within 10-15 > hits, my Apache process grows from 15-20M to 100M. Let's be accurate with the terminology

problems with django+fastcgi

2009-02-09 Thread Rodrigo Lazo
Hi everybody, I'm hosting my blog on asmallorange.com, and I've been having problems with my blog from the beginning, it takes too much to load the page and when access to my account using ssh I get that too many processes are running. I'm using fastcgi. I found that my error log is plagued

Re: ABC/MTI and Generic Date Based Views

2009-02-09 Thread Malcolm Tredinnick
On Sat, 2009-02-07 at 12:40 -0800, seanbrant wrote: > Im have troubling figuring about a good solution for blog posts. I > have created a ABC called Entry which Post, Link, Photo, Quote > inherit. It would help others to define a few terms here before leaping into the acronyms: ABC = "abstract

WeakForeignKey - on delete set null rather than delete me

2009-02-09 Thread felix
that old "django deleted my object!" thing plus solution (at bottom) class Venue(models.Model): pass class Event(models.Model): venue = models.ForeignKey(Venue,related_name='venue',blank=True,null=True) v = Venue.objects.create() e = Event.objects.create(venue=v) v.delete() the Event e

Re: unable to import imaging c module

2009-02-09 Thread Atishay
On Feb 9, 7:11 pm, Atishay wrote: > hi > > i am trying to use PIL, with Django to display Captcha. This could be > newbie stuff as I am new to python and PIL. > > I am getting following error when importing ImageFont. > > ImportError: The _imaging C module is not

Several 'virtual' fields controlled by an unique custom field ?

2009-02-09 Thread Alexandre Vaissiere
Hello, I have a model that looks like this : class Entry(models.Model): data = models.TextField() data_html = models.TextField(editable=False) def save(self): self.data_html = convert(self.data) super(Entry, self).save() It works fine, but an exception raised by

removing cached form fields

2009-02-09 Thread Louis Sayers
I've got a django Form which contains a dictionary of strings. I've given the form a submit button and a preview button. When the preview button is pressed after entering some information, a POST is sent, and the strings in the dictionary are automagically recovered (I assume that it's done using

unable to import imaging c module

2009-02-09 Thread Atishay
hi i am trying to use PIL, with Django to display Captcha. This could be newbie stuff as I am new to python and PIL. I am getting following error when importing ImageFont. ImportError: The _imaging C module is not installed I have the file though. [bash]# file PIL/_imaging.so

Pretty admin pages

2009-02-09 Thread djandrow
Hello all, I have just set up the admin pages for my site and if i use the built in server i get the admin with the nice templates, but if I display it on mod_python I just get the plain text, which is pretty hard to work with. I have these set up in the conf: SetHandler None

Re: How to handle an error that throws an alert box and make it show an AJAX error message instead?

2009-02-09 Thread Matías Costa
I love lightboxes http://particletree.com/features/lightbox-gone-wild/ If you enable the auth middleware you can do: {% if user.is_authenticated %} {% else %} {% endif %} or in the view return a 400 forbidden and just in javascript (jquery code): $.ajax({ url:"do_vote_url",

Re: Keep getting NameError at /admin/

2009-02-09 Thread djandrow
You need to remove the # from: # from django.contrib import admin # admin.autodiscover() I had the same thing earlier. Heres some more stuff about setting up the admin if you want to read it: http://docs.djangoproject.com/en/dev/intro/tutorial02/#intro-tutorial02 On Feb 9, 11:24 pm,

Re: Keep getting NameError at /admin/

2009-02-09 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 6:24 PM, claudio.br...@googlemail.com < claudio.br...@googlemail.com> wrote: > > > > On 9 Feb, 19:16, Daniel Roseman wrote: > > On Feb 9, 6:57 pm, "claudio.br...@googlemail.com" > > > > wrote: > > > Hi Alex > >

How to handle an error that throws an alert box and make it show an AJAX error message instead?

2009-02-09 Thread Shantp
I'm using Django and django-voting in an app I'm making. If a user who is not authenticated tries to vote, an alert box is displayed telling them they are not authenicated. How can I catch this error and make it into a more elegant AJAX display so I can show it right on the page when it happens?

Re: Keep getting NameError at /admin/

2009-02-09 Thread claudio.br...@googlemail.com
On 9 Feb, 19:16, Daniel Roseman wrote: > On Feb 9, 6:57 pm, "claudio.br...@googlemail.com" > > wrote: > > Hi Alex > > > Yes I have the line from django.contrib import admin" in urls.py > > You're going to need to post the whole

Re: python manage.py runserver giving strange error

2009-02-09 Thread Arnaud Delobelle
I've avoided the problem by using django-admin instead of manage.py... Which does not tell me what's gone wrong. -- Arnaud --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Exception in Django's Exception Handling

2009-02-09 Thread Russell Keith-Magee
On Tue, Feb 10, 2009 at 1:59 AM, Devel63 wrote: > > I'll see if I can extract some small subset and post the details. > > In the meantime, more info: the problem only occurs when an error is > encountered during a call in which the server will return a > HttpResponse('',

YUI Image Uploader - OK on Firefox/Mac but not elsewhere

2009-02-09 Thread phoebebright
Have been trying to get a RTE plugin working that will allow upload of images. The YUI verion is almost there but will not play well with browsers. The plugin from here http://allmybrain.com/2008/11/06/example-yui-image-upload-with-yui-260/ I modified to get Javascript to make an asynchronous

Re[2]: Forms, fields and widgets

2009-02-09 Thread Serge S. Koval
Hello Alex, Tuesday, February 10, 2009, 12:21:05 AM, you wrote: > I would recommend searching the dev list for a thread titled: "Controlling form/widgets output". Alex  Thanks, I was looking in django-users list and this topic was django-devel. --  Best regards,  Serge            

using the ImageField with the API

2009-02-09 Thread redmonkey
Hey everyone, I've got an interesting problem concerning file uploads. I'm building an online auction and my `Lot` links to a thin `LotImage` so that I can store multiple images of the lots: class Lot(models.Model): ... lot_number = models.PositiveIntegerField("Lot number")

Re: Forms, fields and widgets

2009-02-09 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 5:18 PM, Serge S. Koval wrote: > > Hello, > > I'm fairly new Django user, but have some background experience with > other frameworks. Sorry if this topic was discussed before, but I was > not able to find any mention of it. > > My question is

Forms, fields and widgets

2009-02-09 Thread Serge S. Koval
Hello, I'm fairly new Django user, but have some background experience with other frameworks. Sorry if this topic was discussed before, but I was not able to find any mention of it. My question is related to architectural decisions of the forms, fields and widgets. At the moment in Django,

Re: Subclass conflict with admin widgets

2009-02-09 Thread phoebebright
Yes I see that, it's just if I don't put the custom form in it works fine: class DirectoryAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['cat','name','is_live']}),< CAT FIELD STILL HERE AN OK ('Contact', {'fields':

python manage.py runserver giving strange error

2009-02-09 Thread Arnaud Delobelle
Hello django users, Today I have had this strange error: after a syntax error in a module I had to restart my development server. marigold:qmm arno$ python manage.py runserver /System/Library/Frameworks/Python.framework/Versions/2.5/Resources/ Python.app/Contents/MacOS/Python: can't open file

Re: Strange 404 error in admin

2009-02-09 Thread Julien Phalip
On Feb 10, 7:52 am, Julien Phalip wrote: > On Feb 10, 7:41 am, Alex Gaynor wrote: > > > I don't know what manager old forms admin used, but do you have a custom > > manager that blocks access to some objects. > > Thanks Alex for your reply. You've made

FormSet with non input-element data possible?

2009-02-09 Thread Info Cascade
Hi -- I'm creating a FormSet and want to include some data in the form output that is not an html input element. Some of the data I pass to the FormSet, which gets passed to the form, I just want to display, I don't want to put it into an HTML input element. I want it to be available in the

Re: Subclass conflict with admin widgets

2009-02-09 Thread Daniel Roseman
On Feb 9, 7:28 pm, phoebebright wrote: > I have implemented this solution successfully with a standard model, > but when I try to use it on one which is subclassed I get an error > because it is trying to validate the model before it knows about the > subclass.  I can

Re: Strange 404 error in admin

2009-02-09 Thread Julien Phalip
On Feb 10, 7:41 am, Alex Gaynor wrote: > I don't know what manager old forms admin used, but do you have a custom > manager that blocks access to some objects. Thanks Alex for your reply. You've made a really good point which helped me track this down. Here are the model

Re: writing a urlpattern for a form submission

2009-02-09 Thread Daniel Roseman
On Feb 9, 8:16 pm, kosuke wrote: > I'm sure this will come across as basic to many django users but it > has got me stuck so any helpful pointers would be appreciated.  I've > scoured the docs and come up empty.  Upfront apologies done now, > here's what I got: > > Using

Re: How to detect inactivity session time out?

2009-02-09 Thread ydjango
Any one with a clue on How do I detect time out in my app and give user a page that they have been timed out due to inactivity. I am usingrequest.session.set_expiry(900) , SESSION_COOKIE_AGE = 900 and django standard authentication using autheticate(), login() and logout(). On Feb 8,

Re: Strange 404 error in admin

2009-02-09 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 3:40 PM, Julien Phalip wrote: > > On Feb 9, 7:20 pm, Julien Phalip wrote: > > Hi, > > > > This is a strange case. I have a simple blog entry model which can be > > edited in the admin, from the URL that looks like: >

Re: Strange 404 error in admin

2009-02-09 Thread Julien Phalip
On Feb 9, 7:20 pm, Julien Phalip wrote: > Hi, > > This is a strange case. I have a simple blog entry model which can be > edited in the admin, from the URL that looks > like:http://www.example.com.au/admin/blog/entry/52/ > > Now, what is strange is that the link above returns

Re: user defined model

2009-02-09 Thread Dids
> This is extremely unlikely to work, not to mention very inefficient. > Can you let us know why you want to do this - what's your use case? We > might be able to suggest a better way of doing it. > -- > DR. Users define a set of data they're interested in. Give a mean to get the data (script,

writing a urlpattern for a form submission

2009-02-09 Thread kosuke
I'm sure this will come across as basic to many django users but it has got me stuck so any helpful pointers would be appreciated. I've scoured the docs and come up empty. Upfront apologies done now, here's what I got: Using django forms, i create a form which results in a submission string

Re: Question about media in outside forms

2009-02-09 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 12:00 PM, Robert Ramírez Vique wrote: > Hello, > > I have been working on some forms which has some ajax behaivour, and I use > some css and javascripts. This can be used inside a form with {{ form.media > }}, which outputs the html tags necessary to

Re: Best practice question: subclassing external app components

2009-02-09 Thread bruno desthuilliers
On 9 fév, 00:35, zinckiwi wrote: > Hi folks, > > I'm just starting to play with django-registration and I want to > subclass the RegistrationForm for a couple of cosmetic tweaks > (capitalising the labels on the fields -- there may be a simpler way > to do this, but indulge

Admin Image Handling - ability to display thumb and delete an image - one solution

2009-02-09 Thread phoebebright
In case this helps anyone, here is one implementation I have 4 pictures attached to each record but would work the same if only one. Uses sorl-thumbnails and based on snippet here: http://www.djangosnippets.org/snippets/934/ written by baumer1122 In models.py - used standard

Subclass conflict with admin widgets

2009-02-09 Thread phoebebright
I have implemented this solution successfully with a standard model, but when I try to use it on one which is subclassed I get an error because it is trying to validate the model before it knows about the subclass. I can work around this by defining an Admin class for each of the subclasses, but

Re: user defined model

2009-02-09 Thread Daniel Roseman
On Feb 9, 6:13 pm, Dids wrote: > Hi, > > I need to update the model.py file at run-time. > > Where can I find the file on disk from the views.py please? > > What I'm trying to do is : Open model.py , append a new class , invoke > syncdb. > > Thx > Dids, This is

Re: Keep getting NameError at /admin/

2009-02-09 Thread Daniel Roseman
On Feb 9, 6:57 pm, "claudio.br...@googlemail.com" wrote: > Hi Alex > > Yes I have the line from django.contrib import admin" in urls.py > You're going to need to post the whole urls.py. It's a bit hard to understand why you're getting that error if you do have that

Re: Keep getting NameError at /admin/

2009-02-09 Thread claudio.br...@googlemail.com
Hi Alex Yes I have the line from django.contrib import admin" in urls.py On 9 Feb, 16:20, Alex Gaynor wrote: > On Mon, Feb 9, 2009 at 11:11 AM, claudio.br...@googlemail.com < > > > > claudio.br...@googlemail.com> wrote: > > > Hi > > > I am new to django and have just

Re: checkboxInput values

2009-02-09 Thread Bobby Roberts
> What is the proper way to assign a value to a single checkbox?  Am I > just stuck with boolean and true/false?  That seems like a lot of > extra work on the back end. nevermind i just figured out to use a value attribute --~--~-~--~~~---~--~~ You received this

Re: signals in 1.0 problem: nesh django utils & django 1.0

2009-02-09 Thread Robocop
Holy crap it is! Thanks for the idea, i'm going to do a lil testing and verify everything works. Thanks again! On Feb 9, 10:21 am, Jake Elliott wrote: > hi robocop - > > is it enough to add the '**kwargs' syntax to your receiver function? > or is that already present? > >

Re: Looking to give presentation on Django at work

2009-02-09 Thread jeffself
I already have the demo in place. I just wanted to spruce it up with a presentation and wanted to know if something already existed that I could work from. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

checkboxInput values

2009-02-09 Thread Bobby Roberts
If i use the multiple Checkbox Input, It results in list of the items which were selected. My question is can you do the same thing for a single checkbox? As an old ASP guy I'd do this: I'm trying to do this in django by the following: #...snip forms.py el1_Choices = ( ('EN',

Re: signals in 1.0 problem: nesh django utils & django 1.0

2009-02-09 Thread Jake Elliott
hi robocop - is it enough to add the '**kwargs' syntax to your receiver function? or is that already present? like: def _save(self, **kwargs): ... and def delete(**kwargs): ... -jake On Mon, Feb 9, 2009 at 12:15 PM, Robocop wrote: > > Hello, > I've

user defined model

2009-02-09 Thread Dids
Hi, I need to update the model.py file at run-time. Where can I find the file on disk from the views.py please? What I'm trying to do is : Open model.py , append a new class , invoke syncdb. Thx Dids, --~--~-~--~~~---~--~~ You received this message because you

signals in 1.0 problem: nesh django utils & django 1.0

2009-02-09 Thread Robocop
Hello, I've recently been porting many projects to 1.0, but have hit a snag with the current one. I'm looking at an old project that uses nesh's django utils (mainly just the thumbnail image field model), and have been slowly porting the project (and by extension nesh's code) to 1.0. Now i have

Re: Extending the User model

2009-02-09 Thread Patricio Palma
Thanks, I owe you a chocolate bar I fix it class MyUser(User): chilean_rut = CLRutField(_('RUT'),unique=True) some_field = models.CharField(max_length=50) voalá I don't really need a PK, my mistake Thanks again. --~--~-~--~~~---~--~~ You received this

Re: UnicodeEncodeError with gettext

2009-02-09 Thread Karen Tracey
On Mon, Feb 9, 2009 at 12:21 PM, Scott wrote: > > Thanks for the quick reply - does anyone know if Django 1.0 is patched > into the Google App Engine Django Helper? > Per http://code.google.com/p/google-app-engine-django/source/browse/trunk/CHANGES any reasonably current

Re: UnicodeEncodeError with gettext

2009-02-09 Thread Scott
Thanks for the quick reply - does anyone know if Django 1.0 is patched into the Google App Engine Django Helper? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Looking to give presentation on Django at work

2009-02-09 Thread lazyant
Hi, it can be very powerful if as part of the presentation you add a little hands-on demo, like in: http://www.showmedo.com/videos/video?name=110=110 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: A quick question about slug fields

2009-02-09 Thread djandrow
Thanks Karen On Feb 9, 4:53 pm, Karen Tracey wrote: > On Mon, Feb 9, 2009 at 11:50 AM, djandrow wrote: > > > I believe these days a statment like this has been depreciated: > > > post_slug = models.SlugField(prepopulate_from=('post_title',)) > > >

Bizarre sqlite3 / apache2 behaviour

2009-02-09 Thread lazyant
Hello, I installed yesterday Django 1.0.2 (current downloadable version) on a new Ubuntu 8.10 machine with python 2.5.2. I wrote a toy application and it works and shows fine with both the built-in development server and Apache 2 (2.2.9). The database is sqlite3, it came with python (btw, how do

Question about media in outside forms

2009-02-09 Thread Robert Ramírez Vique
Hello, I have been working on some forms which has some ajax behaivour, and I use some css and javascripts. This can be used inside a form with {{ form.media }}, which outputs the html tags necessary to import all the javascript and css to get all the fields working, and without duplicates if the

Re: Exception in Django's Exception Handling

2009-02-09 Thread Devel63
I'll see if I can extract some small subset and post the details. In the meantime, more info: the problem only occurs when an error is encountered during a call in which the server will return a HttpResponse('', mimetype='text/xml; charset=utf-8') object in response to some AJAX request; things

Re: A quick question about slug fields

2009-02-09 Thread Karen Tracey
On Mon, Feb 9, 2009 at 11:50 AM, djandrow wrote: > > I believe these days a statment like this has been depreciated: > > post_slug = models.SlugField(prepopulate_from=('post_title',)) > > I had a look through the docs but couldn't find the answer. > How can you now

A quick question about slug fields

2009-02-09 Thread djandrow
I believe these days a statment like this has been depreciated: post_slug = models.SlugField(prepopulate_from=('post_title',)) I had a look through the docs but couldn't find the answer. How can you now specify which field the slug is created from? thanks, Andrew

  1   2   >