Re: More Than Two Models With inlineformset_factory

2009-08-11 Thread Matthias Kestenholz
On Wed, Aug 12, 2009 at 12:51 AM, Geraldo wrote: > > Excellent, Matthias...  That should work nicely.  It does appear, > however, that there is no way to have more than 2 forms in a single > formset.  If inlineformset_factory had an append method things might > be a bit cleaner. > I presume you m

Re: unique_together with None

2009-08-11 Thread gentlestone
Thank you for the explanation. Seems to be the correct solution of the problem (NULL, v1) != (NULL, v1) is overwrite the save method and check for existence of (NULL, v1) before saving a new instance of (NULL, v1). What I don't understand, why are the well-known databases so stupid and why they ca

Re: Django aggregates and having

2009-08-11 Thread lfrodrigues
Sorry I didn't explain my self properly. I want this query: SELECT (date_format(date, '%%U')) AS `d`, SUM (`profile_scorehistory`.`points`) AS `l` FROM `profile_scorehistory` GROUP BY date_format(date, '%%U') HAVING `d`= 2 How can I make it with ORM? The other one was the only similar query I

Re: django-tinymce not appearing in admin

2009-08-11 Thread Kenneth Gonsalves
On Wednesday 12 Aug 2009 11:08:55 am diogobaeder wrote: > I configured django-tinymce extension to work with a model field; It > loads all the JavaScript correctly, right after the field, in a script > tag, passing the right element ID, but the editor simply doesn't show, > only the original texta

Re: Deploying django on apache - cant access database

2009-08-11 Thread consiglieri
Thanks Graham! The absolute path was the issue. Can't believe I couldnt find that anywhere. As for the Alias, well i was just testing to make sure that wasnt an issue.And its in the httpd.conf , for perl-cgi you need that so since i was having issues i decided to try and see if it was causing my

django-tinymce not appearing in admin

2009-08-11 Thread diogobaeder
Hi, I configured django-tinymce extension to work with a model field; It loads all the JavaScript correctly, right after the field, in a script tag, passing the right element ID, but the editor simply doesn't show, only the original textarea is present. Here is a piece of my project where TinyMCE

django-tagging not working in 1.1?

2009-08-11 Thread nbv4
I'm having trouble getting my tagged modles registered in 1.1 When I have "tagging.register(MyModel)" at the bottom, I get this error when I try to add a new instance of that model in the admin: "null value in column "object_id" violates not-null constraint" full traceback:

Re: django 0.96.4 does not has django.utils._os

2009-08-11 Thread dongua
1177 def runserver(addr, port, use_reloader=True, admin_media_dir=''): 1178

Re: django 0.96.4 does not has django.utils._os

2009-08-11 Thread dongua
after i download ] http://code.djangoproject.com/browser/django/branches/0.96-bugfixes/django/utils/_os.py and runserver: Development server is running at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK. Unhandled exception in thread started by Traceback (most recent call last): File "D

Re: Location of Change User admin template

2009-08-11 Thread Karen Tracey
On Tue, Aug 11, 2009 at 11:57 PM, Russell Keith-Magee < freakboy3...@gmail.com> wrote: > > On Wed, Aug 12, 2009 at 10:24 AM, Karen Tracey wrote: > > On Tue, Aug 11, 2009 at 4:14 PM, bfrederi > wrote: > >> > >> I was browsing contrib/admin templates for the "Change User" template > >> that allows

Re: Location of Change User admin template

2009-08-11 Thread Russell Keith-Magee
On Wed, Aug 12, 2009 at 10:24 AM, Karen Tracey wrote: > On Tue, Aug 11, 2009 at 4:14 PM, bfrederi wrote: >> >> I was browsing contrib/admin templates for the "Change User" template >> that allows you to change the user's permissions and such. I can't >> seem to find it though. Can anyone point me

Re: imitating a spreadsheet (kind of) with formsets

2009-08-11 Thread Karen Tracey
On Tue, Aug 11, 2009 at 7:49 PM, Chris Curvey wrote: > > So, is there a way for me to get a form field out of a form from > within the templating language? I'd like to do something like this: > > {% for field_name in field_names %} > > {{ field_name }} > {% for form in formset %} > {{ form[f

Re: Location of Change User admin template

