response image missing the file size and summary

2008-09-10 Thread zhou
i have a issue about response a image object. open the image in browser ,the property of the image miss the file size and summary http://jieblog.appspot.com/file/agdqaWVibG9nchELEgpGaWxlVXBsb2FkGLoXDA def filedown(request,the_key): the_file = models.FileUpload.get(the_key)

Persistent Global Imports

2008-09-10 Thread Chris
I have an application that uses some large packages, such as Wordnet, and the imports can take awhile. Is there a mechanism in Django to persist imported package across requests? I'm running Django via mod_wsgi, and it seems to re-import everything in my view files for *every* request, which

Re: New data not showing up using Forms

2008-09-10 Thread adam
Brilliant. I actually looked at that page for some help with a different form, but I guess I completely missed the part about the init method. Thank you so much for your help. Adam On Sep 11, 12:04 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Thu, Sep 11, 2008 at 12:39 AM, adam <[EMAIL

Re: New data not showing up using Forms

2008-09-10 Thread Karen Tracey
On Thu, Sep 11, 2008 at 12:39 AM, adam <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > So I have a problem here. I have a series of forms to allow someone > to create recipes, and I decided to build them with Django's form > objects. The issue is that newly saved data doesn't appear as an >

Re: url module error after upgrade

2008-09-10 Thread Karen Tracey
On Thu, Sep 11, 2008 at 12:09 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I have unsuccessfully trid to upgrade from .96.1 to 1.0 and now i am > getting an error stating that there is no url module in python 2.5 > site-packages. > > has anyone else got this error and did we do away with

New data not showing up using Forms

2008-09-10 Thread adam
Hi everyone, So I have a problem here. I have a series of forms to allow someone to create recipes, and I decided to build them with Django's form objects. The issue is that newly saved data doesn't appear as an option on another form that I bring in as part of a ChoiceField. An example that

django-tagging "tags_for_model" order by count

2008-09-10 Thread jhill10110
I'm really new to both python and django so please be gentle with me :-) I would like to order the results of "tags_for_model" in django- tagging by tag count rather than tag name which is set in the Meta class of the Tag model. What is the best approach for this? Should I do this in the

url module error after upgrade

2008-09-10 Thread [EMAIL PROTECTED]
I have unsuccessfully trid to upgrade from .96.1 to 1.0 and now i am getting an error stating that there is no url module in python 2.5 site-packages. has anyone else got this error and did we do away with the url module --~--~-~--~~~---~--~~ You received this

Re: OneToOneField value not selected in default html form

2008-09-10 Thread Nathaniel Griswold
Oops, i thought I was running 1.0, but i thought wrong. Thanks -nate On Wed, Sep 10, 2008 at 9:45 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Wed, Sep 10, 2008 at 8:21 PM, nate <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> The values of OneToOneFields don't appear to remain selected after >>

Re: OneToOneField value not selected in default html form

2008-09-10 Thread Karen Tracey
On Wed, Sep 10, 2008 at 8:21 PM, nate <[EMAIL PROTECTED]> wrote: > > Hi, > > The values of OneToOneFields don't appear to remain selected after > creation or update in default forms (such as those used by the admin > interface). I Looked for a bug report but didnt see one. Has anyone > else run

Uploading JPEG image problem

2008-09-10 Thread Rodney Topor
I've installed the Python Imaging Library (PIL) so that I could upload and display images (for the first time). Everything works fine when I upload PNG or GIF or TIFF files (from my Mac), but whenever I try to upload any JPEG file, form validation gives the following error: Upload a valid

Re: AlreadyRegistered Exception after newforms-admin merge

2008-09-10 Thread ryan
Good catch. Thank you On Aug 3, 10:14 pm, "Pedro Valente" <[EMAIL PROTECTED]> wrote: > I'm not sure if it's your case, but I got the AlreadyRegistered errors > because before the merge I used the NFA branch and had an admin import > inside __init__.py (not needed anymore). > > I had forgotten

OneToOneField value not selected in default html form

2008-09-10 Thread nate
Hi, The values of OneToOneFields don't appear to remain selected after creation or update in default forms (such as those used by the admin interface). I Looked for a bug report but didnt see one. Has anyone else run into this? Take the following set of models: class Thing1(models.Model):

Re: Nesting inlines with django-admin

2008-09-10 Thread Cortland Klein
I'm having the same need for nested inlines. I have Events with many Questions, which have many Answers. I'd like to show inline the answers in the inline of the questions. Also as an aside has anyone done any AJAX work with inlines; getting a dynamic '+' to add extra rows could be very

Re: NameError

2008-09-10 Thread unklbeemer
Thanks! That helped with that error...but now i get a new one lol Exception Type: NoReverseMatch at /profiles/edit/ Exception Value: Reverse for 'profile_public' with arguments '(u'username',)' and keyword arguments '{}' not found. Any ideas on that? On Sep 10, 2:20 pm, Rajesh Dhawan <[EMAIL

Re: New Comments: Bad Magic Number Error

2008-09-10 Thread timc3
Perhaps a note for the future but what about keeping the old comments system, and having the new as a separate contrib app? Then we have the choice whether to stay or migrate. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: lighttpd matters - setup

2008-09-10 Thread wishi
Hi! Thanks for the tip. Nevertheless: I don't know what's the meaning of this either: 2008-09-10 21:52:34: (mod_fastcgi.c.2721) establishing connection failed: Connection refused socket: tcp:127.0.0.1:9090 2008-09-10 21:52:40: (mod_fastcgi.c.2667) fcgi-server re-enabled: tcp:127.0.0.1:9090

Re: lighttpd matters - setup

2008-09-10 Thread Valts Mazurs
Hi, Take a look at lighttpd's error log (see server.errorlog setting in lighttpd config file for exact error log location) Valts. On Wed, Sep 10, 2008 at 10:49 PM, wishi <[EMAIL PROTECTED]> wrote: > > Hi mates ;) > > These days I thought working myself into Django - to get some new > skills. I

Re: Need suggestions on subversion structure for project

2008-09-10 Thread phillc
shameless plug http://www.wtflab.com/tech/2008/jul/01/developed-directory-structure/ http://www.wtflab.com/tech/2008/jul/05/making-django-version-control-friendly/ On Sep 5, 4:18 pm, Jeff FW <[EMAIL PROTECTED]> wrote: > On Sep 5, 12:28 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > >

Re: Django 1.0 GIS Module (aka GeoDjango) and MySQL

2008-09-10 Thread Justin Bronn
> Does anyone know if the layermapping utility of the django gis module > supports a MySQL database backend, I keep getting error messages about > not being able to import GeometryColumns from > django.contrib.gis.models? No, it does not support MySQL. More specifically, MySQL does not conform

lighttpd matters - setup

2008-09-10 Thread wishi
Hi mates ;) These days I thought working myself into Django - to get some new skills. I could need some start-up help to configure my environment, which isn't the "Apatschi" with mod_python. I'm using a lighttpd in my Debian server environment, that's going to be configured: Therefore I added

Re: New Comments: Bad Magic Number Error

2008-09-10 Thread Karen Tracey
On Wed, Sep 10, 2008 at 3:14 PM, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > That seems to have done it. I need to test in a couple other spots. > > Can you let me know HOW you knew to check the .pyc files? What did I > miss? > > Lemme know. > For this problem specifically: First, I've

Re: How to reuse clean logic for both new forms and new forms admin?

2008-09-10 Thread Rajesh Dhawan
meppum wrote: > The new release of django allows developers to perform custom > validation before the save of an object using self.clean_data just > like in new forms. Is there any way to reuse the logic that we've > already created for our public facing site in the admin site? Yes. You can

Re: NameError

2008-09-10 Thread Rajesh Dhawan
Hi, unklbeemer wrote: > I am getting this error > > Exception Type: NameError at /profiles/edit/ > Exception Value: global name 'reverse' is not defined > > Is this an error in my views.py file? > > i have in my views > > from django.http import HttpResponseRedirect > > > Sorry if this is a very

Re: New Comments: Bad Magic Number Error

2008-09-10 Thread [EMAIL PROTECTED]
That seems to have done it. I need to test in a couple other spots. Can you let me know HOW you knew to check the .pyc files? What did I miss? Lemme know. On Sep 10, 10:52 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Wed, Sep 10, 2008 at 1:51 PM, Scott Moonen <[EMAIL PROTECTED]> wrote: >

Re: updating entry from form in django 1.0!?

2008-09-10 Thread James Bennett
On Wed, Sep 10, 2008 at 2:00 PM, David <[EMAIL PROTECTED]> wrote: > and I wanted to have something along these lines but don't know how to > convert to the new convention Perhaps you should check out the documentation for generating forms from models, which contains descriptions of how to do

Re: updating entry from form in django 1.0!?

2008-09-10 Thread David
not exactly, it seems that originally form_for_instance and form_for_object had different functions. I have a class class Blog(models.Model): title = models.CharField('Title',max_length=200) text = models.TextField('Text',max_length=2048) date = models.DateTimeField('Last Modified')

Re: Stupid noob question - admin link

2008-09-10 Thread Peter Bailey
Thanks everyone for your answers. Lots to learn here, but sure is fun! On Sep 10, 1:03 pm, AmanKow <[EMAIL PROTECTED]> wrote: > > Summary : You could simply copy the file base_site.html from admin > > templates to a directory called "admin" in your own template directory > > and add a link to

NameError

2008-09-10 Thread unklbeemer
I am getting this error Exception Type: NameError at /profiles/edit/ Exception Value: global name 'reverse' is not defined Is this an error in my views.py file? i have in my views from django.http import HttpResponseRedirect Sorry if this is a very simple answer...just a n00b

Re: weird osx problem (templates path)

2008-09-10 Thread Anakin
sorry guys for top posting, but im working on about 4days on that. and im bored this error. (yeah, im noob) by the way, im deleted all the project. and im start from beginning. now it works the templates (i dont know what is the problem, and i think i couldnt) than im working my project again.

Re: status of per-object-level permission

2008-09-10 Thread Malcolm Tredinnick
On Wed, 2008-09-10 at 08:43 -0700, dadapapa wrote: > Hi, > > great to see the release of version 1.0 !!! > I was wondering if per-object-level (aka row-level) permissions have > been included into this release. There was never any expectation that there would be anything like this included.

Re: Possible OneToOneField delete bug?

2008-09-10 Thread Malcolm Tredinnick
On Wed, 2008-09-10 at 07:33 -0700, TheShark wrote: [...] > assert Widget.objects.all().count()==1 > assert Sprocket.objects.all().count()==1 > > #print w.sprocket > s.w=None > s.save() > w.delete() > > assert Widget.objects.all().count()==0 > assert Sprocket.objects.all().count()==1 > > The

Re: New Comments: Bad Magic Number Error

2008-09-10 Thread Karen Tracey
On Wed, Sep 10, 2008 at 1:51 PM, Scott Moonen <[EMAIL PROTECTED]> wrote: > Hi Dave. I'm not sure how the .pyc file got corrupted, but from the error > it sounds like it did. Perhaps you're running with a mix of Python > versions? But I'd remove the .pyc file referenced by the error and try >

Re: New Comments: Bad Magic Number Error

2008-09-10 Thread Scott Moonen
Hi Dave. I'm not sure how the .pyc file got corrupted, but from the error it sounds like it did. Perhaps you're running with a mix of Python versions? But I'd remove the .pyc file referenced by the error and try again. -- Scott On Wed, Sep 10, 2008 at 1:46 PM, [EMAIL PROTECTED] < [EMAIL

New Comments: Bad Magic Number Error

2008-09-10 Thread [EMAIL PROTECTED]
I have looked everywhere. Tickets, here and in the source. I am getting a strange Bad Magic Number error when I first install contrib.comments. The traceback is below. Any ideas? Environment: Request Method: GET Request URL: http://127.0.0.1:8000/admin/page/content/ Django Version:

Re: url templatetag error

2008-09-10 Thread Malcolm Tredinnick
On Wed, 2008-09-10 at 01:19 -0700, aleray wrote: [...] > This last line is unuseful for my project because I want to use slugs > instead of id's, so I try : > > categorie > > And then I get an error : > > NoReverseMatch: Reverse for 'www.news-cat' with arguments '('',)' and > keyword

Re: Django questions

2008-09-10 Thread Ned Batchelder
Your view functions are simply Python functions. However you want to use Python to compute an HTML response is fine. Most people choose to use the template engine for that, but you can do whatever you like: def hello_world(request): return HttpResponse("Hello, world") --Ned.

Re: Django questions

2008-09-10 Thread [EMAIL PROTECTED]
Sure, nothing in django forces you to use it's template language(or any other template language), however that's generally advised against just because it leads to bad practices like mixing presentation and business logic. On Sep 10, 1:08 pm, Krommenaas <[EMAIL PROTECTED]> wrote: > Thx for the

Re: Django questions

2008-09-10 Thread Jorge Bastida
You are in thre wrong list. This is the django-users list , no the django-no-users list. 2008/9/10 Krommenaas <[EMAIL PROTECTED]> > > Thx for the replies. > > This is still unclear though: > > > 4) I read somewhere in the documentation that you can use other > > > templating systems than

