UTF-8 encoding

2008-03-09 Thread M.Ganesh
Hi All, I am using MySQL. How to select UTF-8 encoding for the CharFields and TextFields in the models I create? Regards Ganesh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

How to add checkbox in admin change_list

2008-03-09 Thread ma chichu
I need to add some checkboxes to filter the change-list in django admin. I extend "admin/change_list.html" in order to avoid write codes myself. Please give me some simple way to achieve that. --~--~-~--~~~---~--~~ You received this message because you are subscribe

Re: add comments to entry & link models

2008-03-09 Thread Eric Abrahamsen
Hi there, The Comments package is a beast, but it seems that the FreeComments themselves are relatively simple – apart from some nice error checking and validation, the majority of the code is the sneaky mechanism by which you can attach comments to any content type in your project. If yo

Re: add comments to entry & link models

2008-03-09 Thread stranger
Thank you Eric for the reply. Well I am new to django I cannot do that much of coding. I want to know one thing. If I create a comment model with my desired fields, can I use that comment model with the entry and Link models. Note I am using generic views for my blog app. On Mar 9, 7:15 pm, E

Re: add comments to entry & link models

2008-03-09 Thread Eric Abrahamsen
> I tried this but I have some problem with the preview template > There are errors showing up in the freepreview.html > I dont prefer to preview the comment. I like to get it posted and also > I want to include markdown syntax... This part of the page: http://code.djangoproject.com/wiki/Usin

Re: Random UnicodeDecodeError ??

2008-03-09 Thread Malcolm Tredinnick
On Sun, 2008-03-09 at 18:51 -0700, Jean-Pascal Houde wrote: > Excuse me for the delay... I finally had some time to debug this > issue. > First, about the problems I was having : > I moved my application on another server, using apache+mod_python > instead of lighttpd+fastcgi, and all my unicode

Re: Random UnicodeDecodeError ??

2008-03-09 Thread Jean-Pascal Houde
Excuse me for the delay... I finally had some time to debug this issue. First, about the problems I was having : I moved my application on another server, using apache+mod_python instead of lighttpd+fastcgi, and all my unicode problems disappeared. But I made some more tests using a blank project

Problems using mptt

2008-03-09 Thread Tim Adler
Hey everybody, I'm trying to added mptt to my django project for managing a simple page-tree. It doesn't seem to work, as it is supposed too. My model looks like this: from django.db import models import mptt class Page(models.Model): title = models.CharField(maxlength=200) bod

Admin recipes anyone?

2008-03-09 Thread Brandon Taylor
Hello, I'm in my 2nd day of using Django, and there are a couple of things I'd like to do, in regards to adding functionality to the outstanding admin interface. These are age-old topics I'm sure, so I thought I'd consult the community for best practices. First, I will need to build order-able l

Female Sex Hormone

2008-03-09 Thread lz25
The "female sex hormone" estradiol is present in both men and women. It plays various roles in addition to its gender-specific ones, including having effects on the hearing (auditory) system. In a new study, mice deficient in the estrogen receptor beta exhibited reduced recovery from auditory trau

张柏芝谢霆锋陈.冠希之恋(古龙版)

2008-03-09 Thread lz25
谢霆锋:我看过了。 张柏芝:我知道。 谢霆锋:我故意拖到今天才回来。 张柏芝:我知道。 谢霆锋:我是故意让你等我,让你摸不准情况,心烦意乱。 张柏芝:我知道。 谢霆锋忽然笑了笑:只可惜我忘了一点。 他笑得很苦涩:我要你在等我的时候,我自己也同样在等。 张柏芝:我知道。 谢霆锋忽又冷笑:你什么事都知道? 张柏芝:我至少还知道--件事。 谢霆锋:你说。 张柏芝:你确实比他长一点。 谢霆锋的手突然握紧,瞪孔突然收缩,过了很久,才问道:你有把握? 张柏芝:有。 谢霆锋:那么你为什么还要找他。 张柏芝:我找他,是因为另一个地方他比你长。 谢霆锋惊道:难道是 请看 http://healt

Using primary key ID in file upload location?

2008-03-09 Thread Nick Day
Hi, I'm quite new to Django so apologies if this is a really easy question! I have a model with several fields, some of which are ImageFields. To help prevent files overwriting others (if they are uploaded with the same name), and for organisational reasons, I would like to upload the images to

Re: add comments to entry & link models

2008-03-09 Thread stranger
I tried this but I have some problem with the preview template There are errors showing up in the freepreview.html I dont prefer to preview the comment. I like to get it posted and also I want to include markdown syntax... On Mar 9, 1:37 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >

How does the Admin check for the uniqueness of a field of a model?

2008-03-09 Thread lirit
How does Admin check for the uniqueness of a field of a model? I want to see how it's implemented for creating and editing a model. Where does that code reside? Thanks, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: add comments to entry & link models

