How to pass 2 list as one in template

2009-05-27 Thread laspal
Hi, I have 2 list and want to iterate as one in template. How can I do it. example-> list1 = [10,20,30,30] list2 = [aa,bb,cc,dd] {% for item in list1 and item1 in list2 %} {{item}} {{item1}} {% endfor%} {% endfor %} which is wrong. How can I fix this. I cant do this: {% for item in list1 %} {%

Re: Iterate over MultipleChoiceList in Template

2009-05-27 Thread Retro486
Bummer I'd have to resort to overloading the renderer, but I guess if that's what it would take. Personally I'll just fall back to the three manual checkboxes and putting the validation code in my clean method. Thanks again Richard, glad you found a solution. For those who wish to overload the

Re: Validation with two fields

2009-05-27 Thread diogobaeder
Found it: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#adding-custom-validation-to-the-admin Thanks anyway... :-) Diogo On May 27, 6:16 pm, diogobaeder wrote: > Thanks a lot, V! That answers my question... > > I agree with you at the architecture point... could you provide a URL >

Already invented wheel: Django Bioinformatics?

2009-05-27 Thread Glen Jarvis
I know the first thing to ever do, before jumping into another project, is to check what's already been done. I know I shouldn't reinvent the wheel if it's already in progress elsewhere. But, I sometimes forget. So, before I start jumping into creating custom fields for gene sequences, fo

Re: how to detect if there is no image in the model?

2009-05-27 Thread Kenneth Gonsalves
On Thursday 28 May 2009 06:52:34 Kenneth Gonsalves wrote: > [version: django svn trunk] > I have a model with imagefield named 'photo'. I want to display the image > if it exists. My template code is: > > {% if p.photo.url %} > I am a moron - it should be: {% if p.photo %} -- regards k

how to detect if there is no image in the model?

2009-05-27 Thread Kenneth Gonsalves
hi, [version: django svn trunk] I have a model with imagefield named 'photo'. I want to display the image if it exists. My template code is: {% if p.photo.url %} but I get this error: "Caught an exception while rendering: The 'photo' attribute has no file associated with it" obvio

Re: How to use next with comments?

2009-05-27 Thread Eric Abrahamsen
On May 28, 2009, at 4:02 AM, Kevin Fullerton wrote: > > I'm working with django.contrib.comments at the moment, and so far > most > things are working as expected. > > I'm building the submission form using {% get_comment_form for > object as > form %} and have added the following as part of

Abstract model or ContentTypes?

2009-05-27 Thread Michael Keselman
Hello, I have somewhat of a strange situation: Each user has his own calendar and own set of events, and I want the event categories to be models like Assignment, FieldTrip, Test/Quiz, etc. I want it like this so that I can make the event on the rendered calendar a link to the assignment p

modelformset.forms.instance in a template

2009-05-27 Thread nbv4
View: def edit_operation(request, op_id): from forms import OpBaseForm from django.forms.models import modelformset_factory OpBaseFormSet = modelformset_factory(OpBase, form=OpBaseForm) op = Operation.objects.get(pk=op_id) formset = OpBaseFormSet(queryset=op.opbase_set.all())

Re: How to include parent name in list of children?

2009-05-27 Thread adelaide_mike
Thank you Tom and Daniel. Starting to see some light here. Mike On May 28, 1:25 am, Daniel Roseman wrote: > On May 27, 2:59 pm, Tom Evans wrote: > > > > > On Wed, 2009-05-27 at 06:27 -0700, adelaide_mike wrote: > > > Very beginner here. > > > > My model has two classes, Suburb, the parent, an

Re: Troubles after switching to WSGI: lost apache processes, multiple view func calls per HTTP request

2009-05-27 Thread Valery Khamenya
Hi Graham, I've spent 2 times 45 min recently for reading howtos on writing own middleware and after that have decided to postpone this grownup's magic :) I mean that Karen hit the right level for a middling person like I am. It worked out in about 2 minutes. Said that, I am actually very thankf

Re: form.initial and ManyToMany

2009-05-27 Thread adrian
Oops, the title of this thread should have been "instance" instead of "initial". --~--~-~--~~~---~--~~ 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.co

Re: Troubles after switching to WSGI: lost apache processes, multiple view func calls per HTTP request