Re: Django questions

2008-09-10 Thread Krommenaas
Thx for the replies. This is still unclear though: > > 4) I read somewhere in the documentation that you can use other > > templating systems than Django's own. Is it also possible to just use > > Python inside the views? > > If you use an appropriate templating language that supports that, yes.

Re: Stupid noob question - admin link

2008-09-10 Thread AmanKow
> Summary : You could simply copy the file base_site.html from admin > templates to a directory called "admin" in your own template directory > and add a link to your own pages in {% block branding %} so you would > have access to the link on every admin page. Actually, there is an empty block

Re: background process management & monitoring? like God, but python

2008-09-10 Thread palmTree
Have a look at http://supervisord.org/: Overview Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems. It shares some of the same goals of programs like launchd, daemontools, and runit. Unlike some of these

get_next_by_FOO(**kwargs) and get_previous_by_FOO(**kwargs) with on_site

2008-09-10 Thread nek4life
I'm wondering if it's possible to use the current site manager with these two functions or if I'm going to have to write my own? def get_previous_post(self): return self.get_previous_by_publish(status__gte=2) def get_next_post(self): return self.get_next_by_publish(status__gte=2) Has

Re: DateTimeFields not showing up in Admin page

2008-09-10 Thread ekellner
On Wed, Sep 10, 2008 at 5:04 PM, Guillermo <[EMAIL PROTECTED]>wrote: > Hi Steve, > > Actually I only wanted to have them displayed in the Admin interface > somehow but in a way that the user can't modify them. A sort of meta > information to the entry. > > I'm only getting my feet wet with