2009-08-11 Thread Karen Tracey
On Tue, Aug 11, 2009 at 4:14 PM, bfrederi wrote: > > I was browsing contrib/admin templates for the "Change User" template > that allows you to change the user's permissions and such. I can't > seem to find it though. Can anyone point me in the right direction? Admin doesn't have special templa

Re: problem with django_openid

2009-08-11 Thread Kenneth Gonsalves
On Wednesday 12 Aug 2009 7:36:57 am Malcolm Tredinnick wrote: > On Wed, 2009-08-12 at 07:10 +0530, Kenneth Gonsalves wrote: > > hi > > was trying to install django_openid on latest svn head. I am getting this > > error - do not know whether it is mine or openid's > > The main error I see here is a

newbie queryset question

2009-08-11 Thread joep
I have a model which contains a list of users and a list of groups that can access the model, e.g,, readers = models.ManyToManyField(User, blank=True, null=True,) reader_groups = models.ManyToManyField(Group, blank=True, null=True,) where User and Group are the standard django auth model

Re: problem with django_openid

2009-08-11 Thread Malcolm Tredinnick
On Wed, 2009-08-12 at 07:10 +0530, Kenneth Gonsalves wrote: > hi > was trying to install django_openid on latest svn head. I am getting this > error - do not know whether it is mine or openid's The main error I see here is a complete failure to use cut-and-paste view from the debug screen when p

Re: syncdb with ForeignKey to_field outputs statements in wrong order

2009-08-11 Thread Malcolm Tredinnick
On Tue, 2009-08-11 at 12:00 -0700, physicsnick wrote: > Actually they don't need to be unique (and I don't want them to be > unique). MySQL does not require that foreign keys be unique; only that > they be indexed. > > I am actually using this for a temporal database. There are many > instances o

Re: How to get this auto-field id value

2009-08-11 Thread Malcolm Tredinnick
On Tue, 2009-08-11 at 17:27 -0700, David wrote: > Any tips/suggestions are highly appreciated... One tip is to wait more than eight hours before posting "please help me" yet again. > > > > On Aug 11, 9:26 am, David wrote: > > Just a little more information. The autoField id is in the model >

Re: dates with a different format in the db

2009-08-11 Thread Malcolm Tredinnick
On Tue, 2009-08-11 at 08:58 -0700, Vokial wrote: > Hi! > In a db i have, already filled up with data, i have a varchar field > which contains dates formatted like "mmdd". Is there a way to make > Django recognise that field as a proper DateField even if the > formatting is different than the u

Re: Django aggregates and having

2009-08-11 Thread Russell Keith-Magee
On Wed, Aug 12, 2009 at 5:50 AM, lfrodrigues wrote: > > Hi, > > I'm having some problems with "having": > > I want to group by date and restrict to a given week, in my tests I > can do this: > select_data = {"d": """date_format(date, '%%U')"""} > ScoreHistory.objects.extra(select=select_data).valu

problem with django_openid

2009-08-11 Thread Kenneth Gonsalves
hi was trying to install django_openid on latest svn head. I am getting this error - do not know whether it is mine or openid's trace back: Environment: Request Method: GET Request URL: http://ilugc.web/ Django Version: 1.2 pre-alpha SVN-11422 Python Version: 2.6.0 Installed Applications: ['dj

Re: AUTH_PROFILE_MODULE in "Definitive Guide" Second Edition?

2009-08-11 Thread Watts Martin
On Aug 11, 5:30 pm, James Bennett wrote: > Seeing as how Django's documentation still covers everything you need > to know about it, it's unlikely there's something newer you're > missing. I didn't *think* so, but I am very good at making assumptions that prove to be wrong in practice! > It's t

Re: AUTH_PROFILE_MODULE in "Definitive Guide" Second Edition?

2009-08-11 Thread James Bennett
On Tue, Aug 11, 2009 at 7:16 PM, Watts Martin wrote: > I've noticed with some mild consternation that there's absolutely no > documentation for using AUTH_PROFILE_MODULE in the new edition of > _Definitive Guide to Django,_ nor is there any indication of something > else I should be using instead

Re: How to get this auto-field id value

2009-08-11 Thread David
Any tips/suggestions are highly appreciated... On Aug 11, 9:26 am, David wrote: > Just a little more information. The autoField id is in the model > class.  Model_Form is a form based on this model class. > > On Aug 11, 9:20 am, David wrote: > > > > > Hello, > > > I am trying to retrieve an a

AUTH_PROFILE_MODULE in "Definitive Guide" Second Edition?

2009-08-11 Thread Watts Martin
I've noticed with some mild consternation that there's absolutely no documentation for using AUTH_PROFILE_MODULE in the new edition of _Definitive Guide to Django,_ nor is there any indication of something else I should be using instead of that if this is being deprecated. So is this safe to use?

Re: Date-based generic view not working

2009-08-11 Thread Thomas Jaggi
It was in fact the timezone. A few hours later it magically worked. ;) Thanks for your help! --~--~-~--~~~---~--~~ 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@goog

Re: inspectdb and postgresql schema

2009-08-11 Thread Russell Keith-Magee
On Tue, Aug 11, 2009 at 10:41 PM, Marek Pietrucha wrote: > > Hello, > > I have a relational database written in PostgreSQL 8.4. I use > different schemas - not default public schema. I tried to inspectdb my > database but the output was clean. It looked like the inspectdb tool > didn't look in my

Re: imitating a spreadsheet (kind of) with formsets

2009-08-11 Thread Chris Curvey
On Aug 10, 10:13 pm, Malcolm Tredinnick wrote: > On Mon, 2009-08-10 at 19:07 -0700, Chris Curvey wrote: > > What I want to do is have a series of forms, all next to each other in > > table format, like this: > > > Car     Honda      Toyota       Chevy > > Price   $12,000    $14,000   $10,000 >

Re: Model example for simple family tree