2008-03-09 Thread [EMAIL PROTECTED]
I'm not sure if you've seen this but check this page out. http://code.djangoproject.com/wiki/UsingFreeComment#AddingCommentstoDetailPages It's pretty much exactly how I'm doing it. On Mar 9, 4:16 pm, stranger <[EMAIL PROTECTED]> wrote: > Hi I think after thinking a while I felt its much better

Re: add comments to entry & link models

2008-03-09 Thread stranger
Hi I think after thinking a while I felt its much better to create a comment model for linking to both entry and link models. But I dont have to idea how to use the comment in the templates with generic views... Can anybody help me in this regard. On Mar 9, 12:55 pm, stranger <[EMAIL PROTECTED

Re: Django on a shared host

2008-03-09 Thread Snoop1990
My Host is profusehost.net I am not sure if they support django, but they have python so I thought it might work. I am new to django ! On Feb 27, 5:15 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > A free webhost that allows Django?  Even if it's fairly limited, > this is interesting.  Can you tell

Re: add comments to entry & link models

2008-03-09 Thread stranger
Thats a good idea...since we are not changing the django framework files we are making a local copy and working on it. Indeed you are very helpful. I'll try to do that for now and see. But writing a comment model is easy. But I dont know how to use that model in entry detail page. Anyway I need o

Managing hierarchial data, with Django

2008-03-09 Thread Tim Adler
Hey everybody, Django is a wonderful tool. It gives you so much freedom of thought. Still I got a problem that I can't figure out up to now. What is the best way for Django to manage hierarchial data? It is totally possible to add a self-referential foreign-key to every model. I also was pointed

Re: add comments to entry & link models

2008-03-09 Thread [EMAIL PROTECTED]
Stranger, I'll go ahead and warn you that I won't be much help. In fact, I'm trying to do the exact same thing but have hit a road block. From what I understand, editing the django.contrib.comments app in it's current location is a bad thing if you ever plan on upgrading django in the future.

newforms-admin questions

2008-03-09 Thread Rob Hudson
How's the stability and/or "readiness" of newforms-admin? I have a project where I'm going to be needing to do some admin tweaking and it sounds like newforms-admin is much more flexible. For example, here are a few things I'm going to be needing to do... * Auto populate a field based on the va

add comments to entry & link models

2008-03-09 Thread stranger
Hello, I would like to add comments(Freecomments) to Entry and Link model in blog application. I wish the comment model have name, email, website and body. Can anyone suggest me how to achieve this. The freecomments do not have website and email fields. if I write a model comment with the

Can newform fields do translation?

2008-03-09 Thread Peter of the Norse
I have a field on a legacy database populated with four letter codes. “TLAA”, etc. Each tetragrammaton has an english translation. I’ve set up a newform Field with a clean method that converts english to code, but there doesn’t seem to be a way for the field to work in the other direction. I c

Appending a variable to the query string for the current URL

2008-03-09 Thread shabda
On each of my pages I want to show a link, which outputs the current page in pdf. To do so I want to append ?pdf=1 or &pdf=1 to the current url. I do so using the code if request.META['QUERY_STRING']: pdfpath = '%s&pdf=1' % request.get_full_path() else: pdfpath = '%s?pdf=1'% r

Re: accounting/financial apps

2008-03-09 Thread Lewis Bergman
Thanks, I'll do that. Chris Moffitt wrote: > > > On Sun, Mar 9, 2008 at 9:04 AM, Lewis Bergman <[EMAIL PROTECTED] > > wrote: > > > Yikes, that thing is complex. Seems powerful but it was difficult to > figure out what to do. I think I would have a reolt on m

Re: best practice to delete an object

2008-03-09 Thread Peter of the Norse
On Mar 5, 2008, at 7:47 AM, Malcolm Tredinnick wrote: > > On Wed, 2008-03-05 at 06:44 -0800, cesco wrote: >> Hi, >> >> my question is really basic but I'd like to make sure I'm doing the >> right thing. >> >> Say a user owns certain objects and it has the possibility to delete >> them by clicking

xmlrcp/metaweblog

2008-03-09 Thread Marius Ursache
Hi, I'm trying to add metaweblog support to a Django blog app. Unfortunately, I didn't manage to get too far. I'm following the instructions from http://www.allyourpixel.com/post/xmlrpc-djgo/. I've copied xmlrpc.py from his site, placed it in the app, changed all the references to ayp.xmlrpc wit

Re: accounting/financial apps

2008-03-09 Thread Chris Moffitt
On Sun, Mar 9, 2008 at 9:04 AM, Lewis Bergman <[EMAIL PROTECTED]> wrote: > > Yikes, that thing is complex. Seems powerful but it was difficult to > figure out what to do. I think I would have a reolt on my hands if I put > this in place. I was thinking something a bit more simple. Thanks > though.

Re: accounting/financial apps

2008-03-09 Thread Lewis Bergman
Yikes, that thing is complex. Seems powerful but it was difficult to figure out what to do. I think I would have a reolt on my hands if I put this in place. I was thinking something a bit more simple. Thanks though. For what I want, it might be just as easy to roll my own. I just want to keep

using tabs like in the admin forms

2008-03-09 Thread Jaime Casanova
Hi, There is any way to use tabs like the ones in the admin form in ordinary ones? -- regards, Jaime Casanova --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Db not being populated for foreignkey

2008-03-09 Thread DuncanM
Just to clear up if its not obvious already. In the admin section when I add a new Menu, I get the MenuItems shown below to add, just when I click the save button it does not save them to the DB, but it does save the menu created. --~--~-~--~~~---~--~~ You received

Re: Db not being populated for foreignkey

2008-03-09 Thread DuncanM
Yeah, I've done that, I actually created the models at the same time so they were all created at once. On Mar 9, 1:35 pm, Nick Fishman <[EMAIL PROTECTED]> wrote: > DuncanM wrote: > > I checked my DB and for somereason the MenuItem's are not being saved > > when I save a menu?? > > > Also my get_a

Re: Db not being populated for foreignkey

2008-03-09 Thread Nick Fishman
DuncanM wrote: > I checked my DB and for somereason the MenuItem's are not being saved > when I save a menu?? > > Also my get_absolute_url method on Menu only returns ".../Menu/" > rather then ".../Menu/id" > > Could someone please show me what I'm doing wrong? > > Thanks, > Duncan > This might

Re: Add a new line in TextField

2008-03-09 Thread James Bennett
On Sun, Mar 9, 2008 at 8:06 AM, Daniel de la Cuesta <[EMAIL PROTECTED]> wrote: > How can I insert a return carriage and new line in a "TextField"? Yes, by pressing the "Enter" or "Return" key, as appropriate for your keyboard layout, or by copy/pasting some line breaks from elsewhere. Here are se

Re: URLConf/ManytoManyField issue (exercise problem from Teach Yourself Django in 24 Hour)

2008-03-09 Thread Evert
> I can do that, but then I get a key error with the name. However, it   > works with similar code here: > > def details(request, pID='0', opts=()): > response = HttpResponse() >         response.write("\n") >         try: >                 p = Person.objects.get(id=pID) >                 if (pID

Re: App not showing up in Admin Site

2008-03-09 Thread James Bennett
On Sun, Mar 9, 2008 at 7:46 AM, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > then use the docs for .96 - but it is far better to use the svn trunk > as there are a lot of goodies there that .96 doesnt have. Also when > you do upgrade you will face a lot of backward compatible problems Somewh

Add a new line in TextField

2008-03-09 Thread Daniel de la Cuesta
Hi, I am using Django trunk. How can I insert a return carriage and new line in a "TextField"? Is there any way to add som html tags in the "TextField? thank you. Daniel de la Cuesta Navarrete Coordinador de Proyectos e I+D BERTIENTE Mobile Techonologies [EMAIL PROTECTED] Teléfono:6270

Re: Is it necessary to impliment tearDown to clean up database when using django.test.TestCase?

2008-03-09 Thread Kent Johnson
meppum wrote: > I've been doing something like the following: > > MODELS = [SomeObjectType, AnotherObjectType] > > class testFoo(TestCase): > > def tearDown(self): > for model in MODELS: > model.objecs.all().delete() > > Is this how tests should be created, or is all this done

Re: App not showing up in Admin Site

2008-03-09 Thread Kenneth Gonsalves
On 09-Mar-08, at 12:03 PM, Lukey wrote: > tutorial, but im using 0.96.1... then use the docs for .96 - but it is far better to use the svn trunk as there are a lot of goodies there that .96 doesnt have. Also when you do upgrade you will face a lot of backward compatible problems -- regar

Db not being populated for foreignkey

2008-03-09 Thread DuncanM
I was trying to create some models similar to that of the basic example "Polls" application. Except instead of Polls and Choice, it would be Menu and MenuItem. I have the following in my models: from django.db import models # -- # Menu Class # -- class Menu(models.Model): nam

"GET /admin/jsi18n/ HTTP/1.1" 500

2008-03-09 Thread Charles
Hi, I'm running Django v0.96 on mac os x 10.5 (leopard) in virtual hosting mode. Whatever action I undertake from the admin I get the following error: "GET /admin/jsi18n/ HTTP/1.1" 500 48192 Has anybody come across this before? I couldn't find any relevant on the subject. Cheers. --~--~-

Re: Custom form where fields in Form do not match Model

2008-03-09 Thread speleolinux
On Mar 9, 1:31 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > If you are going to populate a Decision from self.cleaned_data, then you > need to remove choice1 and choice2, etc, from the cleaned_data dictionary > that you return from your clean() function. Removing them from base_fields > I do

Re: accounting/financial apps

2008-03-09 Thread Nicola Larosa
Lewis Bergman wrote: > Anyone know of any projects like this in Django? The closest I can find > is Luca http://www.epx.com.br/luca/ which is based on turbogears. > > I find myself in need of at least some accounts receivable app that can > track user invoices, payments, balances, and the standard