Re: ModelForm, one form, two models

2008-09-10 Thread Joseph Kocherhans
On Wed, Sep 10, 2008 at 6:59 AM, Michel Thadeu Sabchuk <[EMAIL PROTECTED]> wrote: > > Hi guys, > > What is the best way to work with 2 models on the same forms? Suppose > I have the following case: > > class Profile(models.Models): >user = models.ForeignKey(User) >some_data =

Re: request.POST.get is not working

2008-09-10 Thread LaundroMat
On Sep 10, 1:50 pm, bharathi <[EMAIL PROTECTED]> wrote: > Hi LaundroMat, > >     I tried request.POST['task'] .. But that also not working.. >    It shows >    " MultiValueDictKeyError at /addtask/ >    Key task not found in QueryDict: {}" > >  Wat i do now? > Help me Well, this means

status of per-object-level permission

2008-09-10 Thread dadapapa
Hi, great to see the release of version 1.0 !!! I was wondering if per-object-level (aka row-level) permissions have been included into this release. if not, is there any plan to include them, or is there any work-around/third-party project that works together with the new version? thanks! -

background process management & monitoring? like God, but python

2008-09-10 Thread [EMAIL PROTECTED]
Hi, God, a ruby tool to manage background processes, looks good: http://god.rubyforge.org/ Is there an equivalent tool in Python? Is there a better tool in any language? Thanks, Ivan tipjoy.com --~--~-~--~~~---~--~~ You received this message because you are