2009-05-27 Thread Graham Dumpleton
On May 28, 5:42 am, Valery Khamenya wrote: > Hi Karen, > > I appreciate very much your reply, thank you. > > the line is injected, it does logging fine, let's wait for the next > occurrence. (yep, things are not reproducible) Also see: http://code.google.com/p/modwsgi/wiki/DebuggingTechniq

Re: "DeprecationWarning: the sets module is deprecated"

2009-05-27 Thread Alex Gaynor
On Wed, May 27, 2009 at 4:04 PM, kammi-agk wrote: > > I've got the same problem. It seems not just to be a warning. My > tables weren't created either. > Is there any solution for that problem in between? > > > On 2 Mai, 00:57, nbv4 wrote: > > The problem was it wasn't creating the tables like i

Problem with django-css

2009-05-27 Thread Travis Jensen
Hopefully somebody here can help me. I got the latest svn version from Google Code. I configured it (I think :) and started it up. Now I'm getting an exception when it hits the compressed_css tag. Any help would be greatly appreciated, because I'm at a loss. I've included the error that comes u

an unquoted path

2009-05-27 Thread crypto
I've noticed that the url: http://example.com/http%3A%2F%2Ftest.org%2Fvocab%23FOAF/ becomes: http://example.com/http://test.org/vocab#FOAF/ once it goes in the WSGIRequestHandler. But this results in an invalid url. Is this an oversight or is there something in the HTTP spec that says otherw

Re: "DeprecationWarning: the sets module is deprecated"

2009-05-27 Thread kammi-agk
I've got the same problem. It seems not just to be a warning. My tables weren't created either. Is there any solution for that problem in between? On 2 Mai, 00:57, nbv4 wrote: > The problem was it wasn't creating the tables like it should, all it > did was spit out that warning. I assumed that

Cross Validation

2009-05-27 Thread ASummer
I'm having a problem trying to figure something out - I'll give an example of what I'm trying to do. I have a base model "Person" that stores generic info on a person. For this "Person" model, I have a form that I use when I don't know what type of person the user is. It serves as a generic form t

How to use next with comments?

2009-05-27 Thread Kevin Fullerton
I'm working with django.contrib.comments at the moment, and so far most things are working as expected. I'm building the submission form using {% get_comment_form for object as form %} and have added the following as part of the form As I understand it, that should force comments to redirect t

"Conditional fields" in forms

2009-05-27 Thread Jochem Berndsen
All, Is there an easy way to include "conditional fields" in forms within the Django framework. By "conditional fields", I mean fields that are shown or not shown depending on earlier choices the user made in the form. What would be the canonical way to implement this? Thanks for your considerat

Re: ManyToMany problem

2009-05-27 Thread Alex Gaynor
On Wed, May 27, 2009 at 4:18 PM, MartinBorthiry wrote: > > > > On May 27, 6:11 pm, Alex Gaynor wrote: > > On Wed, May 27, 2009 at 4:07 PM, MartinBorthiry > > wrote: > > > > > > > > > > > > > Hello, > > > > > I have this model with a manyToMany relationship: > > > > > class Group(BaseClass): > >

Re: ManyToMany problem

