Re: default _ storage path

2011-01-12 Thread Tonton
thanks but i do like that i saved file i generate in /media/directory so the path is path="directory/filename.ext" and in var/www/ link ln-s /home/project/media/directory directory so my other program could acces to configuration file in /var/www/directory store in media in real ! regards tont

Re: upload files via ajax

2011-01-12 Thread Mauro Del Rio
On Tue, Jan 11, 2011 at 1:12 PM, Jani Tiainen wrote: > > http://valums.com/ajax-upload/ > > There is one standalone version how to do it pretty much browser > independently. > > > > -- > > Jani Tiainen > It seems to be what i am looking for, thanks! > > > > > -- > You received this message becau

CSRF cookie not being sent over HTTPS

2011-01-12 Thread Burhan
I'm developing an app that is only going to be used over HTTPS, when I try to login to the admin backend, I keep getting 'Looks like your browser isn't configured to accept cookies. Please enable cookies, reload this page, and try again.' I inspected the cookies being sent and noticed that the csr

Re: Django's documention is horrible

2011-01-12 Thread ashwoods
Although it might be nice to have api docs online, you have to say that django has excellent high level docs (django docs site) and low lvl docs (code is well py-documented -in the source). Epydocs, and other doc alternatives - automatic or semi automatic doc generators like pydoctor, sphinx (a qui

Re: login failed with correct username and password

2011-01-12 Thread bruno desthuilliers
On 12 jan, 04:03, "Lin Tao\(EXT-VanceInfo/Beijing\)" wrote: > Hi, > > I encounter this problem that I failed to login to my app with correct > username and password. I'm wondering if there is something wrong with my > login form. Here is what it looks like: (snip code - seems mostly ok) > > Ever

Re: Django's documention is horrible

2011-01-12 Thread Mike Dewhirst
OK - so we need an intro to the documention which describes the timeline of a typical* developer transitioning from beginner to guru and the docs which should be of interest at successive stages during that transition. *typical - I know there ain't such a person. However, there ought to be a "

Overcoming Django 1.2.4's "no query string in the URL"?

2011-01-12 Thread Derek
Unfortunately my existing web app relies heavily on what I now see is a feature that was "was never documented or supported" i.e. the ability to filter a change list in the Admin by passing in field:value items in the URL. e.g. of the type admin/app/model/?foo=bar&eggs=spam So... from now on this

Re: TestCase and fixtures

2011-01-12 Thread Russell Keith-Magee
On Wed, Jan 12, 2011 at 3:29 PM, Simone Dalla wrote: > 2011/1/12 Piotr Zalewa >> >> Hi Simone >> >> Try fixtures = ['myfix'] > > Thank Piotr, > I've already done but same result: > No fixtures found. > ... > -- > Ran 3 tests in 0

Re: TestCase and fixtures

2011-01-12 Thread Xavier Ordoquy
Hi, Out of curiosity, do you run your tests in a multi database setting ? Regards, Xavier. Le 11 janv. 2011 à 23:36, Simone Dalla a écrit : > Hi! > I'm testing a part of my application with a TestCase class specifing the > 'fixtures' attributes like > > > -- > You received this message beca

Re: Overcoming Django 1.2.4's "no query string in the URL"?

2011-01-12 Thread Ramiro Morales
On Wed, Jan 12, 2011 at 9:24 AM, Derek wrote: > Unfortunately my existing web app relies heavily on what I now see is a > feature that was "was never documented or supported" i.e. the ability to > filter a change list in the Admin by passing in field:value items in the > URL.  e.g. of the type adm

Need HELP urgently

2011-01-12 Thread gupta-django
I have two application 1. App1 - It has a Model Class "Entry" that has 20 entries 2. App2 - It has a Model Class "Priority" In Priority class I am defining a Foreign Key Relationship as from App1.models import Entry class Priority(models.Model): entry = models.ForeignKey(Entry) prio

Help with Imagefile

2011-01-12 Thread nlub...@gmail.com
hello, i have a very simple question. its about imagefiles my model class Usuario(models.Model): ImagenEmpresa = models.ImageField(upload_to = 'perfil/', null=True) my template and my save method nuevo = Usuario(ImagenEmpresa = request.FILES['Imag

Django op Servage.net

2011-01-12 Thread MarJo
I want to use Django on Servage.net. Servage support team ask me to search for a webpackage of Django. Some people managed to install Django at Servage.net. Is somebody able to help me? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Overcoming Django 1.2.4's "no query string in the URL"?

2011-01-12 Thread Derek
Thanks Ramiro - I have *just* found that blog and was about to report back here on it. There are, unfortunately, a few "gotchas" that need some clever coder to help resolve... see my reply on the blog. (PS I hope that this approach finds its way into the official docs sometime.) On Jan 12, 2:54 

Re: upload files via ajax

2011-01-12 Thread Eugene MechanisM
I'm using Plopload http://plupload.com it's very nice!! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@g

Re: Help with Imagefile

2011-01-12 Thread Piotr Kilczuk
Hi, 2011/1/12 nlub...@gmail.com > > if im uploading a "testofimage.gif" > i would like to save it as "Profileoduser.gif" > I think you can code your own field that inherit's from imagefield. You possibly could also modify the save method and rename the file/image field raw value there (just be

Re: Need HELP urgently

2011-01-12 Thread Burhan
It could be that the query to populate the drop down for the FK is timing out, causing the page to hang. You should try it with raw_id_fields, something like this in App2 admin.py: from django.contrib import admin from App2.models import Priority class PriorityAdmin(admin.ModelAdmin): raw_id_f

Re: Help with Imagefile

2011-01-12 Thread Daniel Roseman
On Wednesday, January 12, 2011 6:11:27 AM UTC, nlub...@gmail.com wrote: > > hello, i have a very simple question. its about imagefiles > > my model > class Usuario(models.Model): > ImagenEmpresa = models.ImageField(upload_to = 'perfil/', > null=True) > > my template >

Re: Need HELP urgently

2011-01-12 Thread Xavier Ordoquy
Hi, I am not sure the admin is designed for handling so many entries in a foreign key. When you try to display Priority, you'll have a combo box with 200.000 entries which will takes a lot of time to get computed especially if you want to display entries information in the string representation

Re: Need HELP urgently

2011-01-12 Thread Piotr Kilczuk
Hi, 2011/1/12 gupta-django > I have two application > > 1. App1 - It has a Model Class "Entry" that has 20 entries > 2. App2 - It has a Model Class "Priority" > > In Priority class I am defining a Foreign Key Relationship as > > from App1.models import Entry > > class Priority(models.Model):

Re: Help with Imagefile

2011-01-12 Thread Piotr Kilczuk
Hi, > upload_to can be a callable, ie a function that handles the uploaded file. > This is passed the image file and original filename, and should return the > absolute path. See the documentation: > > http://docs.djangoproject.com/en/1.2/ref/models/fields/#django.db.models.FileField.upload_to >

Re: Need HELP urgently

2011-01-12 Thread Matias Aguirre
The given answers are correct, that's your issue without doubt, create an admin class for your Priority model and setup a raw_id_field[1]: class PriorityOptions(admin.ModelAdmin): raw_id_fields = ('entry',) register(Priority, PriorityOptions) Regards, Matías [1]: http://docs.djangoproject.c

Re: upload files via ajax

2011-01-12 Thread Masklinn
On 2011-01-11, at 13:12 , Jani Tiainen wrote: > > I think Dojotoolkit and ExtJS both have nice mechanisms to do this ootb so no > need to reinvent the wheel. I've never been fan of jquery so I don't know is > there something for them (or for other similiar pure js frameworks) For jquery, the `jq

Re: Configure LAMPP with Django

2011-01-12 Thread Javier Guerra Giraldez
On Tue, Jan 11, 2011 at 9:00 PM, Kenneth Gonsalves wrote: > I do not think it does - django is not a webserver or server like zope > for example. So what does 'stays up' mean? it is. depending on how you deploy, it's a FastCGI server, or a WSGI server. in any case, the process is started once,

Re: Need HELP urgently

2011-01-12 Thread Piotr Zalewa
I'd also take a look at XHR requests (Web Console or Firebug's Net panel) On 01/12/11 13:53, Matias Aguirre wrote: > The given answers are correct, that's your issue without doubt, create an > admin > class for your Priority model and setup a raw_id_field[1]: > > class PriorityOptions(admin.Mod

Help with a somewhat complex reverse ForeignKey lookup.

2011-01-12 Thread Peter
If I have a couple of models like these (just an example) class Parent(models.Model): name = models.CharField(max_length=100) class Gender(models.Model): name = models.CharField(max_length=100) class Child(models.Model): entity = models.ForeignKey(Entity, related_name=’children’)

Re: Flatten template?

2011-01-12 Thread Peter
Please add to djangosnippets I'm somewhat interested in what you have done. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to

Re: QuerySetManager breakage with r14389

2011-01-12 Thread Russell Keith-Magee
On Thu, Jan 6, 2011 at 5:29 AM, Ian Clelland wrote: > Hi, > > I've been using Simon Willison's QuerySetManager[1] pattern for a > while now, and since upgrading to Django 1.2.4, it has been breaking > when I try to call a method on a RelatedManager constructed from it. > > There was a change in r1

Re: Help with a somewhat complex reverse ForeignKey lookup.

2011-01-12 Thread Daniel Roseman
On Wednesday, January 12, 2011 2:04:28 PM UTC, Peter wrote: > > If I have a couple of models like these (just an example) > > class Parent(models.Model): > name = models.CharField(max_length=100) > > class Gender(models.Model): > name = models.CharField(max_length=100) > > class Ch

Re: Help with a somewhat complex reverse ForeignKey lookup.

2011-01-12 Thread Peter Magnusson
Yes of course my mistake when "washing" my original messy code Peter Magnusson MUSTADFORS BRUKS AB | Sågbrovägen 1 | SE66010 Dals Långed | Phone +46 (0)531-71 435 | Mobile +46 (0)76-824 96 04 | http://www.mustad.se On Wed, Jan 12, 2011 at 15:32, Daniel Roseman wrote: > On Wednesday, Janu

Re: Help with a somewhat complex reverse ForeignKey lookup.

2011-01-12 Thread Peter
And your example of course worked It's obvious really and just stupid of me. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send ema

Re: Email and activation key in django.contrib.auth

2011-01-12 Thread Micah Carrick
Thanks for the great information. I've tinkered with it and it seems to be working pretty good. Still need to make the email unique but all in all a pretty good solution. What do you think about using django-registration instead? Does anybody know of a pro/con comparison of the built-in auth versu

Help optimising database calls

2011-01-12 Thread Matt Henderson
Hello, I'm new to django, and set up a website recently, (puncut.com). I was hoping someone might be able to explain how to optimise database calls because at the moment some pages are taking 5 seconds before django responds. I'll summarise the scenario below: # models class Thread(models.Model)

Re: Help optimising database calls

2011-01-12 Thread Dan Fairs
> Hello, > I'm new to django, and set up a website recently, (puncut.com). I was hoping > someone might be able to explain how to optimise database calls because at > the moment some pages are taking 5 seconds before django responds. > I'll summarise the scenario below: [snip] > But I reckon t

Re: Email and activation key in django.contrib.auth

2011-01-12 Thread Shawn Milochik
If you're using 1.3, you can make the e-mail address the username, which will automatically require it to be unique. I haven't used django-registration, but many others have, so maybe they'll be able to answer. On face-value, I'd say that your question is a bit off, though; django-registration

Re: Help optimising database calls

2011-01-12 Thread Matias Aguirre
Try to reduce the queries on your view, select_related won't help a lot if using Thread model, try to collect Pun values on your view first and group them by thread, itertools.groupby could be handy in this case. Try something like: threads = Thread.objects.select_related('user').filter(...) threa

Re: Help optimising database calls

2011-01-12 Thread Łukasz Rekucki
On 12 January 2011 16:32, Matt Henderson wrote: > Hello, > I'm new to django, and set up a website recently, (puncut.com). I was hoping > someone might be able to explain how to optimise database calls because at > the moment some pages are taking 5 seconds before django responds. > I'll summarise

Re: Database Table Locks/unlocks (for reading, writing or both)

2011-01-12 Thread Jagdeep Singh Malhi
> > Is Django automatically done the table locking /unlocking concept in > > case of Mysql/PostGreSQL? > > Depends how backend handles database sessions. > > > if not how I done this manually? > > Thing you described is called pessimistic locking. What are you trying to > accomplish with that? I

Re: Database Table Locks/unlocks (for reading, writing or both)

2011-01-12 Thread Mo J. Al-Mughrabi
You could use custom SQL Sent from my iPhone On Jan 12, 2011, at 7:14 PM, Jagdeep Singh Malhi wrote: > >>> Is Django automatically done the table locking /unlocking concept in >>> case of Mysql/PostGreSQL? >> >> Depends how backend handles database sessions. >> >>> if not how I done this manual

Re: Help optimising database calls

2011-01-12 Thread Matt Henderson
Thanks Lukasz and Matias, I've implemented something along those lines in my view: threads = list(Thread.objects.select_related('author').all().order_by('-created'))[:150] threads_map = {} for t in threads: threads_map[t.pk] = t t.pun_collection = [] for pun in Pun.objects.all().filt

list created from a table in my database

2011-01-12 Thread Tony
Hi all, I want to create a page on my site where I can extract the rows from a table in my database and allow certain users with the proper access to be able to add, delete, and change the columns of the rows if they want. I think I have the multi-user thing pretty much figured out (although I don

Re: list created from a table in my database

2011-01-12 Thread Shawn Milochik
Formsets were made for this: http://docs.djangoproject.com/en/dev/topics/forms/formsets/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send em

Re: Database Table Locks/unlocks (for reading, writing or both)

2011-01-12 Thread Christophe Pettus
On Jan 12, 2011, at 8:14 AM, Jagdeep Singh Malhi wrote: > I only want to know is Django is able Lock/Unlock the Database tables, > If yes. > How its possible? how its works Django by itself doesn't issue locking instructions to the database, and doesn't have any built-in primitives to do so. Yo

Re: Email and activation key in django.contrib.auth

2011-01-12 Thread Micah Carrick
Ah yes, thanks again. I tinkered with the django-registration and was a bit more than I need. While the username can store an email address, it's 30 character limit prevents me from relying on that. Looking over an existing database I have, there are quite a few email addresses over that characte

Re: Follow relations on three tables

2011-01-12 Thread gia...@gmail.com
On Tue, Jan 11, 2011 at 2:30 PM, Matias Aguirre wrote: > So, basically you want this: > > C.objects.filter(Bref__Dref__id=D_id).values_list('Aref') > Thanks! it was exactly what I needed -- Gianluca Sforna http://morefedora.blogspot.com http://identi.ca/giallu - http://twitter.com/giallu --

ValueError.

2011-01-12 Thread delegbede
How can I work around this ValueError: too many values to unpack. I am actually trying to extract certain portion of a csv file. I just need an insight into what could be causing such error and I should be able to figure out the rest. Thanks. Sent from my BlackBerry wireless device from MTN

Re: ValueError.

2011-01-12 Thread Shawn Milochik
On Jan 12, 2011, at 12:14 PM, delegb...@dudupay.com wrote: > How can I work around this ValueError: too many values to unpack. > I am actually trying to extract certain portion of a csv file. > I just need an insight into what could be causing such error and I should be > able to figure out th

Re: Email and activation key in django.contrib.auth

2011-01-12 Thread Shawn Milochik
Without changing or subclassing the User model (which shouldn't be done, because it causes problems), I don't know how you can put the unique e-mail address constraint on the database, except manually via your database's own tool. I don't know if that can cause problems with Django's ORM, and it

custom admin

2011-01-12 Thread Tony
Is there any way to make a custom admin for a site but use parts of the existing admin. It has a lot of good features but there are certaint hings I dont want revealed and yes i know I can limit access, but what if I want to limit lets say, a teacher to only his/her student's information, or i wan

Re: custom admin

2011-01-12 Thread Shawn Milochik
If you're comfortable creating views and modifying templates in Django already, then you can do whatever you like. The admin uses views and templates that you can freely copy and modify, then have your application use your own instead of the defaults. Shawn -- You received this message becaus

Re: Email and activation key in django.contrib.auth

2011-01-12 Thread Micah Carrick
Shawn, Thank you so very much. This is coming along quite nicely. Your answers have been perfect. On Wed, Jan 12, 2011 at 9:19 AM, Shawn Milochik wrote: > Without changing or subclassing the User model (which shouldn't be done, > because it causes problems), I don't know how you can put the uni

Re: Email and activation key in django.contrib.auth

2011-01-12 Thread Shawn Milochik
You're welcome. Enjoy! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options

Test cookie and CSRF middleware

2011-01-12 Thread Adam Endicott
I'm migrating a site from Django 1.1 to 1.2 and I can't figure out how set_test_cookie and test_cookie_worked is supposed to work when using the CSRF middleware. I do request.session.set_test_cookie() in my login view, then on POST, I want to check request.session.test_cookie_worked(), but I never

Re: QuerySetManager breakage with r14389

2011-01-12 Thread Ian Clelland
On Wed, Jan 12, 2011 at 6:23 AM, Russell Keith-Magee wrote: > On Thu, Jan 6, 2011 at 5:29 AM, Ian Clelland wrote: >> Hi, >> >> I've been using Simon Willison's QuerySetManager[1] pattern for a >> while now, and since upgrading to Django 1.2.4, it has been breaking >> when I try to call a method o

make an installer of my django project

2011-01-12 Thread Julio Cesar Rodriguez Cruz
Hi all, anyone can suggest me what is the better way that I can build an .exe, .msi or a .deb, with my installed version of apache, python, django and a django project that I had developed, with the configuration enough that allows me to distributed the bundled application, and once copied to anoth

Re: custom admin

2011-01-12 Thread Leandro Ardissone
There's a nice app called django-admin-tools, it let you create/edit a menu and a custom dashboard with draggable blocks of content. Templating/theming isn't really mature yet, but if you know how to theme django's admin, you will figure

ANN: django-widget-tweaks

2011-01-12 Thread Mikhail Korobov
Hi guys, Designers often want to add some css classes and html attributes to django form fields. But now they have to either patch the python code or copy-paste full html widget output and then customize it. In order to make them happy I just released an app ( https://bitbucket.org/kmike/django-w

Re: Django's documention is horrible

2011-01-12 Thread Rainy
On Jan 12, 7:18 am, Mike Dewhirst wrote: > OK - so we need an intro to the documention which describes the timeline > of a typical* developer transitioning from beginner to guru and the docs > which should be of interest at successive stages during that transition. > > *typical - I know there ai

performance fields in forms.py (province/city problem)

2011-01-12 Thread marco carminati
Dear all, i'm trying to improve the performance during the modify of one of my models' I've the classic province and city structure. In the 'insert form', using jquery, I can update the city queryset after the user choice the province. In the 'update form', I would like to set the city's queryse

Javascript Questions

2011-01-12 Thread hank23
I have a text field on a page which I want to disable when the page is loaded and enable later when the user selects an entry in a dropdown box. First how and where do I code the call to my disablefield function when the page loads? Second what event is generated whenever I select an entry in a dro

Re: make an installer of my django project

2011-01-12 Thread Gennadiy Zlobin
You can use xampp both on Linux and Windows, just zip it and unzip On 13 Jan 2011 01:33, "Julio Cesar Rodriguez Cruz" < juliocesarrodriguezc...@gmail.com> wrote: > Hi all, anyone can suggest me what is the better way that I can build > an .exe, .msi or a .deb, with my installed version of apache, p

Re: Javascript Questions

2011-01-12 Thread Piotr Zalewa
Is it in django-admin or completely irrelevant to this mailing list? zalun On 01/12/11 20:32, hank23 wrote: > I have a text field on a page which I want to disable when the page is > loaded and enable later when the user selects an entry in a dropdown > box. First how and where do I code the call

Generate a unique username for django.contrib.auth

2011-01-12 Thread Micah Carrick
I've got my site's authentication working with and email and password only--no username (thanks to Shawn Milochik for helping me with that). However, I still need to put in a username to make the User model happy. I was hoping to have "user" as a prefix and then some unique number. I cannot simply

Re: Javascript Questions

2011-01-12 Thread hank23
I'm coding a new screen and view which I'm adding to the polls app. from the django tutorial. I've written some javascript functions for setting focus and for disabling a textbox which appears to work when the page loads which is when its supposed to execute. I've also coded the dropdown box on th

Re: ANN: django-widget-tweaks

2011-01-12 Thread Leandro Ardissone
Great! I'll pass it to my designers! It really simplifies the templating. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-

Re: Generate a unique username for django.contrib.auth

2011-01-12 Thread marco carminati
Hi Micah On Jan 12, 10:11 pm, Micah Carrick wrote: > I've got my site's authentication working with and email and password > only--no username (thanks to Shawn Milochik for helping me with that). > However, I still need to put in a username to make the User model happy. I > was hoping to have "us

Re: Generate a unique username for django.contrib.auth

2011-01-12 Thread Eric Chamberlain
We use a base64 or base36 (if you want compatibility with the contrib.admin) encoded UUID, or generate a random 30-character string, the odds of a collision is quite low. On Jan 12, 2011, at 1:11 PM, Micah Carrick wrote: > I've got my site's authentication working with and email and password >

calling django auth from apache RewriteMap

2011-01-12 Thread Brian Craft
I'm interested in using RewriteMap (from mod_rewrite) to check for a django user session. That is, RewriteMap would invoke some script which would return session info, which could be used by mod_rewrite to allow or deny access. Basically, this would require writing a standalone python script that r

Re: Class based views and form processing

2011-01-12 Thread Justin Murphy
Hi, I still haven't found an answer to this problem so I am shamelessly bumping the last updated date. Thanks in advance for your help! -Justin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@

Re: Generate a unique username for django.contrib.auth

2011-01-12 Thread Acorn
Why not just use incremental numeric user IDs? On 12 January 2011 21:23, Eric Chamberlain wrote: > We use a base64 or base36 (if you want compatibility with the contrib.admin) > encoded UUID, or generate a random 30-character string, the odds of a > collision is quite low. > > On Jan 12, 2011,

Re: Generate a unique username for django.contrib.auth

2011-01-12 Thread Micah Carrick
Thanks folks. Here's what I have now. Not the most elegant but it's the best I can come up with so far. First, I'm generating a random string for the username so that the form will validate. After the record is saved I change the username to "user_" and the user ID. This way it looks a little less

Re: Class based views and form processing

2011-01-12 Thread Skylar Saveland
instead of calling super, you could just call FormMixin.form_valid directly, yes? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to

Re: Class based views and form processing

2011-01-12 Thread Skylar Saveland
what's wrong with just defining form_valid sth like: form_valid(self, form): self.object = form.save(commit=False) #ponies self.object.save() return HttpResponseRedirect(self.get_success_url()) does that not work? -- You received this message because you are subscribed to the

Re: Javascript Questions

2011-01-12 Thread marco carminati
> the onchange event and it does not seem to work. So is there anyway to > find out what event(s) are fired by the dropdown box so my code works? if you active the console in firebug you could see anything.. you could always put an alert('hello') in your javascript code > Is it legal to code mul

Re: Class based views and form processing

2011-01-12 Thread Justin Murphy
Thanks, Skylar. You're right, it worked. Now I am just shaking my head and saying "next time, I'll just read the source..." -Justin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.

Re: Generate a unique username for django.contrib.auth

2011-01-12 Thread Eric Chamberlain
Because the id is not known until after the record is saved, so you'd have to generate some non-colliding filler value anyway. Using incremental numbers can also leak usage information to the users. On Jan 12, 2011, at 1:52 PM, Acorn wrote: > Why not just use incremental numeric user IDs? >

Re: empty DateTimeField?

2011-01-12 Thread galago
Yes, I had to remove and make syncdb for that table. All works fine now :) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-

Inlining a reverse foreign key relationship in django admin

2011-01-12 Thread Viktor Kojouharov
Hi, Consider the following models: class Foo(models.Model): name = models.CharField(max_length=100) class Bar(models.Model): name = models.CharField(max_length=100) city = models.ForeignKey(Foo) How can I inline the admin model form for Foo into Bar, so that I can add new Foo items if

Re: Help optimising database calls

2011-01-12 Thread Matt Henderson
I managed to improve the speed of the site by using memcached to cache the rendered Thread views M On 12 January 2011 16:23, Matt Henderson wrote: > Thanks Lukasz and Matias, > I've implemented something along those lines in my view: > > threads = > list(Thread.objects.select_related('author').a

RE: login failed with correct username and password

2011-01-12 Thread Lin Tao(EXT-VanceInfo/Beijing)
Thank you bruno. Actually I've tried that method. But that's not where the problem lies. I reviewed my signup form and found out that there was something wrong with it. One of my clean_ method returned self.cleaned_data instead of returning self.cleaned_data['']. Well it's password field. So the pa

django spread

2011-01-12 Thread dezmond phillips
Hello Everyone Looking to startup a site that is similar to Yipit. Do I just need to get 2 Django guys, 1 js guy or gal, and a graphic artist and I am good to go? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send emai

Meaning for this error

2011-01-12 Thread NavaTux
Hi all, I wan to import a method in a model class to another class as well as that method contains some objects includes self How to import that method's operation? it shows the error >>> from users.models import userprofile Traceback (most recent call last): File "", line 1,

Re: HTML special chars in form labels

2011-01-12 Thread Derek
Have you tried safe or safeseq tags, applied to those specific labels? http://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#safe On Jan 11, 8:27 pm, Vsevolod wrote: > Django known to escape whole form label text. > Still I have a need to insert special characters (nbsp, dashe

Re: Runtime Error: maximum recursion depth exceeded while calling Python object

2011-01-12 Thread Derek
Still not working, but I suspect a recent upgrade to Django 1.2.4 might be the cause. Does anyone know (or have experience) of this kind of error when upgrading? On Jan 12, 9:38 am, Derek wrote: > Working with Django 1.2.3 > > I had an application that was running well.  However, some recent cha

Re: Need HELP urgently

2011-01-12 Thread Derek
You could also consider using an AJAX-based "autocomplete" approach; see: http://code.djangoproject.com/wiki/AutoCompleteSolutions On Jan 12, 7:27 am, gupta-django wrote: > I have two application > > 1. App1 - It has a Model Class "Entry" that has 20 entries > 2. App2 - It has a Model Class "

max recursion depth exceeded

2011-01-12 Thread vamsy krishna
Hi, I'm trying to use Django-Cms on my site and I see the below exception whenever I try to add a page or a group. The below stacktrace repeats itself indefinitely. I think this error is independent of the cms system and hence I'm posting it here instead of the cms forum. The current recursion li

Re: Inlining a reverse foreign key relationship in django admin

2011-01-12 Thread Daniel Roseman
On Thursday, January 13, 2011 12:51:35 AM UTC, Viktor Kojouharov wrote: > > Hi, > > Consider the following models: > > class Foo(models.Model): >name = models.CharField(max_length=100) > > class Bar(models.Model): >name = models.CharField(max_length=100) >city = models.ForeignKey(Foo) >

Re: ANN: django-widget-tweaks

2011-01-12 Thread sebastien piquemal
Sounds cool ! On Jan 12, 9:48 pm, Mikhail Korobov wrote: > Hi guys, > > Designers often want to add some css classes and html attributes to > django form fields. But now they have to either patch the python code > or copy-paste full html widget output and then customize it. In order > to make the