Re: DateTimeFields not showing up in Admin page

2008-09-10 Thread Karen Tracey
On Wed, Sep 10, 2008 at 11:04 AM, Guillermo <[EMAIL PROTECTED] > wrote: > > > Hi Steve, > > Actually I only wanted to have them displayed in the Admin interface > somehow but in a way that the user can't modify them. A sort of meta > information to the entry. > > I'm only getting my feet wet with

validation problems in inline admin form

2008-09-10 Thread Wintoon
Hello, I cant seem to figure out if this is working correctly: In admin.py I put some code (end of message) to validate an inline entry. The validation works just fine, however the error message is not shown in the appropriate place inline. Is this a bug I should file or is there something

Re: weird osx problem (templates path)

2008-09-10 Thread Karen Tracey
On Wed, Sep 10, 2008 at 11:03 AM, Anakin <[EMAIL PROTECTED]> wrote: > > any ideas about that ? > Any ideas about what? With top posting I have no idea what you are referring to. So far it appears that your TEMPLATE_DIRS setting is empty when you are running despite the fact it has an entry in

Re: DateTimeFields not showing up in Admin page

2008-09-10 Thread Guillermo
Hi Steve, Actually I only wanted to have them displayed in the Admin interface somehow but in a way that the user can't modify them. A sort of meta information to the entry. I'm only getting my feet wet with Django, so I'm basically experimenting. I'm sure there's a way of doing this

Re: weird osx problem (templates path)

2008-09-10 Thread Anakin
any ideas about that ? On 10 Eylül, 08:58, Anakin <[EMAIL PROTECTED]> wrote: > @yousef, > > i did it 3-4 times, invidually (and all). but nothing changed. > and im working on true settings file. im going to be mad cause this > error :) > > On 10 Eylül, 01:08, "Yousef Ourabi" <[EMAIL PROTECTED]>

Possible OneToOneField delete bug?

2008-09-10 Thread TheShark
I'm pretty new to Django, but I found some odd behavior in OneToOneField which I think is a bug. Take the following Models: class Widget(models.Model): name = models.CharField(max_length=10) def __unicode__(self): return u'%s(%s)'%(self.name,self.pk) class

Re: ANN: Updated Django Cheat Sheet

2008-09-10 Thread Fraser Nevett
Just letting everyone know that we've released a new edition which removes the PhoneNumberField and USStateField fields as discussed -- thanks to all those who contacted us about this. The other common request we received was to have a version that worked better with black and white printers. To

ModelForm, one form, two models

2008-09-10 Thread Michel Thadeu Sabchuk
Hi guys, What is the best way to work with 2 models on the same forms? Suppose I have the following case: class Profile(models.Models): user = models.ForeignKey(User) some_data = models.CharField() How can I add a profile and a user on the same form using ModelForm? I used to do:

Re: Creating an Archive

2008-09-10 Thread djandrow
Can no one help me with either of my questions? I'd really like to this sorted. Thanks, Andrew --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: How to retrieve forgotten password of django admin user

2008-09-10 Thread TiNo
On Wed, Sep 10, 2008 at 3:14 PM, Steve Holden <[EMAIL PROTECTED]> wrote: > > Chaitu wrote: > > I want to modified the django admin login page. In this page I also > > wants to display option for retrieve the forgotten password of admin > > user. But I am not able to find solution for this. > >

Re: image upload with model form

2008-09-10 Thread TiNo
Inline -> On Wed, Sep 10, 2008 at 3:11 PM, Kwan Hong Lee <[EMAIL PROTECTED]> wrote: > Hello, > > Does anybody have a sample code that has a imagefield and upload working > through model form that you could share? > > I get weird error > > Exception Type: ValueError Exception Value: > > The view

Re: How to retrieve forgotten password of django admin user

2008-09-10 Thread Steve Holden
Chaitu wrote: > I want to modified the django admin login page. In this page I also > wants to display option for retrieve the forgotten password of admin > user. But I am not able to find solution for this. > Please help me for above problems. > I'm not sure it's possible to extract the

