Re: setting up openlayers proxy.cgi

2011-11-14 Thread Daryl
Thanks for that Brett. I ended up finding what I was after, django-httpproxy. https://bitbucket.org/bkroeze/django-http-proxy I can now make remote uri calls from javascripts on my Local Django. Cheers. On Nov 15, 4:22 am, Brett Epps wrote: > Django itself won't run a CGI

Re: django.conf.urls.defaults.url documentation

2011-11-14 Thread Kurtis Mullins
https://code.djangoproject.com/browser/django/tags/releases/1.3.1/django/conf/urls/defaults.py On Mon, Nov 14, 2011 at 11:59 PM, Mike Thon wrote: > I recently started working on a new Django project using the latest > release, and I found the function

django.conf.urls.defaults.url documentation

2011-11-14 Thread Mike Thon
I recently started working on a new Django project using the latest release, and I found the function django.conf.urls.defaults.url being used in urls.py. There's no pydoc documentation for this function. Can anyone tell me what it does or point me to some documentation? thanks Mike --

site organization best practices

2011-11-14 Thread Sells, Fred
Please accept my apologies for "hijacking" a previous thread. Offense was unintentional. My original question is: I build healthcare applications and the gov't regs require we log most user access to patient info. Since I've only built one (rather large) Django app, my logging is in

Problem with get_absolute_url

2011-11-14 Thread Fredrik Grahn
Hello, I'm trying to get my head around some of the basics of Django and I've run into the strangest problem. Can't figure out what the problem is, the URL from my get_absolute_url() function in my model just refuses to turn into a proper URL. I'll post the code so hopefully it will be obvious for

Open the Django page raw-id widget within TinyMCE

2011-11-14 Thread Simon Bächler
Hi Django's raw_id widget is very well suited for selecting a page as a foreign key in the admin frontend. Even from a tree view as it is the case for instance in FeinCMS. TinyMCE on the other hand allows for a dropdown list for link targets. Which is not that great if you have a few hundred

Re: Which Linux distro to use on EC2?

2011-11-14 Thread CrabbyPete
I've used Ubuntu 11.0 on an EC2 micro, using nginx and uwsgi and its great. There is also a google group for ubuntu on ec2, with loads of support. If you use uwsgi you have to compile it on the server. I had a tough time using Amazons version, I don't remember why, but had no problem using Ubuntu.

Re: Mysql + Unicode + username curiosity

2011-11-14 Thread Tomasz Zieliński
You might want to check the documention: https://docs.djangoproject.com/en/1.3/ref/databases/#creating-your-database There seem to be issues like this one: "The main thing to be aware of in this case is that if you are using MySQLdb 1.2.2, the database backend in Django will then return

Re: Mysql + Unicode + username curiosity

2011-11-14 Thread Kurtis Mullins
Hey, I'm not sure on what the problem is here. I just wanted to let you know that I did the same test on my setup. And it appears to be returning the username as a unicode string. >>> a = User.objects.get(id = 1) >>> a.username u'admin' I don't have any default-character-set option in my my.cnf

Mysql + Unicode + username curiosity

2011-11-14 Thread Nuno Maltez
So, I just ran into a funny issue. I'm using Django + Mysql and when retrieving users (Auth.user) form the database, the username field comes as a bytestring while everything else seems to come as unicode strings: >>> from django.contrib.auth.models import User >>> a=User.objects.get(id=1) >>>

Re: setting up openlayers proxy.cgi

2011-11-14 Thread Brett Epps
Django itself won't run a CGI script for you. You'll need to run it with another web server like Apache or nginx. (Usually the default installation of Apache has a cgi-bin directory where you can place CGI scripts.) You can run one of these servers at the same time as running manage.py run

Re: Gut User Name Automatically

