Re: how to create bigint ?

2009-03-12 Thread xankya
Thanks Karen Tracey and Kegan Gan. I'll check the issues of storing large numbers later, and will post the results. > and is bigint(length=5) different that int > (length=5)? by this i meant to ask, creating bigint of length 5 (say) in mysql does make sense? in other words, for length 5, we wou

Re: how to create bigint ?

2009-03-12 Thread jai
i used to store mobile/phone number as follows phone=models.DecimalField(max_digits=10, decimal_places=0) so that u can store up to 10 digit or else if u want to store 12 digit number then give max_digits=12. Hope this will fix your problem. On Mar 13, 8:37 am, Kegan Gan wrote: > I was just faci

Re: Possible Paginator bug - duplicate SQL queries?

2009-03-12 Thread Karen Tracey
On Thu, Mar 12, 2009 at 11:24 PM, adrian wrote: > > I have a view that does not evaluate a queryset, it just adds filters > and order_by and then > passes it to Paginator (set to 50 per page) and the result is passed > to the template.The following SQL is generated (with some fields > omitted

Re: how to create bigint ?

2009-03-12 Thread Kegan Gan
I was just facing this 'requirement' a couple of days ago. I needed an Integer field that stores up to a hundred billion. Django's IntegerField get mapped as 32 bit field in PostgreSql, and just can represent integer over 2++ billion. (It worked on my development environment using sqlite though).

Possible Paginator bug - duplicate SQL queries?

2009-03-12 Thread adrian
I have a view that does not evaluate a queryset, it just adds filters and order_by and then passes it to Paginator (set to 50 per page) and the result is passed to the template.The following SQL is generated (with some fields omitted for clarity). I'm using Django 1.0.2 and MySQL 5.1. SELECT

Re: FileField - Forms - upload to not available

2009-03-12 Thread lucy
Fixed. It turned out I was reading my error log wrong. It wasn't the image field itself that was having trouble saving, but a pre_save signal that attempted to open the image and create a thumbnail. Yeah, instance.image.path doesn't exist yet. I moved that to a post_save signal and everything work

efficient Pagination of large queryset

2009-03-12 Thread adrian
I have users with 30K rows in the database and have to support various types of queries, some of which require raw SQL. I used a two-step approach to get the query_set, first do a raw SQL query to get a list of the ids of the rows I need, then filter the queryset with it. This isn't terribly f

Re: : msiexec and Python 2.6.1 on Windows

2009-03-12 Thread Adam V.
There is a bug in Python 2.6.1 (introduced in that version, it wasn't there in 2.6) which is that the CRT manifests aren't set up correctly. This prevents, for instance, compiling and using mod_python 2.6.1 against Apache without giving httpd.exe a manifest file. http://bugs.python.org/issue4566

Re: Mac Django Docs: Fluid Icon

2009-03-12 Thread Jacob Kaplan-Moss
On Thu, Mar 12, 2009 at 5:47 AM, Idan Gazit wrote: > http://www.flickr.com/photos/idangazit/3348201897/in/pool-fluid_icons Hey, that's slick -- thanks! Jacob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Getting stuck in transactions

2009-03-12 Thread Jacob Kaplan-Moss
On Tue, Mar 10, 2009 at 5:10 PM, Tom Davis wrote: > I have a command-line script that uses Django's ORM. For reasons > beyond my comprehension, it has a tendency to get "stuck" in > transactions. When I check the postgre server status, it simply shows > a connection that is "idle in transaction"

Re: redirect module...

2009-03-12 Thread Jacob Kaplan-Moss
On Wed, Mar 11, 2009 at 2:50 PM, RavenJade2006 wrote: > Is it because I did not put it in through the admin section?  Or is it > because the page I am trying to redirect from still actually exists? Assuming you're using Django's built-in redirect app (http://docs.djangoproject.com/en/dev/ref/con

Re: login_required

2009-03-12 Thread Jacob Kaplan-Moss
On Wed, Mar 11, 2009 at 7:10 PM, juanefren wrote: > Few times when I open any page in my site this error appears. > Caught an exception while rendering: name 'login_required' is not > defined. Somewhere in your app you're missing an import. Try grepping your source for "login_required" and check

Re: Question regarding post_save signal

2009-03-12 Thread Jacob Kaplan-Moss
On Wed, Mar 11, 2009 at 10:05 AM, uno...@gmail.com wrote: > is there a way that i can pass the user that generated the signal to > my signal handler ? No. The `post_save` signal is a feature of the model API, which doesn't know anything about these "users" of which you speak. Consider: if I dro

Re: Simple Dynamic Form Problem

2009-03-12 Thread Jacob Kaplan-Moss
On Wed, Mar 11, 2009 at 11:30 AM, Alex G wrote: > > Having referenced http://www.b-list.org/weblog/2008/nov/09/dynamic-forms/, > I set about in an attempt to make a dynamic form through a simple > change to __init__, but not all is well... > [snip] > .        super(RFSInputForm, self).__init__(se

Re: Posted data limits in django?

2009-03-12 Thread Jacob Kaplan-Moss
On Tue, Mar 10, 2009 at 11:22 PM, Greg wrote: > I've checked the actual posted data and it is all being posted > correctly, which leads me to the conclusion that something in django > itself is choking...? Can anyone help me with this? Is there a limit > as to how many form fields you can have?

Re: Using Model name in the url

2009-03-12 Thread Jacob Kaplan-Moss
On Tue, Mar 10, 2009 at 9:44 PM, Michael Strickland wrote: > So I've actually run into a new problem: declaring the permalink for > only the inherited models works fine, but whenever I query the > database using the base model's manager (so I can get results from all > of the inherited models), t

Re: Django blog for google app engine

2009-03-12 Thread Jacob Kaplan-Moss
On Tue, Mar 10, 2009 at 12:20 PM, Flank wrote: > where can i get open source blog on django for GAE? App Engine is new enough you'll probably have better luck writing one yourself. Here's a place to start: http://www.42topics.com/dumps/appengine/doc.html Jacob --~--~-~--~~-

Re: Comparing BoundField values in templates

2009-03-12 Thread George Song
I think the easier way is just to write a custom widget which subclasses RadioSelect and override the render() method to however you want to output the HTML. On Jan 19, 6:45 am, ekellner wrote: > Hi, I am having trouble working with a BoundField value in a template. > > What I have is a Interger

Re: how to create bigint ?

2009-03-12 Thread Karen Tracey
On Thu, Mar 12, 2009 at 2:26 PM, xankya wrote: > > I created an integer field for a mobile number as > mobile = models.IntegerField(max_length=20) > > In MySQL interface, it created an integer field with length 11. > > So my question is how to create bigint in mysql for storing big > numbers such

[OFFTOPIC]: msiexec and Python 2.6.1 on Windows

2009-03-12 Thread cjl
Sorry for the off-topic cross-post, but I have tried this question on the other python lists to no avail, and there are some wicked smart Python people that read this group. I am in the process of updating my little django project, instantdjango.com, and I'm running into a little problem with my

Re: Tutorial of creating a Poll

2009-03-12 Thread Karen Tracey
On Thu, Mar 12, 2009 at 1:47 PM, Fred Chevitarese wrote: > > Hello all ... > It´s my first post on here... > So, i´ve got a little problem when i follow the instructions to create > an app on Django. > I´ve created the Poll like the tutorial, and it´s all ok . > But when i try to put this on a vie

Re: Background Jobs

2009-03-12 Thread Stephen DeGrace
I was facing this problem myself recently. I am running Django 1.0.2 with Python 2.5.1 on Webfaction... I have a Gallery app that lets you upload photos through a web form, or else you can dump photos into the gallery directory with scp and the gallery auto-discovers them and builds model instances

Re: HIPAA, Django and User Authentication/Security

2009-03-12 Thread Mario
Peter, I don't disagree with you. However, based on Glen's security report ( I suspect they are using Nessus/Retina to produce the scan result i.e. CVE - Common vulnerabilities and exposure ),his question was: Does anyone know where to find such "stamp of approval" or "denial" from HIPAA's point

Re: delete in formset by clearing fields instead of checkbox

2009-03-12 Thread Alex Gaynor
On Thu, Mar 12, 2009 at 5:34 PM, akaihola wrote: > > I have an inline formset with three CharFields in each form of a child > object. For usability reasons, I'd like deleting to happen when all > fields of a form are blank (or whitespace-only) instead of using a > delete checkbox. > > I'm looking

delete in formset by clearing fields instead of checkbox

2009-03-12 Thread akaihola
I have an inline formset with three CharFields in each form of a child object. For usability reasons, I'd like deleting to happen when all fields of a form are blank (or whitespace-only) instead of using a delete checkbox. I'm looking at save_existing_objects() in django/forms/models.py: 399-421

Re: HIPAA, Django and User Authentication/Security

2009-03-12 Thread Peter Herndon
> You speak > of HIPAA which translates to FISMA requirements. I suspect they are complementary, not equivalent. > I assume your web > application i.e  MYSQL will be storing Personal Identifiable > Information (PII) such SSN, etc... In this case, you may have tough > battle getting your web appl

Re: HIPAA, Django and User Authentication/Security

2009-03-12 Thread Peter Herndon
Hi Glen, I am not a lawyer, so please bear that in mind. However, I do work for a major hospital, and have some experience with making IT systems compliant with HIPAA regulations. That said, it's been a few years since I was involved in that directly. So my experience may well be out of date.

Re: HIPAA, Django and User Authentication/Security

2009-03-12 Thread Mario
Jarvis, If you are looking for a 'Stamp of Approval', you may be looking at the wrong place. Django is an "Open Source" web framework which hasn't been formally certified and accredited by the US Government. You speak of HIPAA which translates to FISMA requirements. I assume your web application

Re: pagination problem with "Next" and saving results as a dictionary

2009-03-12 Thread Micah Ransdell
Jesse, You need to change your code in the view to look at the GET parameter rather than POST. Change this line: query = request.POST['q'] to: query = request.GET['q'] Also, make sure when you are submitting to your search page that you are submitting the page with GET in the method of your fo

Re: pagination problem with "Next" and saving results as a dictionary

2009-03-12 Thread Jesse
Hello Micah, I tried this in the template: next The browser URL is: http://127.0.0.1:8000/Search/?q=?&page=2 and this in the template: next The browser URL is: http://127.0.0.1:8000/Search/?q=harris&page=2, which is correct for q, but the error for both is still: Request Method: GE

problem with permission to delete objects with ManyToManyField relations

2009-03-12 Thread Michael Repucci
Hi Django'ers, I've got three models, call them A, B, and C. A contains a ManyToManyField to model B. Users in my admin can add/change/delete B and C but not A. When users delete C, there is no problem. However, when users attempt to delete B, permission is denied due to the relation to A, which

Re: Background Jobs

2009-03-12 Thread Mad Sweeney
- Original Message - From: "prestontimmons" To: "Django users" Sent: Thursday, March 12, 2009 3:38 AM Subject: Re: Background Jobs > > If you don't mind setting up your jobs as manage.py commands you can > use django-chronograph to manage them as cron jobs through the admin > console

HIPAA, Django and User Authentication/Security

2009-03-12 Thread Glen Jarvis
I have a customer who has a Django application that I have upgraded to Django 1.1. The customer wants to take this software in a more public arena. He has to get HIPAA approval. The data is stored in a MySQL database and the standard Django User Authentication model is used (out of the box

Query regarding field.is_hidden

2009-03-12 Thread ramya
I want to set this variable for a ModelForm class BaseModel(models.Model): a_id = models.IntegerField(primary_key = True, editable = False) class MyForm(ModelForm): class Meta: model = BaseModel In my template {% if field.is_hidden %} {{ field }} {% else

Re: FileField - Forms - upload to not available

2009-03-12 Thread lucy
I have a similar problem in that upload_to is not being respected, even when saving. That is, the system tries to save the file directly in my MEDIA_ROOT folder, rather than the upload_to path. An error occurs, and the file does not appear to be saved anywhere. It works fine on Mac OS X.4 with sq

Re: on delete cascade - best way to do override this behaviour?

2009-03-12 Thread SnappyDjangoUser
I am in the same boat as Erwin. Does anyone have any suggestions on the best solution to avoid the cascading delete? Override the delete () method? Foreign key restrictions at the DB level? -Brian On Feb 9, 8:56 am, Erwin Elling wrote: > Dear community, > On some of our models we'd like to ov

Re: Help! Weird caching error is plaguing me!

2009-03-12 Thread bcrem
Thanks Rajesh - I'm not sure if that was the whole problem, but it seems to've been part of the solution. Login's working! Time to enjoy a milk-bone in a commie-free world... bc On Mar 12, 1:36 pm, Rajesh D wrote: > On Mar 12, 1:22 pm, bcrem wrote: > > > > > Hi Folks, > > > Problem Summary:

filter on a foreign key field

2009-03-12 Thread saeb
models.py class Accounts(models.Model): enabled = Models.BooleanField() balance = Models.DecimalField() def __str__(self): return self.enabled class User(models.Model) name = Models.TextField() accounts = Models.ForeignKey(Accounts)

how to create bigint ?

2009-03-12 Thread xankya
I created an integer field for a mobile number as mobile = models.IntegerField(max_length=20) In MySQL interface, it created an integer field with length 11. So my question is how to create bigint in mysql for storing big numbers such as mobile number. And my another mysql newbie question is wh

Re: Survey systems

2009-03-12 Thread shacker
On Mar 11, 5:10 pm, shacker wrote: > As far as I can tell, django-survey is the only pluggable survey app > available for Django right now. It's off to good start, but is still > very buggy, Just wanted to say thanks to yann.malet, who jumped in last night and fixed almost all of the crashing bu

formtools and formsets

2009-03-12 Thread James Smagala
Hey All, I'm working on a complex form, related to this snippet by me and the ensuing post by Malcolm: http://www.djangosnippets.org/snippets/1290/ http://www.pointy-stick.com/blog/2009/01/23/advanced-formset-usage-django/ I have now been asked to add a confirmation page for my html form. contri

Tutorial of creating a Poll

2009-03-12 Thread Fred Chevitarese
Hello all ... It´s my first post on here... So, i´ve got a little problem when i follow the instructions to create an app on Django. I´ve created the Poll like the tutorial, and it´s all ok . But when i try to put this on a view to show in a template i´ve got the problem. I´m from Brazil so, my m

Re: Do fields in html templates have to be displayed in {% for loops?

2009-03-12 Thread Rajesh D
On Mar 12, 12:53 pm, NoviceSortOf wrote: > In my html template i have something like > > {% for field in form %} >     {{ field.label_tag }} >     {{ field }} > {% endfor %} > > Which loops and displays the field name and field value in the form. > > On smaller forms, I would prefer to do

Re: Help! Weird caching error is plaguing me!

2009-03-12 Thread Rajesh D
On Mar 12, 1:22 pm, bcrem wrote: > Hi Folks, > > Problem Summary: How the heck do I clear ALL caching on my server; > python, apache, the works? > > So I'm updating a third-party library I've been using (implements > openID for my site - very cool stuff from Benoit Chesneau). It's > giving me

Help! Weird caching error is plaguing me!

2009-03-12 Thread bcrem
Hi Folks, Problem Summary: How the heck do I clear ALL caching on my server; python, apache, the works? So I'm updating a third-party library I've been using (implements openID for my site - very cool stuff from Benoit Chesneau). It's giving me fits though; I can't seem to shake the ghosts of

Re: pagination problem with "Next" and saving results as a dictionary

2009-03-12 Thread Jesse
Hello Micah, My view is too commplicated. The q and the pathologyid ( I actually have two other retrievals that also appended with these) are all appended into the "list". What I need to figure out is how to send the "list" to it's own dictionary, which I can then retrieve with a new view and u

allowing a user to delete their own account and associated data.

2009-03-12 Thread tristan
Hello there, I'm currently learning Django by re-implementing a site based on Pinax. In the Django admin site, I can delete an account and all its associated data by going into auth > account name and deleting it. This works just dandy. What I would like to do is to expose this same functionality

Django-Registration help

2009-03-12 Thread Bastien
Hi, I'd like to use the available functionality "terms of service" in Django-Registration but have no clue about how I do that. I already have the basic thing running on my project. thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed

Do fields in html templates have to be displayed in {% for loops?

2009-03-12 Thread NoviceSortOf
In my html template i have something like {% for field in form %} {{ field.label_tag }} {{ field }} {% endfor %} Which loops and displays the field name and field value in the form. On smaller forms, I would prefer to do this manually w/o the loop by saying something like. ... {{

Do fields in html templates have to be displayed in {% for loops?

2009-03-12 Thread NoviceSortOf
In my html template i have something like {% for field in form %} {{ field.label_tag }} {{ field }} {% endfor %} Which loops and displays the field name and field value in the form. On smaller forms, I would prefer to do this manually w/o the loop by saying something like. ... {{

Do fields in html templates have to be displayed in {% for loops?

2009-03-12 Thread NoviceSortOf
In my html template i have something like {% for field in form %} {{ field.label_tag }} {{ field }} {% endfor %} Which loops and displays the field name and field value in the form. On smaller forms, I would prefer to do this manually w/o the loop by saying something like. ... {{

Do fields in html templates have to be displayed in {% for loops?

2009-03-12 Thread NoviceSortOf
In my html template i have something like {% for field in form %} {{ field.label_tag }} {{ field }} {% endfor %} Which loops and displays the field name and field value in the form. On smaller forms, I would prefer to do this manually w/o the loop by saying something like. ... {{

Re: Odd integrity error behavior when saving data

2009-03-12 Thread Margie
Gotcha, thanks Malcolm. On Mar 11, 8:26 pm, Malcolm Tredinnick wrote: > On Wed, 2009-03-11 at 19:21 -0700, Margie wrote: > > I have a Tile model that contains a foreign to a Chip: > > > class Tile(models.Model): > >     name=models.CharField(max_length=NAME_LENGTH) > >     chip = models.ForeignK

Re: Help with adding custom validation to the admin

2009-03-12 Thread Vincent
On Mar 12, 10:16 am, Vincent wrote: > Thanks Alex. > > I spent the better part of my day yesterday pouring over both of those > pages prior to posting a request for help here. I think part of the > problem is that I only loosely understand the whole model, form, view > paradigm and am therefore

Re: traceback - no local variables

2009-03-12 Thread Alex Gaynor
On Thu, Mar 12, 2009 at 11:01 AM, George Lund wrote: > > > That certainly looks more useful than the default Django behaviour - > thanks very much. > > (I haven't tried it yet - but I assume I need to disable the standard > Django email if I use this, by removing the list of ADMINs. I wonder > if

Re: traceback - no local variables

2009-03-12 Thread George Lund
That certainly looks more useful than the default Django behaviour - thanks very much. (I haven't tried it yet - but I assume I need to disable the standard Django email if I use this, by removing the list of ADMINs. I wonder if that will have any other consequences?) On Mar 12, 7:13 am, Tho

Django Training with the Big Nerd Ranch in Atlanta, GA

2009-03-12 Thread Scott Newman
Hello all, I just wanted to let everyone know we still have seats left in our upcoming Django training class April 13-17, 2009. If you're new to Django, this course will get you up to speed and developing applications quickly! More information and the syllabus is available here: http://www.bigne

Re: Django critter helps us code at the speed of light.

2009-03-12 Thread Eric Walstad
On Mar 12, 1:17 am, Andrew McCloud wrote: > My first time using illustrator. My original goal was to make a nice > wallpaper but couldn't get illustrator to behave. Thanks Andrew, Lucinda thinks your work is "so awesome!" She printed it out and has it taped to the wall next to her bed. Eric. --~

django-profile instance data on custom form

2009-03-12 Thread simong
I'm creating a profile form that includes first_name and last_name fields that write to the User model and additional fields that write to my user profile model derived from Alex S's post here: http://groups.google.com/group/django-users/msg/00e49ca16c63762c class UserProfileForm(forms.Form):

Re: Localize URLs

2009-03-12 Thread Bastien
I will! :) On Mar 12, 3:26 pm, Dougal Matthews wrote: > OH yeah, Make sure you look at the cms2 branch in SVN. It's wy > better!http://trac.django-cms.org/trac/browser/branches/django-cms2 > Cheers, > Dougal > > --- > Dougal Matth

Re: How can I verify correction of the form with SelectMultiple widget field?

2009-03-12 Thread Alex Gaynor
On Thu, Mar 12, 2009 at 5:33 AM, Malcolm Tredinnick < malc...@pointy-stick.com> wrote: > > On Thu, 2009-03-12 at 02:55 -0700, K*K wrote: > > I got a strange problem. > > > > I specify a ChoiceField as SelectMultiple widget but got problem in > > validation. > > > > Can django ChoiceFIeld support v

Re: Localize URLs

2009-03-12 Thread Dougal Matthews
OH yeah, Make sure you look at the cms2 branch in SVN. It's wy better! http://trac.django-cms.org/trac/browser/branches/django-cms2 Cheers, Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/12 Bastien

Re: Help with adding custom validation to the admin

2009-03-12 Thread Vincent
On Mar 11, 6:56 pm, Alex Gaynor wrote: > For additional validation you should provide a custom > form:http://docs.djangoproject.com/en/dev/ref/contrib/admin/#form > > and to set the fields automatically you should use the save_model > hook:http://docs.djangoproject.com/en/dev/ref/contrib/admin

Re: Running Django on DreamHost

2009-03-12 Thread nagraj rao
Hi Shantanoo I've gone thru the same link for getting the Django up at the server. The only difference being i've installed the FLUP module instead of usign fcgi.py. The whole site is working perfect along with the MySql DB that i have on the server. My only problem is the lxml issue that i'm enco

Re: Localize URLs

2009-03-12 Thread Bastien
Thanks Dougal, I think you're right about django-cms supporting this feature, I'm going to dive in their code. Bastien On Mar 12, 2:40 pm, Dougal Matthews wrote: > You may want to consider trying django-cms. They support these feature > I believe. Of nothing else you could have a noesy at their

Re: Running Django on DreamHost

2009-03-12 Thread Shantanoo Mahajan (शंतनू महाजन)
Try http://wiki.dreamhost.com/index.php/Django This worked for me. Make sure you copy your sqlite db also (if you are using sqlite). regards, shantanoo On 12-Mar-09, at 5:33 PM, nagraj wrote: > > Hi > > I'm trying to run Django from Apache using FastCGI in a shared hosting > environment on D

Re: Localize URLs

2009-03-12 Thread Dougal Matthews
You may want to consider trying django-cms. They support these feature I believe. Of nothing else you could have a noesy at their code. http://django-cms.org/ Dougal On 12/03/2009, Bastien wrote: > > Hello Django users, > > I've been scratching my head trying to find a solution to have URLs >

Re: You don't have permission to edit anything - new forms admin

2009-03-12 Thread dave
Hi, I'm encountering exactly the same problem as yours. Did you finally find the solutions? Thanks, Dave On Feb 17, 1:25 pm, Tipan wrote: > I'm having some problems with the New Forms Admin that are giving me > the error message " You don't have permission to edit anything." when > I log into th

Re: Django and google app engine

2009-03-12 Thread Brian Jinwright
- I would personally use app-engine-patch - Depends on what system. Windows just use python manage.py update with app-engine-patch. Linux yeah I would use appcfg.py On Wed, Mar 11, 2009 at 9:52 PM, Guri wrote: > > Hi, > Please if anyone

Localize URLs

2009-03-12 Thread Bastien
Hello Django users, I've been scratching my head trying to find a solution to have URLs translated in various languages. So the typical 'about' would be translated in 'a propos' in french and whatever other languages, like all the static content. I also need to provide the user a way to write fla

Running Django on DreamHost

2009-03-12 Thread nagraj
Hi I'm trying to run Django from Apache using FastCGI in a shared hosting environment on DH. I've installed python 2.5.2 onto my home environment. And all the necessary libraries including lxml, flup, etc. I'm facing a strange issue with lxml, which occurs only when it is used from the webreques

Re: Django critter helps us code at the speed of light.

2009-03-12 Thread Idan Gazit
Brilliant. --~--~-~--~~~---~--~~ 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-users+unsubscr.

Re: Problem Installing Fixture: Unbound Prefix

2009-03-12 Thread Chris Spencer
On Thu, Mar 12, 2009 at 6:44 AM, Russell Keith-Magee wrote: > > On Thu, Mar 12, 2009 at 8:54 AM, Chris wrote: >> >> I'm using Django 1.0.2, and I dumped out a sample database as XML >> using dumpdata. When I run my unittests using this XML as a fixture, I >> get the error: > ... >> SAXParseExcep

Re: Django critter helps us code at the speed of light.

2009-03-12 Thread Andrew McCloud
My first time using illustrator. My original goal was to make a nice wallpaper but couldn't get illustrator to behave. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Django critter helps us code at the speed of light.

2009-03-12 Thread Andrew McCloud
http://bit.ly/djangocritter --~--~-~--~~~---~--~~ 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 djan

Re: Django critter helps us code at the speed of light.

2009-03-12 Thread Nick
On Mar 11, 6:10 pm, Eric Walstad wrote: > > Now you can have your pony AND a Django > Critter:http://starship.python.net/~ewalstad/django_critter.html > Excellent! I think I prefer the Critter to the Pony... Nick --~--~-~--~~~---~--~~ You received this message

Re: ManyToMany reverse query

2009-03-12 Thread Andrew Turner
2009/3/12 Malcolm Tredinnick : > Aah... sorry. Too quick on the draw, there. :-) > > This does what you're after: > >        User.objects.filter(userprofile__friends=user) > > UserProfile.objects.filter(friends=user) is correct if you want the > respective UserProfile objects back, but it sounds l

Re: Trouble with Chapter 7 in Version 1.0 book

2009-03-12 Thread John Maines
On Mar 12, 12:00 am, Karen Tracey wrote: > On Wed, Mar 11, 2009 at 8:37 PM, John Maines wrote: > > We are making our way through the Django book, web version, for 1.0. > > We hit a road block at chapter 7, Forms. > > > In the part subtitled "A Simple Form Handling Example", there are some > >

Re: ManyToMany reverse query

2009-03-12 Thread Malcolm Tredinnick
On Thu, 2009-03-12 at 11:04 +, Andrew Turner wrote: > 2009/3/12 Malcolm Tredinnick : > > The second one is close. However, since "user" is a User object, you > > need to be a little more careful in the filter comparison and filter > > against the UserProfile.user attribute. Thus: > > > >

Re: ManyToMany reverse query

2009-03-12 Thread Andrew Turner
In case this isn't very clear due to my poor explanation, say I have three users: Bob, Jane and Dave. Now, Jane calls Dave a friend Bob calls Jane a friend Bob calls Dave a friend Asking who Bob calls a friend will obviously return Jane and Dave. But if I ask who is a fan of Dave, I want to ret

Re: ManyToMany reverse query

2009-03-12 Thread Andrew Turner
2009/3/12 Malcolm Tredinnick : > The second one is close. However, since "user" is a User object, you > need to be a little more careful in the filter comparison and filter > against the UserProfile.user attribute. Thus: > >        User.objects.filter(friend__user=user) > > Regards, > Malcolm Tha

Re: ManyToMany reverse query

2009-03-12 Thread Malcolm Tredinnick
On Thu, 2009-03-12 at 10:31 +, Andrew Turner wrote: > Hi, > > I've got a UserProfile model:- > > class UserProfile(models.Model): > user = models.ForeignKey(User, unique=True) > ... > friends = models.ManyToManyField(User, related_name='friend', blank=True) > ... > > I'm try

Mac Django Docs: Fluid Icon

2009-03-12 Thread Idan Gazit
Hey Macistas, I wanted to share a little bit of fluffery along with a tip. I often have many tabs open in firefox as I am coding, but I like to have the django docs in its own window as I'm often referring to it. If you're not already aware of Fluid (http://fluidapp.com/), it's a tool that lets

Re: Problem Installing Fixture: Unbound Prefix

2009-03-12 Thread Russell Keith-Magee
On Thu, Mar 12, 2009 at 8:54 AM, Chris wrote: > > I'm using Django 1.0.2, and I dumped out a sample database as XML > using dumpdata. When I run my unittests using this XML as a fixture, I > get the error: ... > SAXParseException: :20:41: unbound prefix > > This error seems to be caused by tags,

Re: Combine several Forms to one class

2009-03-12 Thread Malcolm Tredinnick
On Thu, 2009-03-12 at 10:57 +0100, Thomas Guettler wrote: > Hi, > > I often have several forms in on tag. Like FormSet, > it would be nice to have a class which combines several forms. > > But FormSet can only deal with several forms of one class. > > This MultiForm class should do this: > >

Re: How can I verify correction of the form with SelectMultiple widget field?

2009-03-12 Thread Malcolm Tredinnick
On Thu, 2009-03-12 at 02:55 -0700, K*K wrote: > I got a strange problem. > > I specify a ChoiceField as SelectMultiple widget but got problem in > validation. > > Can django ChoiceFIeld support valid with a List ? or how can I do > it ? > > The source code is following: > > # Source code of fo

ManyToMany reverse query

2009-03-12 Thread Andrew Turner
Hi, I've got a UserProfile model:- class UserProfile(models.Model): user = models.ForeignKey(User, unique=True) ... friends = models.ManyToManyField(User, related_name='friend', blank=True) ... I'm trying to do a query which will return all the users who call a given user a 'fri

Combine several Forms to one class

2009-03-12 Thread Thomas Guettler
Hi, I often have several forms in on tag. Like FormSet, it would be nice to have a class which combines several forms. But FormSet can only deal with several forms of one class. This MultiForm class should do this: - validate/clean all sub forms on clean(). Not just until the first one fa

How can I verify correction of the form with SelectMultiple widget field?

2009-03-12 Thread K*K
I got a strange problem. I specify a ChoiceField as SelectMultiple widget but got problem in validation. Can django ChoiceFIeld support valid with a List ? or how can I do it ? The source code is following: # Source code of forms.py: COMPONENTS_CHOICE = [] for component in get_components():

Re: Basic django snafu from a noob

2009-03-12 Thread Malcolm Tredinnick
On Thu, 2009-03-12 at 01:05 -0700, Steve Chervitz Trutane wrote: [...] > My error goes away when using the official Django release (1.0.2) > rather than the current trunk (r10032). > > As for the backend, I have not altered the settings.py that django- > admin.py startproject created, so my DATAB

Re: Basic django snafu from a noob

2009-03-12 Thread Steve Chervitz Trutane
On Mar 11, 7:55 pm, Malcolm Tredinnick wrote: > On Wed, 2009-03-11 at 14:50 -0700, Steve Chervitz Trutane wrote: > > I believe I may have hosed my django installation while I was trying > > to get up and running with Pinax.  I'm working from the django trunk > > (1.1alpha) on linux. Here's what

Re: Overriding UserManager

2009-03-12 Thread koranthala
On Mar 11, 8:42 pm, koranthala wrote: > On Mar 11, 8:34 pm, Alex Gaynor wrote: > > > > > On Wed, Mar 11, 2009 at 10:32 AM, koranthala wrote: > > > > Hi, > > >    I have created an Identity Mapper for my website - which is as > > > follows: > > > > class IdentityMap(object): > > >    def __get

Re: traceback - no local variables

2009-03-12 Thread Thomas Guettler
Hi, I attached a HandleExceptionMiddleware I use. You need to modify it to your needs. It attaches the html page of cgitb and the django debug page to the email. Thomas George Lund schrieb: > We have a live server crash issues for which we are receiving emails > from Django from our server, w

Re: Getting stuck in transactions

2009-03-12 Thread Thomas Guettler
Hi, here some thoughts how to debug this: In postgres enable the logging of the executed statements. On my system they go to /var/log/messsages. Which statement is the last? Are there any other db clients which access the database? Or are you connecting from the same python script? Which transa

Re: Deploying Django tutorial part 4, redirecting problem, apache error

2009-03-12 Thread Adam Yee
On Feb 10, 5:27 am, "a...@amos-site.org.uk" wrote: > Where exactly do you put this I'm guessing in the file, but a bit of > context would be appreciated. #django.views.generic.list_detail.py ... ... def object_detail(request, ... ... ... ... c = RequestContext(request, { temp