Re: django templating workaround needed

2009-04-29 Thread Kai Kuehne
Hi, On Wed, Apr 29, 2009 at 3:50 PM, deostroll wrote: > > Hi, > > I cannot render a template written like this: > [code] > > Please suggest a work around, thanx in advance. Try {% instead of (%. --~--~-~--~~~---~--~~ You received this message because you are sub

Re: manage.py syncdb error

2009-04-29 Thread Kai Kuehne
Hi, On Thu, Apr 30, 2009 at 12:17 AM, David wrote: > [error message] > anybody knows how to fix it? Grant CREATE permission for your user on that database. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django u

Re: How do you manage the depenedencies between your project and other open source?

2009-04-29 Thread Kai Kuehne
Hi, On Wed, Apr 29, 2009 at 10:44 PM, meppum wrote: > > Just wanted to get an idea of what tools others were using to manage > the dependencies between their code and other projects. For instance, > if I have a project that uses django registration, voting, and tags > I'd like to have an automat

Re: manage.py syncdb error

2009-04-29 Thread Kai Kuehne
No TOFU please. On Thu, Apr 30, 2009 at 12:49 AM, David wrote: > sorry i can not find a database that table > 'auth_permission' belongs to. any more hints what i should do? Did you FLUSH PRIVILEGES? --~--~-~--~~~---~--~~ You received this message because you are

Re: How do I override __unicode__ for User?

2009-05-17 Thread Kai Kuehne
Hi, On Sun, May 17, 2009 at 10:59 PM, Thierry wrote: > > I currently have a blog model: > > [BlogPost Model] > > Right now, author is returning the default User.username.  I have > other models who has a ForeignKey to User, I want them to keep > defaulting to username while for Blogpost, I want

Re: How do I override __unicode__ for User?

2009-05-17 Thread Kai Kuehne
Sorry, pressed that button too early: You could also write a default method inside your BlogPost model. Maybe something like: class BlogPost(models.Model): ... def author_name(self): return '%s %s' % (self.author.first_name, self.author.last_name) --~--~-~--~~

Re: LANGUAGE_CODE

2009-05-17 Thread Kai Kuehne
Hi, 2009/5/17 sammysun : > > Hi: >When I set LANGUAGE_CODE = 'zh-cn' in the sitting file. I want to > get a 3 letters of month useing filter "date" in the template, e.g. > Useing {{ entry.pub_date|date:"M"}}, I will get "五月" in chinese, but > the one I expect is "May". How can I fix this? W

Re: LANGUAGE_CODE

2009-05-18 Thread Kai Kuehne
Hi, 2009/5/18 sammysun : > On May 18, 6:07 am, Kai Kuehne wrote: >> Why do you expect an english term when you said django >> you want chinese text? > {{ d|date:"F Y" }},there d is > a DateTimeField. I want to get the url like "/blog/may/", not &qu

Re: Internationalization (i18n) of model: request.LANGUAGE_CODE in __unicode__ and ordering?

2009-05-20 Thread Kai Kuehne
On Thu, May 7, 2009 at 4:55 PM, Wouter van der Graaf wrote: > > Hi there, > > Spent hours trying to find the solution, but no luck. So here goes... I have worked on making django-countries working with 1.1: http://github.com/kaikuehne/django-countries/tree/master There's also a branch which use

Re: Internationalization (i18n) of model: request.LANGUAGE_CODE in __unicode__ and ordering?

2009-05-20 Thread Kai Kuehne
Hi, On Wed, May 20, 2009 at 1:16 PM, Wouter van der Graaf wrote: > If your app changes the default ordering of the country list to the > language in request.LANGUAGE_CODE (the user specified language) then > that's a good option for me. It uses django-multilingual which itself uses the default

Re: de-facto tagging (was: When do snippets get into Django?)

2009-05-23 Thread Kai Kuehne
Hi, On Fri, May 22, 2009 at 11:52 PM, Dougal Matthews wrote: > Pretty must everybody does seem to use django-tagging unless they have some > special weird use-case. Huh? Can you remove that "everybody", please? I've never used tagging and I'm confident - many others too. --~--~-~--~---

Re: Introducing DjangoSites.Org

2007-06-23 Thread Kai Kuehne
It's nice but I don't really like the design. It doesn't have to be 'beautiful', but everything on the site is very big (e.g. font size). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Introducing DjangoSites.Org

2007-06-23 Thread Kai Kuehne
Hi Forest, On 6/24/07, Forest Bond <[EMAIL PROTECTED]> wrote: > On Sun, Jun 24, 2007 at 01:42:26AM +0200, Kai Kuehne wrote: > > > > It's nice but I don't really like the design. It doesn't have to be > > 'beautiful', but everything on the sit

Re: Introducing DjangoSites.Org

2007-06-25 Thread Kai Kuehne
Hi, On 6/25/07, wathi <[EMAIL PROTECTED]> wrote: > Hi Kai, > [...] > font-sizes are already relative and i am not going to change anything > for now. as this is not a django related problem or a feature request > for djangosites.org and no one else has complained about this i would > set up a tes

Re: nasa site on django

2007-06-27 Thread Kai Kuehne
Hi, > Vance Dubberly wrote: > > On the plus side it is faster than a similar PHP app ( with APC ) and > > faster than serving static files. Afaik, dynamic things _can't be_ faster than static things. Kai --~--~-~--~~~---~--~~ You received this message because yo

Import error when trying to import 'Tag' from django-tagging

2007-06-30 Thread Kai Kuehne
Hi list! I have a problem when I'm trying to import the model 'Tag' from django-tagging outside an application. My file import-delicious.py is located in the project root directory where the apps are, too. The file looks like this: import os os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' from

Re: Import error when trying to import 'Tag' from django-tagging

2007-07-01 Thread Kai Kuehne
The funny thing is that 'kaikuehne' is my project folder, not a module. --~--~-~--~~~---~--~~ 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 unsu

Re: --+++Does anybody have instructions to make a photo app+++--

2007-07-06 Thread Kai Kuehne
Hi Naco, On 7/6/07, Naco <[EMAIL PROTECTED]> wrote: > > sorry didnt mean to Do you have a concrete problem or error message? I don't know what you mean with Photo-App. One tip: Class names are upper-case. There is a snippet on djangosnippets.org to display thumbnails of ImageField in the admin

Re: --+++Does anybody have instructions to make a photo app+++--

2007-07-06 Thread Kai Kuehne
To avoid confusion: Class names *start* with an uppercase letter. :-) --~--~-~--~~~---~--~~ 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 unsubs

Re: new django site: PotterPredictions.com

2007-07-11 Thread Kai Kuehne
Hi James, On 7/11/07, James Tauber <[EMAIL PROTECTED]> wrote: > > Django users might be interested in my lastest django-based website: > http://PotterPredictions.com/ which allows people to record their > predictions of what will be revealed in the final Harry Potter book, > compare with friends

Re: new django site: PotterPredictions.com

2007-07-11 Thread Kai Kuehne
Well, I meant without to register myself on the site. Sorry if that was confusing. --~--~-~--~~~---~--~~ 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.

Re: Blog engine

2007-07-18 Thread Kai Kuehne
We don't need such an app (well, I don't need it). If I want it, I write it in 20 minutes. :-) Kai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-use