Re: How to retrieve forgotten password of django admin user

2008-09-10 Thread TiNo
Read this about modifiing the admin templates: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-admin-templates On Wed, Sep 10, 2008 at 3:02 PM, Chaitu <[EMAIL PROTECTED]>wrote: > > I want to modified the django admin login page. In this page I also > wants to display option

image upload with model form

2008-09-10 Thread Kwan Hong Lee
Hello, Does anybody have a sample code that has a imagefield and upload working through model form that you could share? I get weird error Exception Type: ValueError Exception Value: The view mymodule.views.new_store didn't return an HttpResponse object. when I have the following: def

How to retrieve forgotten password of django admin user

2008-09-10 Thread Chaitu
I want to modified the django admin login page. In this page I also wants to display option for retrieve the forgotten password of admin user. But I am not able to find solution for this. Please help me for above problems. Thanks, Chaitanya.

Re: possible bug in django-admin

2008-09-10 Thread Karen Tracey
On Wed, Sep 10, 2008 at 3:06 AM, Benedict Verheyen < [EMAIL PROTECTED]> wrote: > > James Bennett wrote: > > On Tue, Sep 9, 2008 at 4:15 AM, Benedict Verheyen > > <[EMAIL PROTECTED]> wrote: > >> i tried to do a django-admin startproject and it > >> said that startproject wasn't a valid command. >

Re: request.POST.get is not working

2008-09-10 Thread bharathi
Hi LaundroMat, I tried request.POST['task'] .. But that also not working.. It shows " MultiValueDictKeyError at /addtask/ Key task not found in QueryDict: {}" Wat i do now? Help me Thanks, Bharathi On Sep 10, 4:36 pm, LaundroMat <[EMAIL PROTECTED]> wrote: > On Sep 10, 12:25 pm,

Re: request.POST.get is not working

2008-09-10 Thread LaundroMat
On Sep 10, 12:25 pm, bharathi <[EMAIL PROTECTED]> wrote: > Hi, >   I am using Django1.0 >   In this request.POST.get() is not Working..It Gives empty value > (snip) What about request.POST['task']? --~--~-~--~~~---~--~~ You received this message because you are

Re: ANN: Updated Django Cheat Sheet

2008-09-10 Thread Andrew Durdin
On Sep 9, 11:32 am, Vinay Sajip <[EMAIL PROTECTED]> wrote: > > Nicecheatsheet. Hope it's not too late to offer a suggestion - it > would be useful to have the forloop special variables in thecheatsheet. Not > sure where you'll find room, though ;-) We had them there in an earlier draft, but

request.POST.get is not working

2008-09-10 Thread bharathi
Hi, I am using Django1.0 In this request.POST.get() is not Working..It Gives empty value My Views is: def addtask(request): r=HttpResponse() if request.method == 'POST': task = request.POST.get('task') a = "taskname"+ str(task)

request.POST.get is not working

2008-09-10 Thread bharathi
Hi, I am using Django1.0 In this request.POST.get() is not Working..It Gives empty value My Views is: def addtask(request): r=HttpResponse() if request.method == 'POST': task = request.REQUEST.get('task') a = "taskname"+ str(task)

Re: What do you use as a build tool (like Ant or make)

2008-09-10 Thread Dan Fairs
> I haven't used any of them with Django, but for managing Zope, Plone > and Grok based web apps, zc.buildout is the current preferred tool. I use zc.buildout to manage my Django builds. Blog post coming soon (when the project's finished!) Cheers, Dan -- Dan Fairs <[EMAIL PROTECTED]> |

Re: Problm using FileField with inline formsets (inlineformset_factory)

2008-09-10 Thread [EMAIL PROTECTED]
Hoorah, i ike it when the answer is me being stupid. Much easier to fix Thank you On Sep 10, 10:46 am, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Sep 10, 9:50 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > > > Hi > > > I'm having a problem with inline formsets containing file

Re: Problm using FileField with inline formsets (inlineformset_factory)