2009-05-27 Thread MartinBorthiry
On May 27, 6:11 pm, Alex Gaynor wrote: > On Wed, May 27, 2009 at 4:07 PM, MartinBorthiry > wrote: > > > > > > > Hello, > > >  I have this model with a manyToMany relationship: > > >  class Group(BaseClass): > >   ... > >    members = models.ManyToManyField > > (Client ,through='Membership',rela

Re: Validation with two fields

2009-05-27 Thread diogobaeder
Thanks a lot, V! That answers my question... I agree with you at the architecture point... could you provide a URL to documentation concerning specific form validation inside the admin site? Diogo On May 27, 5:36 am, V wrote: > On May 27, 5:56 am, Diogo Baeder wrote: > > > Hi, > > > I've go

Re: ManyToMany problem

2009-05-27 Thread Alex Gaynor
On Wed, May 27, 2009 at 4:07 PM, MartinBorthiry wrote: > > Hello, > > I have this model with a manyToMany relationship: > > class Group(BaseClass): > ... >members = models.ManyToManyField > (Client ,through='Membership',related_name="members" > , blank=

Re: FileBrowser: Installation Question

2009-05-27 Thread Bob N.
Figured it out. Of course, now I feel like an idiot... FILEBROWSER_PATH_SERVER = '/path/to/my/filebrowser' Adding this and other 'FILEBROWSER' settings to my project settings.py should have been obvious. Thanks for being kind! On May 27, 12:05 am, patrickk wrote: > I don´t quite understand yo

Re: SQLAlchemy

2009-05-27 Thread Alex Gaynor
On Wed, May 27, 2009 at 4:04 PM, jrs_66 wrote: > > Hi, > > I've been playing a bit lately with SQLAlchemy. It seems to provide > much more power/flexibility than the somewhat clunky Django ORM. It > doesn't, however, allow me to use ModelForms or the Admin interface, > which are a nice time sav

ManyToMany problem

2009-05-27 Thread MartinBorthiry
Hello, I have this model with a manyToMany relationship: class Group(BaseClass): ... members = models.ManyToManyField (Client ,through='Membership',related_name="members" , blank=True) . class Membership(BaseClass): client = models.Forei

SQLAlchemy

2009-05-27 Thread jrs_66
Hi, I've been playing a bit lately with SQLAlchemy. It seems to provide much more power/flexibility than the somewhat clunky Django ORM. It doesn't, however, allow me to use ModelForms or the Admin interface, which are a nice time saver. Is there any red flag I should be aware of in possibly u

Re: pluggable export to csv application

2009-05-27 Thread nbv4
On May 27, 1:29 pm, Nagy Viktor wrote: > Hi, > > I've put together a nifty export to csv application. You can check it out > athttps://launchpad.net/django-export-csv > > To get the code immediately just run: bzr branch lp:django-export-csv > an overview file and tests are included as well > > I

Re: updating the data used in a form

2009-05-27 Thread Alex Gaynor
On Wed, May 27, 2009 at 3:31 PM, Jim wrote: > > Hello, > > Suppose that I have a form ShowLatestUpdates that shows some things > from a database. An hour later, the list of things to show is > different. But the form shows the data from when it was initialized. > Something like > ShowLatestUpd

updating the data used in a form

2009-05-27 Thread Jim
Hello, Suppose that I have a form ShowLatestUpdates that shows some things from a database. An hour later, the list of things to show is different. But the form shows the data from when it was initialized. Something like ShowLatestUpdates().update() doesn't work, I expect because it initializ

Re: unique slugs (duplicates allowed to be saved)

2009-05-27 Thread Alex Gaynor
On Wed, May 27, 2009 at 3:10 PM, Bobby Roberts wrote: > > On May 27, 4:08 pm, Bobby Roberts wrote: > > hi group... I thought slugs were unique, or supposed to be? Here's > > what i'm doing: > > > > in forms.py > > slug = forms.SlugField(required=True,widget=forms.TextInput(attrs= > > {'clas

Re: unique slugs (duplicates allowed to be saved)

2009-05-27 Thread Bobby Roberts
On May 27, 4:08 pm, Bobby Roberts wrote: > hi group... I thought slugs were unique, or supposed to be?  Here's > what i'm doing: > > in forms.py >     slug = forms.SlugField(required=True,widget=forms.TextInput(attrs= > {'class':'slug','id':'slug'})) > > in models.py: >     url_slug = models.Slug

unique slugs (duplicates allowed to be saved)

2009-05-27 Thread Bobby Roberts
hi group... I thought slugs were unique, or supposed to be? Here's what i'm doing: in forms.py slug = forms.SlugField(required=True,widget=forms.TextInput(attrs= {'class':'slug','id':'slug'})) in models.py: url_slug = models.SlugField (blank=False, max_length=254,unique=True) I can c

form.initial and ManyToMany

2009-05-27 Thread adrian
I'm writing a view to edit a model that has ManyToMany fields. The form appears with all the fields properly filled out based on the existing model instance, except the ManyToMany fields show all the options but none are selected. My question is, what do I have to do to have the form appear ex

Re: Troubles after switching to WSGI: lost apache processes, multiple view func calls per HTTP request

2009-05-27 Thread Valery Khamenya
Hi Karen, I appreciate very much your reply, thank you. the line is injected, it does logging fine, let's wait for the next occurrence. (yep, things are not reproducible) best regards -- Valery A.Khamenya On Wed, May 27, 2009 at 5:51 PM, Karen Tracey wrote: > On Wed, May 27, 2009 at 10:23 AM

Browsing search results record by record

2009-05-27 Thread Sydney Weidman
I am working on an application which needs to work like so: A user enters search criteria in a search form and when submit is clicked, if any records match the criteria, the user is taken to the first record in the results set. The user can click "Next" to go to the next record in the result set,

Re: URL conf question .....

2009-05-27 Thread Aaron Maxwell
On Tuesday 26 May 2009 07:21:16 pm tekion wrote: > Part 3 tutorial from django site, suggest the below method of > optimizing urls. > urlpatterns = patterns('mysite.polls.views', > (r'^polls/$', 'index'), > (r'^polls/(?P\d+)/$', 'detail'), > (r'^polls/(?P\d+)/results/$', 'results'), >

pluggable export to csv application

2009-05-27 Thread Nagy Viktor
Hi, I've put together a nifty export to csv application. You can check it out at https://launchpad.net/django-export-csv To get the code immediately just run: bzr branch lp:django-export-csv an overview file and tests are included as well If there is interest, I might add date_based "subviews".

Re: How to include parent name in list of children?

2009-05-27 Thread Daniel Roseman
On May 27, 2:59 pm, Tom Evans wrote: > On Wed, 2009-05-27 at 06:27 -0700, adelaide_mike wrote: > > Very beginner here. > > > My model has two classes, Suburb, the parent, and Street, the child: > > > class      Suburb(models.Model): > >            suburb_name = models.CharField(max_length=72) > >

Re: Weird problem in url resolving after restarting django dev. server

2009-05-27 Thread Steve Howell
On May 27, 8:23 am, Konstantin S wrote: > On May 26, 9:28 pm, Steve Howell wrote: > > [...] > > Perhaps you can try to step through the code in the debugger.  The top- > > level method involved in reversing URLs are not super complicated. > > You can set a breakpoint in django/core/urlresolver.

Re: Troubles after switching to WSGI: lost apache processes, multiple view func calls per HTTP request

2009-05-27 Thread Karen Tracey
On Wed, May 27, 2009 at 10:23 AM, Valery Khamenya wrote: > Hi Karen, > > thanks for reply. I am looking in log files that I believe are created by > apache, at least they are created via usual apache statement like: > > ... > CustomLog /var/www/mysite/logs/access.log combined > ... > > In this

Re: Weird problem in url resolving after restarting django dev. server

2009-05-27 Thread Konstantin S
On May 26, 9:28 pm, Steve Howell wrote: > > From the docs you might want to take advantage of the name= parameter > in your URLS setup and do something like {% url 'add_media_action' > %}.  Not sure about the quoting, as the docs are vague about quoting > literals. > > ''' > New in Django 1.0: Pl

Re: Aggregate

2009-05-27 Thread Alex Gaynor
On Wed, May 27, 2009 at 9:58 AM, mettwoch wrote: > > Thanks Alex, but then I wonder if it would be reasonable to move this > kind of simple rules to a "view" in the database and let Django access > the view rather than the raw table. > > Any experience with that? > > Marc > > On May 27, 4:49 pm,

Re: Aggregate

2009-05-27 Thread mettwoch
Thanks Alex, but then I wonder if it would be reasonable to move this kind of simple rules to a "view" in the database and let Django access the view rather than the raw table. Any experience with that? Marc On May 27, 4:49 pm, Alex Gaynor wrote: > On Wed, May 27, 2009 at 9:45 AM, mettwoch wr

Re: Aggregate

2009-05-27 Thread Alex Gaynor
On Wed, May 27, 2009 at 9:45 AM, mettwoch wrote: > > Hi Group, > > I wonder if there's a way to aggregate an expression like: > >Sum("quantity*price") > > on a model having "quantity" and "price" fields. > > Marc > > > No, there isn't currently a way to do this, besides writing a custom a

Aggregate

2009-05-27 Thread mettwoch
Hi Group, I wonder if there's a way to aggregate an expression like: Sum("quantity*price") on a model having "quantity" and "price" fields. Marc --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django user

Re: foo.objects.filter(bar__isnull=False) problem

2009-05-27 Thread Daniel Watkins
On Wed, 2009-05-27 at 08:30 -0500, Alex Gaynor wrote: > Because of the way SQL works when filtering on a many to many / or > reverse foreign key in certain ways you can get duplicates, you can > use distinct(); > http://docs.djangoproject.com/en/dev/ref/models/querysets/#distinct to > remove these

Re: Troubles after switching to WSGI: lost apache processes, multiple view func calls per HTTP request

2009-05-27 Thread Valery Khamenya
Hi Karen, thanks for reply. I am looking in log files that I believe are created by apache, at least they are created via usual apache statement like: ... CustomLog /var/www/mysite/logs/access.log combined ... In this sense, yes, I do see only a single HTTP-request in logs, but can track mult

Re: Troubles after switching to WSGI: lost apache processes, multiple view func calls per HTTP request

2009-05-27 Thread Karen Tracey
On Wed, May 27, 2009 at 7:59 AM, Valery Khamenya wrote: > Hi Graham, > > I do not do touch anymore. However multiple view func calls per single > HTTP-request still happen. > It's far more likely that Django is being routed multiple HTTP requests than that Django is calling your view function mu

Re: How to include parent name in list of children?

2009-05-27 Thread Tom Evans
On Wed, 2009-05-27 at 06:27 -0700, adelaide_mike wrote: > Very beginner here. > > My model has two classes, Suburb, the parent, and Street, the child: > > class Suburb(models.Model): > suburb_name = models.CharField(max_length=72) > postcode = models.CharField(max_len

Re: User attribute access from within profile model

2009-05-27 Thread Karen Tracey
On Tue, May 26, 2009 at 4:12 PM, neridaj wrote: > > Is it only possible to access the methods of the associated User > object, and not the attributes? Even though I can access the full name > using get_full_name() I would still like to change the ordering to > last_name i.e., ordering = ['last_na

Re: foo.objects.filter(bar__isnull=False) problem

2009-05-27 Thread Alex Gaynor
On Wed, May 27, 2009 at 5:17 AM, Daniel Watkins wrote: > > Hello all, > > I'm seeing the following behaviour: > In [2]: Project.objects.all() > Out[2]: [, , > , , > , ] > > In [3]: Project.objects.filter(trainingprogramme__isnull=False) > Out[3]: [, (Distributions)>] > >

Re: initial data for formset

2009-05-27 Thread adrian
Thanks. I've set extra=0 and added an element to the list, and now the last form on the page is half-initialized - the date is set but the time is not! What could cause that?? On May 26, 9:20 pm, Sam Chuparkoff wrote: > On Tue, 2009-05-26 at 17:27 -0700, adrian wrote: > > This code creates a f

How to include parent name in list of children?

2009-05-27 Thread adelaide_mike
Very beginner here. My model has two classes, Suburb, the parent, and Street, the child: class Suburb(models.Model): suburb_name = models.CharField(max_length=72) postcode = models.CharField(max_length=4) def __unicode__(self):

Re: Troubles after switching to WSGI: lost apache processes, multiple view func calls per HTTP request

2009-05-27 Thread Valery Khamenya
Hi Graham, I do not do touch anymore. However multiple view func calls per single HTTP-request still happen. best regards -- Valery A.Khamenya On Wed, May 27, 2009 at 1:47 PM, Graham Dumpleton < graham.dumple...@gmail.com> wrote: > > > > On May 27, 9:11 pm, Valery wrote: > > Hi Graham > > > >

Re: Troubles after switching to WSGI: lost apache processes, multiple view func calls per HTTP request

2009-05-27 Thread Graham Dumpleton
On May 27, 9:11 pm, Valery wrote: > Hi Graham > > the issue is still here even after mod_python is removed. I still > register multiple calls of my view function for a single HTTP-request > (proved via Django log file). For example, 25 calls per HTTP request > today. > > And you can't believe,

Re: Troubles after switching to WSGI: lost apache processes, multiple view func calls per HTTP request

2009-05-27 Thread Valery
Hi Graham the issue is still here even after mod_python is removed. I still register multiple calls of my view function for a single HTTP-request (proved via Django log file). For example, 25 calls per HTTP request today. And you can't believe, as always -- "I did nothing special!" (c) No one g

foo.objects.filter(bar__isnull=False) problem

2009-05-27 Thread Daniel Watkins
Hello all, I'm seeing the following behaviour: In [2]: Project.objects.all() Out[2]: [, , , , , ] In [3]: Project.objects.filter(trainingprogramme__isnull=False) Out[3]: [, ] In [18]: [p for p in Project.objects.all() if list(p.trainingprogramme_set.all()) != []

Re: When to use admin, and when not to.

2009-05-27 Thread Sam Kuper
2009/5/27 Andy Mikhailenko > > User behaviour can be formalized as actions + objects. Some actions > span multiple objects. > Admin is a great tool that corresponds the *structure* of data. It > allows to view and edit all your base for great justice. Err, all your > database for zero cost. Out of

Re: When to use admin, and when not to.

2009-05-27 Thread Andy Mikhailenko
User behaviour can be formalized as actions + objects. Some actions span multiple objects. Admin is a great tool that corresponds the *structure* of data. It allows to view and edit all your base for great justice. Err, all your database for zero cost. Out of the box. Nice! However, "editing an ob

Re: why no modelformset from a modelform?

2009-05-27 Thread nbv4
well I'll be damned. I didn't see it here: http://docs.djangoproject.com/en/dev/topics/forms/modelforms/ So I assumed it couldn't do it... On May 27, 5:31 am, Daniel Roseman wrote: > On May 27, 9:55 am, nbv4 wrote: > > > I have a model which has about 4 fields. One of those fields is a > > fore

Re: why no modelformset from a modelform?

2009-05-27 Thread Daniel Roseman
On May 27, 9:55 am, nbv4 wrote: > I have a model which has about 4 fields. One of those fields is a > foreign key to another model which has over 40,000 objects in the > database. When I create a 'stock' ModelForm of this model, and display > it in a template, it wants to create a with 40,000 it

Re: Environmental variables not recognized by mod_python

2009-05-27 Thread Graham Dumpleton
On May 27, 6:13 pm, emy_66 wrote: > My django site isn't able to read my environmental variable - PATH - > when run by mod_python. In my .profile file my path is /usr/local/ > ncbi:/usr/local/bin. This gives me access to programs I call using > subprocess from django. Could I get your advice as

Re: What, if any, Apache modules are required to implement Django authentication?

2009-05-27 Thread Graham Dumpleton
On May 27, 4:54 pm, Ben Welsh wrote: > The nabble link I provided has a lot of that stuff. The answers are prefork, > mod_python and the following. If you would recommend a switch to mod_wsgi, > could you please recommend the best guides for how and why? I'm always > interested in reading more

Re: Iterate over MultipleChoiceList in Template

2009-05-27 Thread Richard
Hey Retro, My boss managed to get this working so I can't take the credit but this works and it's pretty useful. Basically, he's overriding the widget renderer and making each "choice" a separate list item, giving each "choice" it's own ID, making it much easier to use CSS to format the choices i

Re: setting choices on choice field dynamically according to objects current state

2009-05-27 Thread Simon Davies
Thanks v What you said echoes what I found on a posting on djangosnippet.org about populating the choices in the init field. It works fine now. On May 26, 9:30 am, V wrote: > On May 25, 1:27 pm, Simon Davies wrote: > > > > > I have a choices field called status in my model form which can be s

why no modelformset from a modelform?

2009-05-27 Thread nbv4
I have a model which has about 4 fields. One of those fields is a foreign key to another model which has over 40,000 objects in the database. When I create a 'stock' ModelForm of this model, and display it in a template, it wants to create a with 40,000 items. I have created a custom ModelForm fo

Re: Logged-in user in prepopulated_fields

2009-05-27 Thread V
On May 26, 1:08 pm, "Daniele Procida" wrote: > Does something exist there something along the lines of: > >     prepopulated_fields = { >         "author": ([something to retrieve currently-logged-in user from >         authmod.User],) >         } > > Thanks, > > Daniele you should simply pass a

Re: Validation with two fields

2009-05-27 Thread V
On May 27, 5:56 am, Diogo Baeder wrote: > Hi, > > I've got two fields, in a model object: "from_date" and "to_date". How > can I make the admin controller or model validate if the "from_date" > field has always a lower value than "to_date"? Both are > "django.db.models.DateField", but how can I c

Re: Integrity error handling

2009-05-27 Thread orokusaki
In your form sub-class class you'll need to override the clean method to check for duplicate entries and raise a validation error if they exists: from somewhere import models from somewhere import forms class myForm(forms.ModelForm): some_unique_field = forms.CharField() class M

Environmental variables not recognized by mod_python

2009-05-27 Thread emy_66
My django site isn't able to read my environmental variable - PATH - when run by mod_python. In my .profile file my path is /usr/local/ ncbi:/usr/local/bin. This gives me access to programs I call using subprocess from django. Could I get your advice as to what I should do? A search on google tell

Re: FileBrowser: Installation Question

2009-05-27 Thread patrickk
I don´t quite understand your question. fb_settings is imported with the filebrowser-views ... not sure if that answers your question. patrick On May 27, 4:01 am, "Bob N." wrote: > OK, so how do I get the fb_settings to appear in the runtime Settings? > > On May 26, 12:51 am, patrickk wrote: