Django and Guild Wars

2006-07-23 Thread [EMAIL PROTECTED]
Greetings, I'm working on a guild management web application for Guild Wars guilds, including such features as: * Build management (1-man, 4-man, and full 8-man groups) * Skill List with assorted details and calculations * Events system (for signing up to play individual spots on a build) * Link

Re: Search Engine for Python and Django

2006-07-23 Thread nkeric
what about pylucene? http://pylucene.osafoundation.org/ we're using it for indexing our site & searching :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

Re: Search Engine for Python and Django

2006-07-23 Thread Ian Holsman
SolR  http://incubator.apache.org/projects/solrmight be worth a look.. I think there is a python interface for it.regardsIan.On 24/07/2006, at 1:08 PM, Vizcayno wrote:Hi:Do your have news about the promising MerQuery?I was looking for some good open software Search Engine API (index andsearch) for

Search Engine for Python and Django

2006-07-23 Thread Vizcayno
Hi: Do your have news about the promising MerQuery? I was looking for some good open software Search Engine API (index and search) for Python in Win32. I could see some promising ones but, as always in the open soft. community, many atomised and incomplete efforts. The last I looked was Swish-e w

Re: Re: ManyToManyField Usage

2006-07-23 Thread Minglei Wang
Dear Martin, a little bit disagree with your opnions. please see the code, objalbum.save() song, created = objalbum.song_set.get_or_create(name=name, album=objalbum) That is to say, before get_or_create a song in album, the album is already exist and has an id. according to the definition of Fo

Re: Sharing tables between apps

2006-07-23 Thread Malcolm Tredinnick
On Mon, 2006-07-24 at 01:52 +, [EMAIL PROTECTED] wrote: > I'm completely new to Django and relatively new to databases, so > forgive me if this is a naive or stupid question. > > I'm designing a site for a radio station, and some models seem to have > much wider scope than others. For exampl

Re: Sharing tables between apps

2006-07-23 Thread [EMAIL PROTECTED]
Ok, I wasn't sure if this would import only the models and create new, empty tables in the playlist app, or if it would allow access to the original tables. Thanks! Matt SmileyChris wrote: > Hi Matt, > > Your playlist app can use the models in your schedule app by just > importing them. > > fro

get-XXX function vs. XXX property

2006-07-23 Thread Martin
Hi, I was wondering if somebody can tell me why properties are not more widely used in django. I encountered several `attribute` style functions (like get_profile, get__url) where using properties and removeing the `get_` from the name would make more sense (at least for me). Any particula reaso

Re: Sharing tables between apps

2006-07-23 Thread SmileyChris
Hi Matt, Your playlist app can use the models in your schedule app by just importing them. from schedule.models import Show Of course, it depends on your directory structure, but you get the idea? --~--~-~--~~~---~--~~ You received this message because you are

Re: CGI Setup

2006-07-23 Thread Martin
OK, I have splitted my file into a handler and `server file` and attached them to a new ticked http://code.djangoproject.com/ticket/2407) (Ignore the first version of CGI.py, I have forgotten to remove my standard file header...) Martin( --~--~-~--~~~---~--~~ Yo

Re: Sharing tables between apps

2006-07-23 Thread [EMAIL PROTECTED]
Ok, I realize that I phrased my question poorly. I'm not really interested in a strict hierarchy (which I see is in development), but in whether or not there is a good way to share some more general data (like what would be stored in show and dj tables) with more specific data (like what would be

Re: get-XXX function vs. XXX property

2006-07-23 Thread Adrian Holovaty
On 7/23/06, Martin <[EMAIL PROTECTED]> wrote: > I was wondering if somebody can tell me why properties are not more > widely used in django. I encountered several `attribute` style > functions (like get_profile, get__url) where using properties and > removeing the `get_` from the name would make m

Sharing tables between apps

2006-07-23 Thread [EMAIL PROTECTED]
I'm completely new to Django and relatively new to databases, so forgive me if this is a naive or stupid question. I'm designing a site for a radio station, and some models seem to have much wider scope than others. For example, I want to create a playlist app and a schedule app. Both need acce

Re: AttributeError: class Http404 has no attribute 'has_header'

2006-07-23 Thread Jacob Kaplan-Moss
On Jul 23, 2006, at 5:52 PM, Afternoon wrote: > Has anybody else seen this error? It's obvious that Http404 doesn't > have the method, it's just a subclass of Exception. If this is just a > Django bug, I'll happily post a patch, just want to feel out any > possible stupidness on my part first :-)

Re: AttributeError: class Http404 has no attribute 'has_header'

2006-07-23 Thread Afternoon
Looked around the code a bit, the definition of Http404, the old HttpResponseNotFound, the cache and middleware stuff, I can't see how this is supposed to work out at all! The intervening request handling layers expect a proper response object, instead they're getting an exception? --~--~---

AttributeError: class Http404 has no attribute 'has_header'

2006-07-23 Thread Afternoon
I'm getting an annoying error with trunk, even up to 3430. When a 404 is raised, with DEBUG True or False, the Vary header logic falls over. Stack trace follows. Has anybody else seen this error? It's obvious that Http404 doesn't have the method, it's just a subclass of Exception. If this is just

a miniblog example in django

2006-07-23 Thread [EMAIL PROTECTED]
I wrote a mini Blog in django - code: http://www.linuks.rk.edu.pl/miniblogen.zip It isn't something finished, more like an example :) read the readme and you will see. Some screenshots (from Polish version) are here: http://www.fotosik.pl/pokaz_obrazek/e6fa6081f59049c3.html http://www.fotosik.pl/p

Re: Hierarchical menu model

2006-07-23 Thread Laurent Rahuel
Hi, You should better use a modified preorder tree traversal (or a nested tree) table to store your data, then you'll be able to get the whole site map with a single query. see http://www.sitepoint.com/article/hierarchical-data-database Regards, Laurent Le dimanche 23 juillet 2006 20:22, [EM

Re: Any good Python book recommendations?

2006-07-23 Thread Jeremy Jones
On Sun, 23 Jul 2006 17:07:31 +0900 Sean Schertell <[EMAIL PROTECTED]> wrote: > > Thanks all, I'm leaning towards "Beginning Python: From Novice to > Professional". The Amazon reviews sound right up my alley. Anyone > had any experience with this one? > > Sean > I was the tech editor for thi

Getting foreign relationship data in views

2006-07-23 Thread andyhume
Hi - new to the group here. And new to Django too. I'm having trouble understanding how to use the database API to get data back which includes any data from a table with a ManyToManyField relationship. eg, below. The function below searches in the first_name and last_name fields in the Client t

Re: Rich HTML Editting in Admin Interface

2006-07-23 Thread sean
You might want to try one of these approaches: http://code.djangoproject.com/wiki/CookBookAdminTools I haven't tried any of these yet myself, but those links could be a starting point. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Hierarchical menu model

2006-07-23 Thread [EMAIL PROTECTED]
This model allows for site-map style menu hierarchies in the admin interface: top level -subpage --another subpage -subpage2 It feels snappy, but I bet it's inefficient due to the fact that it is recursively calling self.parent. I imagine that there's a way to optimize it. --- class MenuManag

Rich HTML Editting in Admin Interface

2006-07-23 Thread TomWells
Hey Django Users! I'm relatively new to django, but been working on re-writing my ugly 'off the shelf' blog for a couple of weeks in django and am amazed how perfectly suited the django-admin interface is for this! I'm planning to initially use the Admin interface to add/update my blog entries,

Re: ManyToManyField Usage

2006-07-23 Thread Martin Robinsson
Minglei Wang wrote: > [...] > when i want to get or create a song object in album like following, the > second parameter (album=objalbum) must be put on. > Otherwise it would report an error: album_id must not be null. > > song, created = objalbum.song_set.get_or_create(name=name, album=objalbum)

Re: about row level permissions

2006-07-23 Thread mahakala
I got it. 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-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECT

Re: about row level permissions

2006-07-23 Thread James Bennett
On 7/23/06, mahakala <[EMAIL PROTECTED]> wrote: > Would anybody kindly tell me what's wrong? Thanks. Probably it's a bug in the branch. The various side branches of Django are there to give people a place to develop new features without breaking the main trunk, and are provided not because they'

Re: Model for uppercase CharField ?

2006-07-23 Thread James Bennett
On 7/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I had the need for a CharField which stores the values always in uppercase > form. Is there a solution out there ? Ivan's suggestino of adding a custom save() method on the model which uppercases the contents of the field you want upperc

Can I use an __init__ method on a model ?

2006-07-23 Thread Ruben
I'd like to initialize additional members of a model object. Is there a method similar to__init__() ? I.e. a method that is called by Django, when a model instance is created ? Or is it safe/recommended to use __init__() ? Thank you, Ruben --~--~-~--~~~---~--~--

Re: Any good Python book recommendations?

2006-07-23 Thread Carlos Yoder
>> Any recommendations? I'm brand new to Python and want to learn for >> use with Django. > The "Learning Python" O'Reilly book is really, really good - one of > the best "Learning X" books I've read for any language. Even better than "Learnin Perl"? =) (ducks) -- Carlos Yoder http://carlito

Re: Any good Python book recommendations?

2006-07-23 Thread Kenneth Gonsalves
On 23-Jul-06, at 10:33 AM, Sean Schertell wrote: > I've downloaded Dive into Python and it looks good. But I need > something I can read on the subway or in the bathtub. Something I can > dog-ear and highlight -- a real book! python in a nutshell - books teaching python are no use, because th

Re: pls help with a m2m sql

2006-07-23 Thread nkeric
Maciej Blizinski wrote: > I'd like to suggest alternative SQL solution which performs better. > With my example database Malcolm's query takes 214ms to execute, while > my query does the same job in 5.8ms, which is 36 times faster. > > My solution is described here: > http://groups.google.com/grou

Re: pls help with a m2m sql

2006-07-23 Thread nkeric
Malcolm Tredinnick wrote: > At the moment, you need to write some custom SQL to implement this. One > possible solution is here: > http://www.pointy-stick.com/blog/2006/06/14/custom-sql-django/ hi Malcolm, sorry I missed your link, I just look into your doc & code, pretty much the same as my fri

Re: pls help with a m2m sql

2006-07-23 Thread Maciej Bliziński
On Sun, 2006-07-23 at 22:09 +1000, Malcolm Tredinnick wrote: > Whilst your suggestion is slightly faster for smaller cases, the problem > is that it doesn't scale quite as well: there is an upper limit for the > number of joins a database can do, for example. For list-wise scaling, yes. I've once

Re: Re: ManyToManyField Usage

2006-07-23 Thread Minglei Wang
Hi martin,   thanx your help. i solved it. I change the model: class Author(models.Model): name = models.CharField(maxlength=200) class Admin: ordering = ['-name'] def __str__(self):   return self.name   class Album(models.Model):   name 

Re: FileBrowser Test Version

2006-07-23 Thread patrickk
thanks, benj. I will update as soon as possible - still trying to install the svn-repository ... Am 23.07.2006 um 03:36 schrieb benj: > > Patrick, > Thanks for this great extension! > One snag I hit is that your code assumes we serve our admin media from > /media/, which I happen not to. I jus

Re: pls help with a m2m sql

2006-07-23 Thread Malcolm Tredinnick
On Sun, 2006-07-23 at 13:03 +0200, Maciej Bliziński wrote: > Hi Eric and Malcolm, > > On Sun, 2006-07-23 at 17:53 +1000, Malcolm Tredinnick wrote: > > At the moment, you need to write some custom SQL to implement this. One > > possible solution is here: > > http://www.pointy-stick.com/blog/2006/0

Re: (Re)ordering stuff

2006-07-23 Thread patrickk
what baczek asked is probably some sort of drag-and-drop (either using AJAX or simple up/down-buttons). since the admin-interface is easy to customize, it´s not so hard to do that by yourself. on the other hand, it´d be cool to have that built-in already, e.g. as an admin-option when definin

Re: mysql collate problem

2006-07-23 Thread Geert Vanderkelen
hi! liupei wrote: > when I set mysql some fields collate utf8_bin, and then fetch these > fields is array.array,not the string I expected .this will cause that > When I try to login to the admin site I get a TypeError : a2b_base64() > argument 1 must be string or read-only character buffer, not >

Re: pls help with a m2m sql

2006-07-23 Thread Maciej Bliziński
Hi Eric and Malcolm, On Sun, 2006-07-23 at 17:53 +1000, Malcolm Tredinnick wrote: > At the moment, you need to write some custom SQL to implement this. One > possible solution is here: > http://www.pointy-stick.com/blog/2006/06/14/custom-sql-django/ I'd like to suggest alternative SQL solution w

Re: ManyToManyField Usage

2006-07-23 Thread Martin Robinsson
Hi Minglei, First of all I think I would rename "author" in Album to "authors" to reflect the fact that there can be many authors. You could use something like this: objalbum, created = Album.objects.get_or_create(name=album) objalbum.authors.add(objauthor) or objauthor.album_set.get_or_create(nam

Re: New - monkey

2006-07-23 Thread Cheng Zhang
Of 'coz you can download everything needed on your windows box, then transfer over. - Cheng On Jul 21, 2006, at 7:59 PM, Rajeshwar Singh Jenwar wrote: > Hi ALL, > I m new to Django. > My linux box does not have net connection. > Can someone suggest me how to intsall Django with MySQL on Linux

ManyToManyField Usage

2006-07-23 Thread Minglei Wang
Hi,   I created 2 objects as following:   class Author(models.Model): name = models.CharField(maxlength=200) class Admin: ordering = ['-name'] def __str__(self): return self.name   class Album(models.Model): name = models.CharField(maxlength=200) author = models.ManyToManyField(A

about row level permissions

2006-07-23 Thread mahakala
Hi, everybdoy I just download the row level permission branch, and try as the wiki said, add row_level_permissions to class Meta: class Poll(models.Model): question = models.CharField(maxlength=200) pub_date = models.DateTimeField('date published') class Admin: pass clas

Re: Model for uppercase CharField ?

2006-07-23 Thread Ivan Sagalaev
[EMAIL PROTECTED] wrote: > Hi all, > > I had the need for a CharField which stores the values always in uppercase > form. Is there a solution out there ? > > Maybe the follwing simple generic solution would be fine: > > class UpperCase(models.Model): >uppercase_field = models.CharField(max

Model for uppercase CharField ?

2006-07-23 Thread dummy
Hi all, I had the need for a CharField which stores the values always in uppercase form. Is there a solution out there ? Maybe the follwing simple generic solution would be fine: class UpperCase(models.Model): uppercase_field = models.CharField(maxlenght=10, uppercase=True) Regards, Dirk -

Re: pls help with a m2m sql

2006-07-23 Thread nkeric
o, the count(*) is unnecessary, select object_id from tagging_object_tag where tag_id in (15, 16) group by object_id having count(*)=2; ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Any good Python book recommendations?

2006-07-23 Thread Sean Schertell
Thanks all, I'm leaning towards "Beginning Python: From Novice to Professional". The Amazon reviews sound right up my alley. Anyone had any experience with this one? Sean On Jul 23, 2006, at 3:11 PM, Alessandro Bottoni wrote: > > Sean Schertell ha scritto: >> Any recommendations? I'm brand

Re: pls help with a m2m sql

2006-07-23 Thread nkeric
hi Malcolm, thank you very much for your quick reply! I knew I need to build my custom SQL, my friend (who is a db master :) just came back and suggests me to do this: select object_id, count(*) from tagging_object_tag where tag_id in (15, 16) group by object_id having count(*)=2; pretty cool

Re: pls help with a m2m sql

2006-07-23 Thread Malcolm Tredinnick
Hi Eric, On Sun, 2006-07-23 at 07:26 +, nkeric wrote: > hi all, > > I have a m2m table recording object & it's tags, here is part of the > table data: > > object_idtag_id > 115 > 116 > 215 > 316 > 415 > 4

pls help with a m2m sql

2006-07-23 Thread nkeric
hi all, I have a m2m table recording object & it's tags, here is part of the table data: object_idtag_id 115 116 215 316 415 416 417 I would like to select object_ids where tag_id