2009-08-11 Thread Mike Dewhirst
sniper wrote: > Hi, > I am new to django and wanted to try it out. > > I would like to create a table for family tree > where Relation is a many to many table which contains Profile ids > > profile_id, relative_id,type,priority. > > RELATIVE_CHOICES = ( > (u'F', u'Father'), > (u

Re: More Than Two Models With inlineformset_factory

2009-08-11 Thread Geraldo
Excellent, Matthias... That should work nicely. It does appear, however, that there is no way to have more than 2 forms in a single formset. If inlineformset_factory had an append method things might be a bit cleaner. Thanks again for your help. geraldo On Aug 11, 3:55 pm, Matthias Kestenholz

Re: Post matching query does not exist.

2009-08-11 Thread Daniel Roseman
On Aug 11, 8:27 pm, When ideas fail wrote: > After some more experiments i've decided its definetly some sort of > problem with the URLs, if i comment one out the 2nd works and if i > have them uncomment it doesn't. > > Can anyone help me with this please? > > On 11 Aug, 19:30, When ideas fail w

Model example for simple family tree

2009-08-11 Thread sniper
Hi, I am new to django and wanted to try it out. I would like to create a table for family tree where Relation is a many to many table which contains Profile ids profile_id, relative_id,type,priority. RELATIVE_CHOICES = ( (u'F', u'Father'), (u'M', u'Mother'), (u'B', u'Br

Re: Deploying django on apache - cant access database

2009-08-11 Thread Graham Dumpleton
For SQLite database, the directory the database is in must also be writable to user that Apache runs as. The location of the database in settings file must also be an absolute path, can't use a relative path. BTW, what is: Alias test.django.com "/Users/someone/djangoproject/appname" for in co

Re: More Than Two Models With inlineformset_factory

2009-08-11 Thread Matthias Kestenholz
On Tue, Aug 11, 2009 at 10:04 PM, Geraldo wrote: > > Hi, > > I'm new to Django and am putting together a page for my new site.  I > want to be able to edit data that is contained in 3 models, organized > as follows: > Parent >  --> Child 1 (always one to one) >  --> Child 2 (one or more) > > I und

Re: is Django a good choice for a LAN app?

2009-08-11 Thread Matthias Kestenholz
On Tue, Aug 11, 2009 at 10:00 PM, Peterle wrote: > > Perhaps Zope-Plone is more suitable for that purpose. Perhaps not. Do you have anything to back this statement? (I'm not saying it's untrue, I'm just trying to point out that this contribution wasn't particularly helpful. A bit more on topic:

Django aggregates and having

2009-08-11 Thread lfrodrigues
Hi, I'm having some problems with "having": I want to group by date and restrict to a given week, in my tests I can do this: select_data = {"d": """date_format(date, '%%U')"""} ScoreHistory.objects.extra(select=select_data).values('d').annotate (l=Sum("points")).filter(l=2).query.as_sql() sql:

Re: Apache mod_wsgi Django setup - Forbidden You don't have permission to access /mysite on this server.

2009-08-11 Thread Graham Dumpleton
On Aug 12, 12:13 am, justin jools wrote: > Ive been the install instructions in > :http://wiki.thinkhole.org/howto:django_on_windows%E2%80%8F > (with mod_wsgi) > > install python 26, Apache 2.2, modwsgi ap2.2 py26 > > and apache loads modwsgi fine. > > when I check localhost: apache says - It

More Than Two Models With inlineformset_factory

2009-08-11 Thread Geraldo
Hi, I'm new to Django and am putting together a page for my new site. I want to be able to edit data that is contained in 3 models, organized as follows: Parent --> Child 1 (always one to one) --> Child 2 (one or more) I understand I can do the following: class Parent(models.Model): name

Re: is Django a good choice for a LAN app?

2009-08-11 Thread Peterle
Perhaps Zope-Plone is more suitable for that purpose. _ On Aug 11, 9:06 pm, snfctech wrote: > I'm about to start a fairly large project for a mid-sized business > with a lot of integration with other systems (POS, accounting, > website, inventory, purchasing, etc.) The purpose of

Re: Extending Django-cms Menu

2009-08-11 Thread odonnell
Try getting it to work with one blog first. On Aug 11, 7:10 am, Alessandro Ronchi wrote: > 2009/8/11 Alessandro Ronchi > > > I have a django-cms app with this menu: > > I've partially solved my problem. > but it doesn't get get_title from the model. > > It's very strange, because I've followed

Re: Extending Django-cms Menu

2009-08-11 Thread odonnell
Never mind, I read your question wrong. On Aug 11, 7:10 am, Alessandro Ronchi wrote: > 2009/8/11 Alessandro Ronchi > > > I have a django-cms app with this menu: > > I've partially solved my problem. > but it doesn't get get_title from the model. > > It's very strange, because I've followed the

Re: django newbie, having problems with my first app. maybe in the urls.py?

2009-08-11 Thread ezulo...@gmail.com
AHA, both of those were the problem :) got my hello world working, im sure i'll have many more questions! Thanks!!! On Aug 10, 5:06 am, gumbah wrote: > Whoops... i see now that it never even finds your urs.py so it must be > something wrong with the configuration on webfaction... > > you have

Re: is Django a good choice for a LAN app?

2009-08-11 Thread Joshua Russo
On Tue, Aug 11, 2009 at 6:06 PM, snfctech wrote: > > I'm about to start a fairly large project for a mid-sized business > with a lot of integration with other systems (POS, accounting, > website, inventory, purchasing, etc.) The purpose of the system is to > try to reduce current data siloing and

Location of Change User admin template

2009-08-11 Thread bfrederi
I was browsing contrib/admin templates for the "Change User" template that allows you to change the user's permissions and such. I can't seem to find it though. Can anyone point me in the right direction? --~--~-~--~~~---~--~~ You received this message because you a

Re: is Django a good choice for a LAN app?

2009-08-11 Thread Antoni Aloy
2009/8/11 snfctech : > > I'm about to start a fairly large project for a mid-sized business > with a lot of integration with other systems (POS, accounting, > website, inventory, purchasing, etc.) The purpose of the system is to > try to reduce current data siloing and give employees role-based >

Re: Post matching query does not exist.

2009-08-11 Thread When ideas fail
After some more experiments i've decided its definetly some sort of problem with the URLs, if i comment one out the 2nd works and if i have them uncomment it doesn't. Can anyone help me with this please? On 11 Aug, 19:30, When ideas fail wrote: > Hi, I have a strange error which i hope someone

is Django a good choice for a LAN app?

2009-08-11 Thread snfctech
I'm about to start a fairly large project for a mid-sized business with a lot of integration with other systems (POS, accounting, website, inventory, purchasing, etc.) The purpose of the system is to try to reduce current data siloing and give employees role-based access to the specific data entry

Re: Javascript with built-in templates tags

2009-08-11 Thread Michael
On Tue, Aug 11, 2009 at 2:53 PM, WilsonOfCanada wrote: > > I want to access the string from the list that is in the dictionary: > > function changeArea() > { >alert({{list_areas.British_Columbia}}); > } > > I get what I want in the generated HTML: > > function changeArea() > { >

Re: syncdb with ForeignKey to_field outputs statements in wrong order

2009-08-11 Thread physicsnick
Actually they don't need to be unique (and I don't want them to be unique). MySQL does not require that foreign keys be unique; only that they be indexed. I am actually using this for a temporal database. There are many instances of an Author with the same code (an instance for each time it was c

Re: Javascript with built-in templates tags

2009-08-11 Thread WilsonOfCanada
I want to access the string from the list that is in the dictionary: function changeArea() { alert({{list_areas.British_Columbia}}); } I get what I want in the generated HTML: function changeArea() { alert(['Metro Vancouver', 'Metro Vancouver A', 'Sunshine Coast']); } Howev

Re: Deploying django on apache - cant access database

2009-08-11 Thread consiglieri
Thanks for the tip, however it does not make a difference. I moved the app to another catalogue and made sure that the database file was chmod to 755 and also that all directories have the same permissions. The error remains. There is something happening that i dont understand. I'm beginning to t

Post matching query does not exist.

2009-08-11 Thread When ideas fail
Hi, I have a strange error which i hope someone might be able to help me with. Two of my urls seems to be conflicting somehow. i have these two URLs: (r'^blog/(?P.+)/$', 'mysite.blog.views.title_view'), (r'^blog/category/(?P.+)/$', 'mysite.blog.views.category_view'),

Re: paginator for 0.96?

2009-08-11 Thread Mike Ramirez
On Tuesday 11 August 2009 10:45:53 am Bobby Roberts wrote: > anyone have ideas on this? Django Snippets has a couple http://www.djangosnippets.org/snippets/394/ and http://www.djangosnippets.org/snippets/219/ these import modules from this file: http://code.djangoproject.com/svn/django/bra

Re: paginator for 0.96?

2009-08-11 Thread Bobby Roberts
anyone have ideas on this? --~--~-~--~~~---~--~~ 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 to django

Re: Date/time field styling?

2009-08-11 Thread mhulse
Hi! > Look at the SplitDateTimeWidget in django.forms.widgets. I am sorry to be a complete noob here, but I am not sure how I can use SplitDateTimeWidget to break-up the two dat/time fields? I am actually using django-schedule: Looks lik

Re: Deploying django on apache - cant access database

2009-08-11 Thread Mike Ramirez
On Tuesday 11 August 2009 09:43:38 am consiglieri wrote: > Hi > > I'm new with django and have made a small test app which works as it > should with the development server. > > However when i try and deploy it with apache and mod_python I cant get > it to work. I have tested that mod_python works.

Re: Apache mod_wsgi Django setup - Forbidden You don't have permission to access /mysite on this server.

2009-08-11 Thread Gustavo Henrique
Do you using a windows ou linux? if it's linux, try: create a dir: /home/user/django and put your project inside it and create a file called mysite.wsgi in same dir containing: import os, sys sys.path.append('/usr/lib/python2.6/site-packages/django/') sys.path.append('/home/user/myproject') os.e

Re: How do I show generic relationship items with my generic inline on Django Admin page?

2009-08-11 Thread chyea
Oops. I don't mean to triple post, here, but I think the original post might be slightly confusing. When I say that I'd like to be able to select from existing RelatedLinks, I don't mean that I'd like to view the existing relationships between the new Entry model and the RelatedLinks model. The g

Re: How to show the email field in a UserCreationForm?

2009-08-11 Thread Berco Beute
To reply to my own question...I've extended UserCreationForm as follows: == class UserCreationFormExtended(UserCreationForm): def __init__(self, *args, **kwargs): super(UserCreationFormExtended, self).__init__(*args, **kwargs) self.fields['first_name'].require

Deploying django on apache - cant access database

2009-08-11 Thread consiglieri
Hi I'm new with django and have made a small test app which works as it should with the development server. However when i try and deploy it with apache and mod_python I cant get it to work. I have tested that mod_python works. I can do the recommended mod_python test. When i try to run the djan

How to show the email field in a UserCreationForm?

2009-08-11 Thread Berco Beute
Hi, I'm using the UserCreationForm for creating users, but I would like to show the email, firstname and lastname fields as well (and they should be required). Much like the view you get when adding a user through the admin interface. What's the best way to do this? Extend UserCreationForm? Or cr

Re: How do I show generic relationship items with my generic inline on Django Admin page?

2009-08-11 Thread chyea
I'm still a little lost, here. I'm not sure how I'd do this. On Aug 10, 10:58 pm, chyea wrote: > Hi all, > > I've just finished reading through the docs, and following > ubernostrum's blog post about generic inlines. Generic relationships > and generic inlines are exactly what I'm looking for. T

Re: How to get this auto-field id value

2009-08-11 Thread David
Just a little more information. The autoField id is in the model class. Model_Form is a form based on this model class. On Aug 11, 9:20 am, David wrote: > Hello, > > I am trying to retrieve an autoField id value in my following code > when I update records. > > def update_record(request): >  

How to get this auto-field id value

2009-08-11 Thread David
Hello, I am trying to retrieve an autoField id value in my following code when I update records. def update_record(request): if request.POST: form = Model_Form(request.POST) if form.is_valid(): form.save(pk=form.id, force_update=True) I got an error that "Model_F

dropping django admin change password urls

2009-08-11 Thread David De La Harpe Golden
I'm using a simple ldap authentication backend, and the admin password change functionality may need to be disabled or mangled to do the right thing (currently going for disabled, can just redirect to different password change form), as it changes the django User model password, which at best wil

dates with a different format in the db

2009-08-11 Thread Vokial
Hi! In a db i have, already filled up with data, i have a varchar field which contains dates formatted like "mmdd". Is there a way to make Django recognise that field as a proper DateField even if the formatting is different than the usual "-mm-dd" ? Because i can't alter the data in that

Re: Django, CMS, CSS newbie question

2009-08-11 Thread Juan Hernandez
you can start here www.djangobook.com On Tue, Aug 11, 2009 at 10:58 AM, eldonp2 wrote: > I would like to start my own website. I > figured, since I don't know much, that I would start with a CSS > template and work back. How can I use a free template and then > integrate Django-Cms and Django i

Re: can't get comment moderation working, following docs

2009-08-11 Thread shannon
Edit: correct url is http://dpaste.com/78282/ --~--~-~--~~~---~--~~ 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, se

can't get comment moderation working, following docs

2009-08-11 Thread smcoll
i was having trouble enabling comment moderation in my app, so i decided to make a test app that would follow the docs at http://docs.djangoproject.com/en/dev/ref/contrib/comments/moderation/ as closely as possible. Unfortunately, moderation still isn't working for me: - If i create an Entry wit

Django, CMS, CSS newbie question

2009-08-11 Thread eldonp2
Hi, I'm new to programming. I would like to start my own website. I figured, since I don't know much, that I would start with a CSS template and work back. How can I use a free template and then integrate Django-Cms and Django into it? Thanks alot. Eldon --~--~-~--~~~

Re: Question about request.user

2009-08-11 Thread David
This fixes the problem. Thanks Gustavo! On Aug 11, 6:07 am, Gustavo Henrique wrote: > maybe a problem with cache. > try this: > > from django.views.decorators.cache import never_cache > @never_cache > def yourview(request): >    # your code here > > -- > Gustavo Henriquehttp://www.gustavohenriq

Re: connectiong querysets

2009-08-11 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 http://docs.djangoproject.com/en/dev/topics/db/queries/#complex-lookups-with-q-objects Luke Seelenbinder luke.seelenbin...@gmail.com http://www.google.com/profiles/luke.seelenbinder On Tue, Aug 11, 2009 at 9:38 AM, elminio wrote: -BEGIN PGP S

Re: How-to use SelectMultiple widget with CommaSeparatedIntegerField ?

2009-08-11 Thread nono
I wrote a clean_csi() method and I call it in each clean_() method passing the field name and and it's working now Here is the code def clean_csi(self, field): data = self.cleaned_data[field] data.sort() csi_list = [] first_element = True for element i

Re: Sort by output of arbitrary method

2009-08-11 Thread Javier Guerra
On Tue, Aug 11, 2009 at 2:47 AM, Harish wrote: > s there any other way of doing this? read the whole result set and use Python sorting. -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: unique_together with None

2009-08-11 Thread Karen Tracey
On Tue, Aug 11, 2009 at 10:40 AM, Alex Gaynor wrote: > > On Tue, Aug 11, 2009 at 8:25 AM, gentlestone > wrote: > > > > On 11. Aug, 15:01 h., Gustavo Henrique wrote: > >> Try also: null=True, blank=True > >> > >> -- > >> Gustavo Henriquehttp://www.gustavohenrique.nethttp:// > blog.gustavohenrique

quick django gig $300

2009-08-11 Thread Bobby Roberts
contact me privately for more information. A friend needs help wrapping up a project. I'll provide his email address to interested parties. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

inspectdb and postgresql schema

2009-08-11 Thread Marek Pietrucha
Hello, I have a relational database written in PostgreSQL 8.4. I use different schemas - not default public schema. I tried to inspectdb my database but the output was clean. It looked like the inspectdb tool didn't look in my schemas. I thought it was the matter of the pg driver, so I changed it

Re: unique_together with None

2009-08-11 Thread Alex Gaynor
On Tue, Aug 11, 2009 at 8:25 AM, gentlestone wrote: > > On 11. Aug, 15:01 h., Gustavo Henrique wrote: >> Try also: null=True, blank=True >> >> -- >> Gustavo Henriquehttp://www.gustavohenrique.nethttp://blog.gustavohenrique.net > > blank=True ... I have had, but this one doesn't solve the problem,

Re: IE problems w. admin save

2009-08-11 Thread Jesper Rasmussen
I've just updated my IE from 7 to 8 and the problem is gone ... :o) Only problem left is that the customers are currently all using IE7 ... sigh :o( Cheers, Jesper On 11 Aug., 12:59, Jesper Rasmussen wrote: > I've made some more experiments, and it does seem to be a (database?) > timing iss

Re: Dumping Large Databases

2009-08-11 Thread Alex Gaynor
On Tue, Aug 11, 2009 at 5:37 AM, Chris Spencer wrote: > > I guess I should have prefixed that by saying my goal is to migrate > from MySQL to PostgreSQL. However, I'm having trouble finding a tool > to do this, so I thought I'd try Django's backend neutral > dumpdata/loaddata feature. > > Chris >

Concurrent Web Access and Edits

2009-08-11 Thread Doug Blank
New Django user here with a question about the client side: Is there built-in support for dealing with concurrent edits? I'm not referring to the database issues (locking, etc) but is there Django support for handling a request to access or edit data for which another user is editing? I'm thinkin

Apache mod_wsgi Django setup - Forbidden You don't have permission to access /mysite on this server.

2009-08-11 Thread justin jools
Ive been the install instructions in : http://wiki.thinkhole.org/howto:django_on_windows%E2%80%8F (with mod_wsgi) install python 26, Apache 2.2, modwsgi ap2.2 py26 and apache loads modwsgi fine. when I check localhost: apache says - It works! when I check 127.0.0.1:8000: Django says - It worke

Re: Extending Django-cms Menu

2009-08-11 Thread Alessandro Ronchi
2009/8/11 Alessandro Ronchi > I have a django-cms app with this menu: I've partially solved my problem. but it doesn't get get_title from the model. It's very strange, because I've followed the documentation example on http://github.com/digi604/django-cms-2.0/blob/18d184375fdf2e94a5c5a26bbe57a

session management problem

2009-08-11 Thread Oguz Yarimtepe
Hi all, In my application i have a login screen. The view is simple as below: loginform=None formvalid=True if request.method == "POST": username = request.POST['username'] password = request.POST['password'] loginform=LoginForm(request.POST)

Extending Django-cms Menu

2009-08-11 Thread Alessandro Ronchi
I have a django-cms app with this menu: - Apples -> Red Apples -> Green Apples - Oranges -> Big oranges - Lemons - New Lemon types I must add another link (a blog category) to Apples and Oranges first level menu, to achieve this result: - Apples -> Red Apples -> Green Apples -> Blog (app

connectiong querysets

2009-08-11 Thread elminio
Hello, Is it possiblo to merge Querystets into one big Queryset? --~--~-~--~~~---~--~~ 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

Re: unique_together with None

2009-08-11 Thread gentlestone
On 11. Aug, 15:01 h., Gustavo Henrique wrote: > Try also: null=True, blank=True > > -- > Gustavo Henriquehttp://www.gustavohenrique.nethttp://blog.gustavohenrique.net blank=True ... I have had, but this one doesn't solve the problem, maybe the problem is in postgresql, the associated SQL code fo

Re: django 0.96.4 does not has django.utils._os

2009-08-11 Thread Russell Keith-Magee
On Tue, Aug 11, 2009 at 8:37 PM, dongua wrote: > > /django/core/servers/basehttp.py > code: > from django.utils._os import safe_join > > but there does not has any _os.py in pacakge, and after install 0.96.4 > will can't runserver It appears that the security fix that was committed in r11354 was

Re: Question about request.user

2009-08-11 Thread Gustavo Henrique
maybe a problem with cache. try this: from django.views.decorators.cache import never_cache @never_cache def yourview(request): # your code here -- Gustavo Henrique http://www.gustavohenrique.net http://blog.gustavohenrique.net --~--~-~--~~~---~--~~ You re

Re: unique_together with None

2009-08-11 Thread Gustavo Henrique
Try also: null=True, blank=True -- Gustavo Henrique http://www.gustavohenrique.net http://blog.gustavohenrique.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Django for smaller sites

2009-08-11 Thread Gustavo Henrique
Django is the best option for websites. It's very good for e-commerce, cms, ERP, CRM, etc. IMHO, the bests frameworks are: 1. Django 2. Rails 3. CakePHP 4. Code Igniter PS.: I tried all php frameworks, but python frameworks only django. See about web2py too. -- Gustavo Henrique http://www.gus

Re: django 0.96.4 does not has django.utils._os

2009-08-11 Thread Karen Tracey
On Tue, Aug 11, 2009 at 8:37 AM, dongua wrote: > > /django/core/servers/basehttp.py > code: > from django.utils._os import safe_join > > but there does not has any _os.py in pacakge, and after install 0.96.4 > will can't runserver > Ugh, indeed this is broken. Fix is being looked into. Karen

Re: Default value for fields

2009-08-11 Thread AG
Thank you very much for all the responses. I found the source of the problem in my code. I was adding a property to Model Model.revision = property(fget=XXX, fset=YYY) which conflicted with the revision field I was having trouble with. Sorry for the confusion. Best, AG On Aug 10, 2:22 pm, Kar

django 0.96.4 does not has django.utils._os

2009-08-11 Thread dongua
/django/core/servers/basehttp.py code: from django.utils._os import safe_join but there does not has any _os.py in pacakge, and after install 0.96.4 will can't runserver --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: Dynamic/complex forms

2009-08-11 Thread Ludwik Trammer
Hi, I haven't tried it myself, but look at django-ajax-validation (http://github.com/alex/django-ajax-validation). Ludwik --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Django for smaller sites

2009-08-11 Thread moesian
Hi, I'm looking at using django for building my sites. I want to be able to build sites of varying size but the likelyhood is i'll be creating a number smaller low traffic sites. I was wondering if django is suitable for smaller sites ( simple cms, contact forms etc ) or would it be overkill ? W

Re: looping over forms in a formset

2009-08-11 Thread bnl
Thanks. Before I suggest anything concrete for the docs, let's see if my understanding is now right: The problem from my point of view was that I didn't think I had any hidden fields. Hence I didn't loop over them, and didn't think of them - yes, despite the massive hint in the error message .

unique_together with None

2009-08-11 Thread gentlestone
if I have unique_together = ('some_fk_field', 'some_plain_field') and some_fk = ...(null = True) the system allows put more intsances with some_fk_field=None and the same some_plain_field value I think, this is a bug. Or how can I manage to allow just one instance with null fk and the same ot

Re: IE problems w. admin save

2009-08-11 Thread Jesper Rasmussen
I've made some more experiments, and it does seem to be a (database?) timing issue: About once in 10 it shows the right page :o| My model is quite big ... about 40 entries of mixed types many having both blank and null. If nothing else works ... and good ideas of where to put in some pause to "s

Re: Standalone script with django's ORM and multiprocessing

2009-08-11 Thread Spajderix
prabhu S pisze: > Solution appears like a hack to me. Why do you close the connection in > every process? Can you not just close once in parent? Execute commits > alone in each process. > I've checked that. Unfortunately, in my case, it won't work. I have a loop looking like this: for job in

  1   2   >