Re: Picture in admin

2007-07-18 Thread Kai Kuehne
Hi Naco On 7/18/07, Naco <[EMAIL PROTECTED]> wrote: > > Does anybody know how to display thumnails in the admin interface? Maybe this is what you want: http://www.djangosnippets.org/snippets/239/ Greetings Kai --~--~-~--~~~---~--~~ You received this message

Re: Blog engine

2007-07-20 Thread Kai Kuehne
Hi Kyle, On 7/18/07, Kyle Fox <[EMAIL PROTECTED]> wrote: > > It's easy to write a "basic" blog in Django. If that's all people > want, then great. Something like that will work perfectly for the > majority of bloggers (who probably won't get that much readership > anyway)... > > But all this ta

Script works in django and in manage.py but doesn't anywhere else

2007-07-21 Thread Kai Kuehne
Hi again, I still get this error where the tagging application is trying to import my project, instead of an application. What I'm trying to do is just to set an objects tags using django-tagging outside a running application and outside of ``manage.py shell``. kaikuehne/delicious/sync.py: =

Re: Script works in django and in manage.py but doesn't anywhere else

2007-07-22 Thread Kai Kuehne
Hi Russel, On 7/22/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > You need to set up your PYTHONPATH. Your project should be in your > PYTHONPATH, so that Django can import your project, and the apps in > that project. Your script has an explicit workaround for this problem > with settings.

A convenient way to include images in a blog entry

2007-07-24 Thread Kai Kuehne
Hi list! In the last past hours I've been thinking about how to include images into my django blog application. At first, I added a new field to my "Entry" django model and named it "image". This worked but I decided that (maybe) I want to include more than one image in a blog entry. So I created

Re: A convenient way to include images in a blog entry

2007-07-25 Thread Kai Kuehne
Hi Patrick, On 7/25/07, Patrick <[EMAIL PROTECTED]> wrote: > What I did in one of my projects is to use a JS editor (at this point I > opted for WYM Editor), which has a function to insert image tags if you > give it a URL. I think that is the most-widely used approach. I don't like such editors

Re: A convenient way to include images in a blog entry

2007-07-25 Thread Kai Kuehne
Hi Justin, On 7/25/07, Justin Lilly <[EMAIL PROTECTED]> wrote: > I'm with Baxter. Tag your images and then just include an image of tag X > along with the story with a similar tag. > > Not sure how this might interact with specific images going with specific > articles, but its not a bad generali

Re: latest django version

2007-07-25 Thread Kai Kuehne
Hi James, > james_027 wrote: > > is there an easy to get the latest version of django in winxp? You could install the windows version of svn which can be found here: http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91&expandFolder=91&folderID=74 Works great for me. Kai --~--~

Re: A convenient way to include images in a blog entry

2007-07-25 Thread Kai Kuehne
Hi, On 7/26/07, Patrick Anderson <[EMAIL PROTECTED]> wrote: > Make the m2m relation optional using (null = True, blank = True) in your > model This is the case. Greetings Kai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

Re: A convenient way to include images in a blog entry

2007-07-25 Thread Kai Kuehne
Unfortunately I cannot keep the relation between Entry and Image because I get an weird error (see #4633) if the m2m field is None. So.. is there another way to just show a list of models on an edit page of another model without having to do a relation between them? Thanks in advance. Kai --~--

Re: How to add a custom filter?

2007-07-27 Thread Kai Kuehne
Hi Haku, On 7/27/07, Haku <[EMAIL PROTECTED]> wrote: > > I'm quite new to python and django. > > How can i add a custom filter? I've found one that i need ( > http://www.djangosnippets.org/snippets/192/ ) bt i dunno how to use it. Here is the documentation: http://www.djangoproject.com/documenta

Re: a rather big, new django site:

2007-07-28 Thread Kai Kuehne
Hi Bram, On 7/28/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: > > > http://www.splicemusic.com/ Looks cool, just one thing: Isn't the age displayed wrong? Every user is about 90 years old. :-) Kai --~--~-~--~~~---~--~~ You received this message because

Re: a rather big, new django site:

2007-07-28 Thread Kai Kuehne
Hi, sorry.. were just two users had fun typing in a wrong age. :-) --~--~-~--~~~---~--~~ 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 unsubscri

Re: Need some advice in new project

2007-07-28 Thread Kai Kuehne
Hi Anna, On 7/28/07, anna <[EMAIL PROTECTED]> wrote: > > Hello my friends. > > I need your help in designing our new based application. > The goal is to build a kind of backoffice system, which helps to > organize all data of a specific company. > No problem with it. Build your models, data struc

Possibility to use property()-fields in QS operations

2007-07-30 Thread Kai Kuehne
Hi list, I've used the property() function to simulate a field that is computed by other fields of a model. Now I want to filter a QuerySet using this property field. I get an error claiming to use a "real" field. I could create one but this is kind of ugly for a field that is completely computed

Re: ANN: django-lifestream

2007-07-31 Thread Kai Kuehne
Hi, On 7/31/07, Horst Gutmann <[EMAIL PROTECTED]> wrote: > The code is available on > > I hope at least some of you might find it useful :-) For some more > informations please also check out the announcement on > T

Unique check errors when using postgres and explicit ids

2007-07-31 Thread Kai Kuehne
Hi list, I have a question regarding data imports with django and postgres. I used the database for my current application and used the db-dump script from here: http://www.djangosnippets.org/snippets/14/ When I load data into the database, I cannot insert new data afterwards. (Some weird unique

Re: Unique check errors when using postgres and explicit ids

2007-07-31 Thread Kai Kuehne
On 8/1/07, Kevin Menard <[EMAIL PROTECTED]> wrote: > I would have to agree with lenducha's synopsis. If the sequence is > not updated, you will run into duplicate ID problems. The easiest > thing to do right now is update all of your sequence curvals to be > something large, where large is defin

Re: Unique check errors when using postgres and explicit ids

2007-07-31 Thread Kai Kuehne
Hi Russell On 8/1/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > On 8/1/07, Kai Kuehne <[EMAIL PROTECTED]> wrote: > > > I'm using django SVN and the windows version of psycopg2. > > Postgres is running on linux (version 8.1.8). It doesn&#x

Re: Unique check errors when using postgres and explicit ids

2007-07-31 Thread Kai Kuehne
Hi Russel, On 8/1/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > Yes. The problem is cause by the way that Postgres (and Oracle, AFAIK) > allocates primary keys. > > [postgres sequence explanation] > > > (Wondering why there is db-dump.py when dumpdata works.. > > but wayne.) > > It was a s

Re: a question about site framework

2007-07-31 Thread Kai Kuehne
Hi, On 8/1/07, Hai Dong <[EMAIL PROTECTED]> wrote: > > Hello: > > I got a question. What if I have two sites, and each site has several > categories (where articles belong to). For such kind of case what is the > best way of utilizing the site framework. What about a ForeignKey field in the cate

Re: a question about site framework

2007-07-31 Thread Kai Kuehne
ManyToManyField maybe is way better. Sorry, its late. --~--~-~--~~~---~--~~ 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

ModelMultipleChoiceField doesn't do initial selection

2007-07-31 Thread Kai Kuehne
Hi list, sorry for bugging you again but I cannot solve this problem. In my applications I have a model DVD and a model Genre related via a ManyToMany field. The problem is that the edit form doesn't show the selected genres already assigned to a DVD instance. The form looks like: class DVDForm(f

Re: UnicodeEncodeError

2007-07-31 Thread Kai Kuehne
Hi Alexandre, On 8/1/07, Alexandre Forget <[EMAIL PROTECTED]> wrote: > > Hi, > > I am stuck with this error, does someone know what it mean? > I am using django svn and sqlite. > > This error happen when I try to delete an object with the admin > interface but it delete fine with the shell. > > a

Re: view and urls..

2007-08-01 Thread Kai Kuehne
Hi, try tu use a string for the view path. --~--~-~--~~~---~--~~ 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

Re: How to get selected value set in newforms

2007-08-01 Thread Kai Kuehne
Hi, On 8/1/07, Thomas Guettler <[EMAIL PROTECTED]> wrote: > if choices=(("a", "Letter A",) ... > > you set initial to "a". Simple, isn't it? No, it isn't. It simply doesn't work with ModelMultipleChoiceField. > Thomas Kai --~--~-~--~~~---~--~~ You received th

Re: a question about site framework

2007-08-01 Thread Kai Kuehne
Hi Harry, On 8/2/07, gt7658b <[EMAIL PROTECTED]> wrote: > > Kai: > > Thanks for the suggestions. In this case, my Article will have > relationship with category, not directly with site. Will I still be > able to take advantage of the functions of site framework? I don't understand you (well, it'

Re: ModelMultipleChoiceField doesn't do initial selection

2007-08-02 Thread Kai Kuehne
No ideas anyone? :-/ --~--~-~--~~~---~--~~ 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 [EMAIL PROTE

Re: ModelMultipleChoiceField doesn't do initial selection

2007-08-02 Thread Kai Kuehne
Hi Lucky, On 8/2/07, Lucky B <[EMAIL PROTECTED]> wrote: > > I think you should be using form_for_instance on the dvd instance > instead of the generic form contructor. > http://www.djangoproject.com/documentation/newforms/#form-for-instance This works, and this is the way I had it first. But I d

Re: ModelMultipleChoiceField doesn't do initial selection

2007-08-02 Thread Kai Kuehne
Forgot something: I could print the form manually and not use form.as_table(). So I can left out the fields I don't want. I think this is ok in this case. Thanks! Kai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: value for choices arguments for newforms.MultipleSelectField

2007-08-02 Thread Kai Kuehne
Hi, On 8/3/07, james_027 <[EMAIL PROTECTED]> wrote: > I don't see ModelMultipleChoiceField on the documentaion or the latest > source code You can look at http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py till the documenation is updated. > Thanks > james

Re: help serving static files (css, images, pdf, js)

2007-08-03 Thread Kai Kuehne
Hi, On 8/3/07, james_027 <[EMAIL PROTECTED]> wrote: > does it affect the django.views.static.serve? If you do not use it, no. Greetings Kai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Admin shows "BlaBla object" for every item in lists instead of the actual names of the objects.

2007-08-05 Thread Kai Kuehne
Hi Neo, On 8/5/07, TheMaTrIx <[EMAIL PROTECTED]> wrote: > > I have many tables with universal data I use across projects, alot of > them are tables with 1 column. > > One example of this is a table named "Continents" with the names of > all continents and subcontinents including the less known on

Re: Admin shows "BlaBla object" for every item in lists instead of the actual names of the objects.

2007-08-05 Thread Kai Kuehne
Hi, On 8/6/07, TheMaTrIx <[EMAIL PROTECTED]> wrote: > > Thanks for the quick reply and it works perfectly. > > Would be good if this was added to the docs on the site, I saw this > was the way it was done in some old screencasts where they were still > calling models out of django.core and after

Re: elseif or elseifqual or elseifnotequal

2007-08-06 Thread Kai Kuehne
Hi James, On 8/6/07, james_027 <[EMAIL PROTECTED]> wrote: > Just want to confirm if elseif and the alike doesn't exist in django's > template. > > What tricks could be give to newbies if something like is needed ... Is switch ok? :) http://www.djangosnippets.org/snippets/300/ --~--~-~--

Re: full-text indexing

2007-08-07 Thread Kai Kuehne
http://www.rkblog.rk.edu.pl/w/p/django-lupy/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, se

Re: django app for managing sending email to users...

2007-08-07 Thread Kai Kuehne
Hi James, On 8/7/07, James Tauber <[EMAIL PROTECTED]> wrote: > > Also posted to > > http://code.google.com/p/django-mailer/wiki/InitialDesignThoughts > From the site: > So after a first pass of the lowest layer (described above) is done, I plan > to add this kind of bulk email support per the pre

Re: full-text indexing

2007-08-07 Thread Kai Kuehne
Hi Thomas, On 8/7/07, Thomas Guettler <[EMAIL PROTECTED]> wrote: > > Am Dienstag, 7. August 2007 12:02 schrieb Kai Kuehne: > > http://www.rkblog.rk.edu.pl/w/p/django-lupy/ > > Hi, > > Does lupy support transactions? Do both (SQL und text database) > syncron

Re: No superuser account

2007-08-07 Thread Kai Kuehne
Hi, On 8/7/07, hongqing <[EMAIL PROTECTED]> wrote: > Hi, > [Problem] > Anyone have suggestions about this problem? >From the tutorial: "you'd like to create a superuser account for the authentication system." On the first-time-sync you type in username and password as superuser account for your

Re: django app for managing sending email to users...

2007-08-07 Thread Kai Kuehne
Hi, On 8/7/07, Ramdas S <[EMAIL PROTECTED]> wrote: > > I am not very sure whether the bulk-mail support personalization. > > I think that should be an important feature. > > More importantly, is there any way to scale it up to handle large > volumes of mails a day without falling into the spam bl

Re: Setting value in admin interface

2007-08-07 Thread Kai Kuehne
Hi, On 8/7/07, Rishtastic <[EMAIL PROTECTED]> wrote: > > Hi! > > I have a teacherProfile which links back to a user. I want each > classroom to have a teacher associated with it and each teacherProfile > can add a classroom. The issue is when the teacher goes to create a > classroom, under the "t

Re: multiple user account login

2007-08-07 Thread Kai Kuehne
Hi James! On 8/8/07, james_027 <[EMAIL PROTECTED]> wrote: > How do I enable multiple user account login in one computer? I don't > know what is the disadvantage if this works this way, I just need it > for development and testing purpose. If I understood your question right, you don't have to en

Re: django app for managing sending email to users...

2007-08-08 Thread Kai Kuehne
Sure, that's not the point. The point is that the user has to give the function a QuerySet. Imho, it should be a QureySet *or* a list.. was just an idea. You're the boss. :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

Re: django app for managing sending email to users...

2007-08-08 Thread Kai Kuehne
Hi, On 8/8/07, James Tauber <[EMAIL PROTECTED]> wrote: > My point is that you just need an iterable. Both lists and QuerySets > meet this requirement. > > There is no casting in Python. You don't need to "cast" a QuerySet to > a list. Sorry.. I mixed my thoughts a bit. I shouldn't post to the li

Re: pagination for search result ...

2007-08-09 Thread Kai Kuehne
Hi James, On 8/9/07, james_027 <[EMAIL PROTECTED]> wrote: > > hi, > > I am trying to put a page list for a search result. So far here's what > I've try by using the django.views.generic.list_detail.object_list and > the pagination tag (http://code.djangoproject.com/wiki/PaginatorTag) > and later

Re: pagination for search result ...

2007-08-09 Thread Kai Kuehne
Hi, On 8/10/07, james_027 <[EMAIL PROTECTED]> wrote: > Hi Kai, > Could you share you code how your save your filter in session? Yes: def list_filter(request): """Update session filter""" # request['filter'] is a hidden field. frankly, I don't know if this is really needed. # I added

Re: pagination for search result ...

2007-08-09 Thread Kai Kuehne
On 8/10/07, james_027 <[EMAIL PROTECTED]> wrote: > > hi, > > > def list_filter(request): > > """Update session filter""" > > # request['filter'] is a hidden field. frankly, I don't know if > > this is really needed. > > # I added it in case I add another form to the template > > if

Re: Newforms validations & request.user

2007-08-09 Thread Kai Kuehne
Hi, On 8/9/07, Collin Grady <[EMAIL PROTECTED]> wrote: > > Add an __init__ function to your form that you can pass request to. > > def __init__(self, request=None, *args, **kwargs): > self.request = request > super(MyForm, self).__init__(*args, **kwargs) > > Something like tha

Re: How to make a field that can be inserted but not updated?

2007-08-10 Thread Kai Kuehne
Hi, On 8/11/07, Russell Blau <[EMAIL PROTECTED]> wrote: > Basically, I want to keep track of every email address that has ever > been registered with my app, to prevent duplication. By overriding > delete(), I prevent any address from being removed from the database, > but I also have to prevent

Re: Pygments + Markdown

2007-08-13 Thread Kai Kuehne
Hi, On 8/13/07, Evan H. Carmi <[EMAIL PROTECTED]> wrote: > > Hi, > > I am trying setup pygments and markdown described here: > http://www.unessa.net/en/hoyci/2006/11/highlighting-code-using-pygments-and-beautiful-soup/ > This works: http://dpaste.com/16735/ --~--~-~--~~~

Re: Pygments + Markdown

2007-08-13 Thread Kai Kuehne
Oh and if you disable markdown, beautifulsoup won't find a code-tag to highlight with pygments. --~--~-~--~~~---~--~~ 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@

Tagcloud for *all* TaggedItems

2007-08-14 Thread Kai Kuehne
Hi guys! I'm using django-tagging for my blog and I want to use it to display a tag cloud. It's easy to get a cloud for a particular model, but I need a tagcloud for *every* item I tagged with django-tagging. But I have no idea on how to do this easily since a Tag has no count attribute in the fir

Re: checking if the model instance is not saved for 1-to-1 models

2007-08-14 Thread Kai Kuehne
Sorry, On 8/15/07, Kai Kuehne <[EMAIL PROTECTED]> wrote: > self.added = models.DateTimeField(auto_now=True) I meant auto_now_add. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: checking if the model instance is not saved for 1-to-1 models

2007-08-14 Thread Kai Kuehne
Hi Omat, On 8/14/07, omat <[EMAIL PROTECTED]> wrote: > def save(self): > if not self.reftable_id: > self.added = datetime.now() > super(MyModel, self).save() > > where reftable_id is the field that references to the related model. Is self.added = models.DateTimeField(auto_now=Tr

Re: Tagcloud for *all* TaggedItems

2007-08-15 Thread Kai Kuehne
Thanks Era! On 8/15/07, Eratothene <[EMAIL PROTECTED]> wrote: > [Code] I think I will create a ticket. Maybe Jonathan can integrate such a function directly into django-tagging. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

Re: checking if the model instance is not saved for 1-to-1 models

2007-08-15 Thread Kai Kuehne
Hi, On 8/15/07, omat <[EMAIL PROTECTED]> wrote: > No, because auto_now & auto_now_add are deprecated and the recommended > way to provide auto_now functionality is by overriding the save() > method. That's why I am doing it that way... >From where do you get that information? --~--~-~--

Re: CacheMiddleware and middleware orders matters

2007-08-15 Thread Kai Kuehne
Hi Erarothene, On 8/16/07, Eratothene <[EMAIL PROTECTED]> wrote: > > I am totally confused with CacheMiddleware docs and middleware docs. > > I want to use such middlewares in project: > ConditionalGetMiddleware > GZipMiddleware - addes Vary on Accept-Encoding > SessionMiddleware - addes Vary on

Re: Tagcloud for *all* TaggedItems

2007-08-16 Thread Kai Kuehne
Hi, I thought I'll post my problem here too. Maybe someone had the same problem. I tried to add the usage_for_models()-function Era gave me into django-tagging(into .../site-packages/django_tagging/managers.py). I inserted it before the usage_for_model() -function and restartet the dev-server and

Re: UnicodeDecodeError in template rendering

2007-08-18 Thread Kai Kuehne
Hi, On 8/19/07, cesco <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm using sqlite3 as db for my django project. > In order to load the data in the db I first generated a unicode string > (which contains danish characters "ø, æ, å") and dumped such a string > to a file (in json format) as follows: > f

Re: type object 'HtmlFormatter' has no attribute 'encoding'

2007-08-18 Thread Kai Kuehne
Hi, On 8/19/07, Evan H. Carmi <[EMAIL PROTECTED]> wrote: > #from dpaste.com/16735 > `print "hello world"` > > I am using a PostgreSQL database. Looks like my code, but you missed something. :) Add the parenthesis on line 94 and it'll work: formatter = HtmlFormatter() > Thanks, > Evan

Re: type object 'HtmlFormatter' has no attribute 'encoding'

2007-08-18 Thread Kai Kuehne
You could also use the codehilite extension for markdown: http://achinghead.com/markdown/codehilite/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-u

Re: wiki design

2007-08-19 Thread Kai Kuehne
Hi Carl, On 8/19/07, Carl Karsten <[EMAIL PROTECTED]> wrote: > > I am trying do design a iddy biddy site that will replace a site that is only > about 8 static pages. I want to make it wiki-ish, so the 'site admin' can > tweak > things now and then, and it needs pictures. so sort of a hybrid b

Re: List comprehension with unique, sorted values

2007-08-19 Thread Kai Kuehne
Hi, On 8/19/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi there! > > I thought this is just the kind of questions you love :) > > I haven't been able to find concise information about this on the net. > > I need to construct a choices var f

Re: List comprehension with unique, sorted values

2007-08-19 Thread Kai Kuehne
I should have mentioned that I found such a function in the ASPN cookbook. Hope this helps (a bit)! --~--~-~--~~~---~--~~ 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: Question: trailing escaped character in a href=""?

2007-08-19 Thread Kai Kuehne
Hi, On 8/19/07, Drasty <[EMAIL PROTECTED]> wrote: > I'll investigate to see if will successfully point > to , though I have my doubts! Which version of django do you use? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Re: Row level security

2007-08-20 Thread Kai Kuehne
Hi, On 8/21/07, Catriona <[EMAIL PROTECTED]> wrote: > Is there a way to implement row level security where a user can > determine who can do what to particular records - ie invoices? The > default would be full access only to the creater. > > I am looking at implementing a ContactInvoiveRole tabl

Re: How to link SVN Django to Python? (for easy update)

2007-08-22 Thread Kai Kuehne
Hi, On 8/22/07, b3n <[EMAIL PROTECTED]> wrote: > > I did search but didn't find anything. Probably because the answer is > too obvious... > > I checked out django using SVN but how do I do the next bit? > > "Symlink django_src/django so that django is within your Python site- > packages directory

Re: How to link SVN Django to Python? (for easy update)

2007-08-22 Thread Kai Kuehne
Hi, On 8/22/07, b3n <[EMAIL PROTECTED]> wrote: > > Yeah that's how I've done it at the moment. > > But it's not good! > > Every time I run SVN Update, I would need to copy everything from > django_src to site-packages again. The snippet I quoted above implies > that that's not necessary. If you

Re: merge models for generic view

2007-08-22 Thread Kai Kuehne
Hi, On 8/22/07, Drasty <[EMAIL PROTECTED]> wrote: > > Is there a way to concatenate model querysets and use the > concatenation as the basis for a date-based generic view? Or, would I > be able to mimic the generic view code but alter it in such a way that > it handles the concatenation? > > (Eac

Re: Marty Alchin's AuditTrail

2007-08-22 Thread Kai Kuehne
Hi, On 8/22/07, perrito666 <[EMAIL PROTECTED]> wrote: > > Hello people, i have found a situation where AutidTrail comes very > handy, but it does not work out of the box on my model, it says here > http://www.djangoproject.com/weblog/2007/aug/19/djangoroundup/#comments > that someone is working o

loaddata and object query does not exist

2007-08-26 Thread Kai Kuehne
Hi list, I cannot load my data into the postgres db. I dumped it on the production server and want to load it on the dev machine (both SVN 6020): $ python manage.py loaddata dump.json Loading 'dump' fixtures... Installing json fixture 'dump' from absolute path. Problem installing fixture 'dump.js

Re: Customizing the class returned by newforms.form_for_model()

2007-03-03 Thread Kai Kuehne
Hi Honza, On 1/16/07, Honza Král <[EMAIL PROTECTED]> wrote: > the same way the class itself is constructed: > type(name, parent_list, { __dict__} ) I've liked python, but now I'm loving it. Thank you for the eye-opener. :-) Kai --~--~-~--~~~---~--~~ You received

Adding fields to comment-form

2007-03-03 Thread Kai Kuehne
Hi list, What is the way to add an (e.g.) email-field to the comments form generated by: {% free_comment_form for blog.entry object.id with is_public yes %} Sorry, I didn't find much documentation about the comments package. Thank you for tips Kai --~--~-~--~~~---~--

Re: Free comments not displayed

2007-03-03 Thread Kai Kuehne
Hi Dirk, On 3/3/07, Dirk Eschler <[EMAIL PROTECTED]> wrote: > I can add comments through the frontend, but they won't show up. In the free > comments admin list view it says "2 free comments", the list however is > empty. I think you have to check the "is public" checkbox in admin. I used it thi

Re: Free comments not displayed

2007-03-03 Thread Kai Kuehne
Hi, On 3/3/07, Dirk Eschler <[EMAIL PROTECTED]> wrote: > Hi Kai, > > the problem is, that i don't see any entries in admin interface. It says "2 > free comments", which is the amount of entries i have added through the > frontend, but the list is empty. Ok, I misunderstood you. :) Have you teste

Re: Newbie: Admin / Model help

2007-03-04 Thread Kai Kuehne
Hi Duncan, this works for me: from django.db import models class Fixture(models.Model): #team = models.ForeignKey(Team, "Team", core=True) #venue = models.CharField("Venue", maxlength=1, choices=Fixture_Choices, core=True) date = models.DateField("Date", core=True) opponent = m

Re: Model help

2007-03-05 Thread Kai Kuehne
Hi Duncan, On 3/5/07, DuncanM <[EMAIL PROTECTED]> wrote: > [Class description] > > The squad selector also has a foriegnkey on fixture, but also has 16 > other fields that are all foreignkeys on player. > > [SquadSelector class] > > Now I have a few queries/questions. > 1.)As you can see from the

Re: creating a website log

2007-03-05 Thread Kai Kuehne
Hi, * Patrick <[EMAIL PROTECTED]> wrote: > Is there a way to take the logging features in admin app and customise > them for my site, or is it coupled too tightly with the admin section to > even take that route? I think there's a full-history branch in the svn. But I don't know if it's actively

  1   2   >