2011-11-14 Thread Bill Freeman
request.user.username (or probably better, use a foreign key reference to User in the record you are saving and say something like: product.created_by = request.user Only the id of the user record will be saved, but you can access any user information anytime you look at the record, e.g.;

Re: help_text line continuation

2011-11-14 Thread Markus Gattol
have a look at http://www.markus-gattol.name/ws/python.html#multi-line_strings_expressions ...it's the same for statements, just put stuff inside ( and ) -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: Which Linux distro to use on EC2?

2011-11-14 Thread creecode
Hello all, +1 for Amazon's own linux. So far it seems to work pretty well and Amazon to date has been good with regular updates. They also have a pretty good collection of packages available for install via yum. Toodle-looo.. creecode -- You received this message because

Re: (fundamental) problem with password reset in 1.x: URL's become too long

2011-11-14 Thread creecode
Hello Bram, It's been awhile since I've had this problem. I don't think it is possible to totally solve the issue but it can be reduced. The problem is not Django but rather how email is handled from point to point. What I do is always put urls on a line by themselves and I put two empty

Gut User Name Automatically

2011-11-14 Thread chronosx7
Hi, this is the order of events I am trying to solve: An user gets authenticated with the Admin of dJango Enters an option to add new products to the database It is needed to automatically save the user who added the product to the database That is why I was thinking it would be best to override

Re: Which Linux distro to use on EC2?

2011-11-14 Thread Phang Mulianto
for me i would like to have an optimized kernel binary and build the kernel in my running machine, and disable all driver not used by system os. it will slim your kernel and faster booting and loading. all precompiled binnary have bloated driver in kernel so it will match any hardware and load

Re: natural keys for auth.user and group

2011-11-14 Thread Anna Warzecha
Hi, your above example helped me a lot, thank you! But there is a small error. natural_key must always return a tuple. So this part: def gnatural_key(self):        return self.name def unatural_key(self):        return self.username Has to be changed: def gnatural_key(self): return

Re: project architecture question

2011-11-14 Thread Derek
On Nov 14, 2:44 pm, "Sells, Fred" wrote: > I build healthcare applications and the gov't regs require we log most > user access to patient info. > > Since I've only built one (rather large) Django app, my logging is in > the same DB as my data and I use decorators in

project architecture question

2011-11-14 Thread Sells, Fred
I build healthcare applications and the gov't regs require we log most user access to patient info. Since I've only built one (rather large) Django app, my logging is in the same DB as my data and I use decorators in views.py to log all access. There is only one table in it's own schema that is

Re: help_text line continuation

2011-11-14 Thread Tim Chase
On 11/14/11 00:27, Mike Dewhirst wrote: I have been using the Python line continuation symbol +\ in my models help_text when my text goes beyond column 80 in my editor. I just accidentally omitted it for a continued line and discovered it doesn't seem to be needed!!! Is that a feature of

Re: help_text line continuation

2011-11-14 Thread Karen Tracey
On Mon, Nov 14, 2011 at 1:27 AM, Mike Dewhirst wrote: > I have been using the Python line continuation symbol +\ in my models > help_text when my text goes beyond column 80 in my editor. > > I just accidentally omitted it for a continued line and discovered it > doesn't

Re: Which Linux distro to use on EC2?

2011-11-14 Thread Charles Cossé
I didn't say it was "hard", but the point of Ubuntu is a standard image. Yes, you can compile your own kernel on Ubuntu, but I doubt many people ever have. On Mon, Nov 14, 2011 at 5:09 AM, Joey Espinosa wrote: > On Ubuntu you'll never compile your own kernel. It

Re: Which Linux distro to use on EC2?

2011-11-14 Thread Joey Espinosa
> > On Ubuntu you'll never compile your own kernel. It won't be optimized > for your system. I beg to differ here. Compiling your own kernel isn't hard, and can be done on any distro. Before Xen and SMP support was built-in, it was actually pretty common to compile your own kernel, even on

Re: Which Linux distro to use on EC2?

2011-11-14 Thread Charles Cossé
On Mon, Nov 14, 2011 at 2:55 AM, Thomas Guettler wrote: > > > Am 13.11.2011 21:58, schrieb Charles Cossé: > > The main difference with Ubuntu is that it's a binary distribution > > (pre-compiled binaries for a standardized platform). I use Gentoo, > > personally, which is a

Re: Which Linux distro to use on EC2?

2011-11-14 Thread Fernando Rocha
I also agree that you should start with you are familiar with. In my personal experience, after experimenting some. I choose the Basic Amazon AMI, which is Centos compatible. It was what worked best for me. []s On Nov 13, 4:56 pm, ydjango wrote: > I am setting up nginex,

Re: Which Linux distro to use on EC2?

2011-11-14 Thread Brian Schott
Ubuntu has great cloud-init support for dealing with cloud startup scripts. Works on most clouds: openstack, ec2, eucalyptus... Sent from my iPhone On Nov 13, 2011, at 8:52 PM, ydjango wrote: > I was concerned that Ubuntu being a desktop OS might have some >

Re: Which Linux distro to use on EC2?

2011-11-14 Thread Thomas Guettler
Am 13.11.2011 21:58, schrieb Charles Cossé: > The main difference with Ubuntu is that it's a binary distribution > (pre-compiled binaries for a standardized platform). I use Gentoo, > personally, which is a variant of Debian with "portage" rather than > "apt". LAMP server stuff is readily

(fundamental) problem with password reset in 1.x: URL's become too long

2011-11-14 Thread Bram de Jong
Hello all, on freesound.org we are using the built-in password reset view to send users password reset emails... and there is a bit of a fundamental problem with the password reset emails, or more in detail the password reset URLS: they are way too long. In our app we get URLs like this:

DRel: A small relational algebra library for Django.

2011-11-14 Thread Kevin Mahoney
Hi all, I released DRel over the weekend: https://github.com/KMahoney/DRel It lets you build up SQL queries using a queryset-like interface. Hopefully somebody other than me will find it useful. -- You received this message because you are subscribed to the Google Groups "Django users" group.

django GenericForeignkey does not work with object.create() but work fine with save()

2011-11-14 Thread Avni Mahajan
I am trying to migrate my db from postgres to mysql. Below is a model Customdata. user = models.ForeignKey(User, related_name='customdatas') call_uuid = models.CharField(max_length=50, null=True, blank=True, editable=False) phone_number = models.CharField(max_length=15) name =