2008-09-10 Thread Daniel Roseman
On Sep 10, 9:50 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi > > I'm having a problem with inline formsets containing file field, i've > had a good google but couldn't find an answer, so apolgies if this is > a stupid or repetative question. > > I have a model Applicatant, which has a

Re: updating entry from form in django 1.0!?

2008-09-10 Thread Daniel Roseman
On Sep 10, 9:56 am, David <[EMAIL PROTECTED]> wrote: > Thanks, are they also any example of the case of form_for_model (as I > am assuming the above is only with respect to form_for_instance) > > Thx. > D. But that's just what you had already: > > > I've tried simply f =

Re: updating entry from form in django 1.0!?

2008-09-10 Thread David
Thanks, are they also any example of the case of form_for_model (as I am assuming the above is only with respect to form_for_instance) Thx. D. On Sep 10, 9:32 am, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Sep 10, 8:56 am, David <[EMAIL PROTECTED]> wrote: > > > whereas once you had > > > p

Problm using FileField with inline formsets (inlineformset_factory)

2008-09-10 Thread [EMAIL PROTECTED]
Hi I'm having a problem with inline formsets containing file field, i've had a good google but couldn't find an answer, so apolgies if this is a stupid or repetative question. I have a model Applicatant, which has a one to many relation with Education which contains a filefeild. My problem is

admin changelist: how to display selected filter (in the headline)

2008-09-10 Thread patrickk
when selecting a filter in the admin changelist, is it possible to show that selected filter (e.g. in the headline)? when you have lots of filters on the right hand side of the changelist, it´s really hard to find out which filter is selected (you may have to scroll down). so, instead of the

Re: updating entry from form in django 1.0!?

2008-09-10 Thread Daniel Roseman
On Sep 10, 8:56 am, David <[EMAIL PROTECTED]> wrote: > whereas once you had > > p = get_object_or_404(Person, pk=pID) > MyForm = forms.form_for_instance(p) > f = MyForm(request.POST.copy()) > > how on earth do you do it now? > I've tried simply f = MyForm(request.POST.copy()) where MyForm is >

validation inline

2008-09-10 Thread Samuel Mathieson
Hello, I am trying to get some sort of validation inline for the admin: class InlineForm(forms.ModelForm): class Meta: model = Inline def clean(self): if ... raise forms.ValidationError('Error message here.') return self.cleaned_data class

url templatetag error

2008-09-10 Thread aleray
Hi, I'm baking a small kind of blog, and I'm trying now to generate a menu for the catgories. I'm using the same view for the main page, and the category pages : (r'^news/$', 'news', {}, 'news-all'), (r'^news/category/(?P\w+)/$', 'news', {}, 'news-cat'), If I enter the url its works

updating entry from form in django 1.0!?

2008-09-10 Thread David
whereas once you had p = get_object_or_404(Person, pk=pID) MyForm = forms.form_for_instance(p) f = MyForm(request.POST.copy()) how on earth do you do it now? I've tried simply f = MyForm(request.POST.copy()) where MyForm is previously defined as a class with model=Person, but then django thinks

Re: i18N with templates in separate directory

2008-09-10 Thread timc3
Never really looked in manage.py but I did after my question, I see it just hooks in to django and doesn't really do much itself - so it doesn't need upgrading. I got fed up of trying to get this to work so I moved my templates directory so I have the following structure. code/ -mysite/

Re: How do I befriend a user in the User class?

2008-09-10 Thread coan
On Sep 9, 5:39 pm, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 9 sep, 14:56, coan <[EMAIL PROTECTED]> wrote: > > > I want to add a recursive relationship to the built-in User model - to > > store relationships between users. Are there any (non-hairy) ways to > > do this? > > #

Re: possible bug in django-admin

2008-09-10 Thread Benedict Verheyen
James Bennett wrote: > On Tue, Sep 9, 2008 at 4:15 AM, Benedict Verheyen > <[EMAIL PROTECTED]> wrote: >> i tried to do a django-admin startproject and it >> said that startproject wasn't a valid command. >> Weird. django-admin help indeed didn't show the startproject command. > > This is