Re: increase size of a charfield

2006-10-26 Thread Benedict Verheyen
Malcolm Tredinnick schreef: >> >> In general, we want like to avoid putting presentation related >> information into models, since they should be presentation independent >> as much as possible. The fact that we haven't avoided that entirely so >> far isn't an excuse to slide further down that slo

Re: ado_mssql introspection patch

2006-10-26 Thread Carlos Yoder
OK, if we can narrow the possibilities down to a patch mistake, I can tell you what I did: cywgin go to django src dir (the 'trunk' directory of svn) patch -p0 mssql_update5.diff no errors reported, and TortoiseSVN's icons changed on selected folders under 'trunk', to indicate code was altered.

Re: Completed Django Project

2006-10-26 Thread peonleon
hey thanks for the comments, and thanks for the good suggestions, now back to work... --~--~-~--~~~---~--~~ 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@googlegro

Date ranges associated with model relationships

2006-10-26 Thread PirahnaBreaks
I'm a recovering PHP developer and I'm looking at using Django for my next project - I know how to accomplish the following in PHP (well, technically it's mostly accomplished in SQL...) but I'd like to know how difficult it would be to handle this in Django: I'm trying to create a model for a cer

Re: Postgresql duplicate keys and django problem

2006-10-26 Thread can.xiang
Denis, your suggestion fixed a similar problem bugging me hours. I tried to migrate some (1,000s rows) tables from mysql to postgresql with the build-in model functions, which is absolutely no problem. While when I tried to add new data with manipulator.save(), it always raise "integrity error" o

Re: Packaging an app for distribution

2006-10-26 Thread Malcolm Tredinnick
On Fri, 2006-10-27 at 02:48 +0100, João Cruz Morais wrote: > Since the subject of packaging came up, is there a jar equivalent for > python? The zipimport module in Python 2.3 and later might be what you are interested in. Malcolm --~--~-~--~~~---~--~~ You rec

Re: Packaging an app for distribution

2006-10-26 Thread João Cruz Morais
Since the subject of packaging came up, is there a jar equivalent for python? João Malcolm Tredinnick wrote: > On Thu, 2006-10-26 at 20:09 -0400, Oliver Lavery wrote: > >>Hi, >> >>The company I work for needed to add an infrastructure component to >>django for a site we're building. Since it c

Re: Packaging an app for distribution

2006-10-26 Thread Malcolm Tredinnick
On Thu, 2006-10-26 at 20:09 -0400, Oliver Lavery wrote: > Hi, > > The company I work for needed to add an infrastructure component to > django for a site we're building. Since it could be generally useful > we'd like to release it to the public in the not-too-distant future. > We think it's prett

Re: Views Tutorials

2006-10-26 Thread Malcolm Tredinnick
On Thu, 2006-10-26 at 07:59 -0700, [EMAIL PROTECTED] wrote: > Hi! > > I was wondering if anybody had any good, easy Django Views > tutorials. I have tried to follow everything up on the django tutorial > project site, and I understand everything else pretty well. But it's > just trying to w

Re: increase size of a charfield

2006-10-26 Thread Malcolm Tredinnick
On Thu, 2006-10-26 at 15:41 +, RajeshD wrote: > I agree completely with Malcolm's explanation above. > > You can use CSS' width and height properties on your form's input > elements where you need a different size. This solution keeps your > presentation layer separate from your content/model

Re: increase size of a charfield

2006-10-26 Thread Malcolm Tredinnick
On Fri, 2006-10-27 at 00:30 +1000, Malcolm Tredinnick wrote: > On Thu, 2006-10-26 at 14:38 +0200, Benedict Verheyen wrote: > > Benedict Verheyen schreef: > > > Hi, > > > > > > a have a charfield of 255 chars in a model but on the form, it > > > consists of a smallish > > > inputfield instead of a

Re: Curious about 1.0 release.

2006-10-26 Thread Malcolm Tredinnick
On Fri, 2006-10-27 at 00:33 +0200, Antonio Cavedoni wrote: > On 25 Oct 2006, at 16:11, sansmojo wrote: > > Thanks so much for the responses. I am not scared of the fact that > > Django is not at 1.0 - I need to convince others not to be :) > > > > Any ideas of how I might offer a proof (or stro

Re: Completed Django Project

2006-10-26 Thread Luis Armendariz
[EMAIL PROTECTED] wrote: > Hi django friends, > > I just finished my first django project, http://asme.seas.ucla.edu . A > little background: over summer, I started studying python, and after > finishing a couple books I got seduced by django and at the same time > was asked to make/design a webs

Re: ado_mssql introspection patch

2006-10-26 Thread Sean De La Torre
I'm glad it worked! Let me know if you run into any other issues. The more people that look at this patch, the better. The one known gap in functionality is paging support, but everything else should work. On 10/26/06, abc123 <[EMAIL PROTECTED]> wrote: > > Hi Sean, > > Enthused by your response

Packaging an app for distribution

2006-10-26 Thread Oliver Lavery
Hi,The company I work for needed to add an infrastructure component to django for a site we're building. Since it could be generally useful we'd like to release it to the public in the not-too-distant future. We think it's pretty cool, and can't wait to share it with everyone; with the huge head st

Re: ado_mssql introspection patch

2006-10-26 Thread abc123
Hi Sean, Enthused by your response, I also deleted my Django install, cleared out the database, and started from scratch. I installed the latest version from SVN trunk, patched automatically this time (patch applied cleanly), and it works fine now. I went through with diff to see what I'd done w

Re: Curious about 1.0 release.

2006-10-26 Thread Antonio Cavedoni
On 25 Oct 2006, at 16:11, sansmojo wrote: > Thanks so much for the responses. I am not scared of the fact that > Django is not at 1.0 - I need to convince others not to be :) > > Any ideas of how I might offer a proof (or strong evidence) of > 0.95's stability? You might also want to point y

Re: Completed Django Project

2006-10-26 Thread RajeshD
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-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For

Re: directed graph in default admin

2006-10-26 Thread John Lenton
On 10/26/06, Guillermo Fernandez Castellanos <[EMAIL PROTECTED]> wrote: > > Cheers, > > have a look at the Meta options order_with_respect_to and ordering: > http://www.djangoproject.com/documentation/model_api/#order-with-respect-to no, that's not it. Or I didn't understand how to use it; at any

Re: Re: Completed Django Project

2006-10-26 Thread Jay Parlar
Very nice. One suggestion (based on 2 minutes of looking at it) would be that for your members/ URLs, use SlugFields of the members' names, as opposed to their ID in the database. For example, the URL for Karen Chang is currently http://asme.seas.ucla.edu/members/15 This would look much better

Re: OT: looking for resources on session programming

2006-10-26 Thread [EMAIL PROTECTED]
Hi, I highly recommend Chris Shiflett's "The truth about Sessions" [1] article. It's written for PHP users, but it's more of an overview than a php tutorial. Shiflett is one of the main security gurus of the field and it's a very good quick article. --Simon [1] http://shiflett.org/articles/the-

Re: Completed Django Project

2006-10-26 Thread Istvan Albert
Looks nice Leon, congratulations. You might want to try to tweak the spacing to allow for a little more text per page ... and allow for the latest news to be read without having to scroll the page just an opinion, i. --~--~-~--~~~---~--~~ You received this mes

Completed Django Project

2006-10-26 Thread peonleon
Hi django friends, I just finished my first django project, http://asme.seas.ucla.edu . A little background: over summer, I started studying python, and after finishing a couple books I got seduced by django and at the same time was asked to make/design a website (im studying design), I figured i

Re: filters on form objects

2006-10-26 Thread Patrick J. Anderson
RajeshD wrote: > >> Or do I have to pass this list of >> albums to the template: >> >> my_albums = Album.objects.filter(owner = request.user) > > This will work. > >> and then construct a select box based on that list. If so, I'd probably >> "break out" of {{ form.albums }} and loose {{ form.er

Re: filter in template standalone mode

2006-10-26 Thread RajeshD
> I Configure successfully the django template system in standalone mode > follow the document, > but how to use the filter in this standalon mode? Filters and tags work exactly like they do in "regular" mode. Just make sure that you have defined the appropriate settings parameters that you would

Re: filters on form objects

2006-10-26 Thread RajeshD
> Or do I have to pass this list of > albums to the template: > > my_albums = Album.objects.filter(owner = request.user) This will work. > > and then construct a select box based on that list. If so, I'd probably > "break out" of {{ form.albums }} and loose {{ form.errors }}. Is that so? No. Y

Re: Yet another karma/comment question

2006-10-26 Thread Guillermo Fernandez Castellanos
Hi, Looking at the model, you can see that: class KarmaScore(models.Model): user = models.ForeignKey(User) comment = models.ForeignKey(Comment) [...] So I would think that, if there's a comment of a given user, you can know if he voted or not by doing a template tag that takes a comm

filters on form objects

2006-10-26 Thread Patrick J. Anderson
Thanks for excellent advice and suggestions posted on this list. I'm still learning Django and Python, though I decided to give it a try in one of my larger projects. I'm trying to add a few forms to my templates and I have a question about filtering some form elements, particularly in related

Yet another karma/comment question

2006-10-26 Thread [EMAIL PROTECTED]
I know it seems like there's been a lot of these lately, but it IS one of the few undocumented parts of Django. So here's my question... anyone have any idea how I could check if the current user has already voted on a comment? To clarify: I know I can get karma total, good karma total, etc., and

Re: Returning an average from a Related Field.

2006-10-26 Thread johnnnnnnn
On Tue, Oct 24, 2006 at 10:46:21PM -, Ed wrote: > What do you mean when you say that the data is not 'normalized'? I'm referring to database normalization, which boils down to: store each piece of data in only one spot. Check here: http://en.wikipedia.org/wiki/Database_normalization or Google

Re: increase size of a charfield

2006-10-26 Thread RajeshD
I agree completely with Malcolm's explanation above. You can use CSS' width and height properties on your form's input elements where you need a different size. This solution keeps your presentation layer separate from your content/model layer. For example, input.my-char-field {width: 25em;} t

Re: ado_mssql introspection patch

2006-10-26 Thread Sean De La Torre
abc123, I deleted my Django install and started from scratch. I installed the latest SVN, applied the patch, and created a new project. I still didn't see an error, so I'm thinking that the problem could be one of two things: 1. There's a problem with MSSQL 2005 2. A portion of the patch wasn'

Re: status of authentication updates?

2006-10-26 Thread [EMAIL PROTECTED]
I am in the process of deciding what to use for a site I hope will be very significant in its scope and reach. And speaking geographically, I would like to use it as the kernel of a Django community in Western Canada (where there are thousands of Python programmers, many using Plone and Zope for t

Re: OT: looking for resources on session programming

2006-10-26 Thread Darryl Caldwell
Oliver,This is a great response. Thank you. I will look at the RFC and the Wikipedia entry. From past experience, I agree with you knowing the foundation of how the system works makes for better programming. -DarrylOn 10/25/06, Oliver Lavery <[EMAIL PROTECTED]> wrote: The best way to really underst

Views Tutorials

2006-10-26 Thread [EMAIL PROTECTED]
Hi! I was wondering if anybody had any good, easy Django Views tutorials. I have tried to follow everything up on the django tutorial project site, and I understand everything else pretty well. But it's just trying to write the views is where I'm having problems. I've tried to post a c

Re: ado_mssql introspection patch

2006-10-26 Thread Sean De La Torre
No, not really. There have been other users successfully using the patch against SQL Server 2000. I haven't run into anyone using SQL Server 2005 yet, so I'm interested in seeing if this is a problem specific to that version. Sean On 10/26/06, Carlos Yoder <[EMAIL PROTECTED]> wrote: > > Looks

Re: Django & Movable Python

2006-10-26 Thread Perica Zivkovic
Busy with it! Last night I made python 2.5 with django with sqlite3 as database completed the sample tutorial from the django site and it worked! now im tweaking few things stay tuned! if you have ideas, requests, just say so! It is exactly like that unzip to the usb stick and go go go grtz

Re: ado_mssql introspection patch

2006-10-26 Thread Sean De La Torre
Carlos, This error, "Error: 'inspectdb' isn't supported for the currently selected database backend.", is usually thrown when the patch hasn't been applied correctly. Otherwise, you'd see a different error. Look at your \django\db\backends\ado_mssql\intropspection.py file. Does the logic in th

Re: increase size of a charfield

2006-10-26 Thread Malcolm Tredinnick
On Thu, 2006-10-26 at 14:38 +0200, Benedict Verheyen wrote: > Benedict Verheyen schreef: > > Hi, > > > > a have a charfield of 255 chars in a model but on the form, it > > consists of a smallish > > inputfield instead of a textarea. > > How can i increase the size of the form element? > > > > Th

Re: media files with django dev-server

2006-10-26 Thread orestis
> > (1) to use the dev server > > (2) no changes when moving to production > > (3) to have core and non-core content served out of the > > ADMIN_MEDIA_PREFIX prefix. > > 1 and 2 is true (especially 2). > 3 not ... I don´t care serving admin_media with a different prefix. > Why don't you follow my

Re: media files with django dev-server

2006-10-26 Thread patrickk
thanks everybody for the patience and the detailed answers. using --adminmedia might be a solution. I can´t check that, because on that specific server we´re on 0.95. guess I´m giving up on this issue and stay with the symlink from / django/contrib/admin/media/. still, some notes below. Am

Re: increase size of a charfield

2006-10-26 Thread Benedict Verheyen
Benedict Verheyen schreef: > Hi, > > a have a charfield of 255 chars in a model but on the form, it > consists of a smallish > inputfield instead of a textarea. > How can i increase the size of the form element? > > Thanks > Benedict The solution with changing the CharField length property work

Re: Django & Movable Python

2006-10-26 Thread Jay
Perica Zivkovic wrote: > this what I have is running from USB under windows. So people I'm > thinking to make windows version of "Django on a stick". If you bundle Python & Django, ready to unzip on a stick and use, that'd be great! Bundling a suitable database would be cool, too, although peop

Re: Django & Movable Python

2006-10-26 Thread Jay
Malcolm Tredinnick wrote: > I hadn't heard of Movable Python before, but this sounds like a solution > for people like students who may be sharing a computer lab in odd > moments (although I'm surprised that a commercial product is needed here > -- I would have thought that building an executable

Re: ado_mssql introspection patch

2006-10-26 Thread Carlos Yoder
Looks like both abc123 and myself are experiencing the same problem (at least one of them). Since I'm running MSSQL2000, wouldn't this rule out MSSQL2005 being the problem? Carlos On 10/26/06, abc123 <[EMAIL PROTECTED]> wrote: > > Sean De La Torre wrote: > > Can you post the entire traceback? I

Re: How to make tables generated by Django be utf8 encoded by default?

2006-10-26 Thread orestis
Here is a proposal: Why don't these SQL files generated by default by the django-admin.py startproject utility ? They would start empty, with just a comment: --place initial data commands here, alter tables, whatever Also, since django uses utf-8 from top to bottom, it makes sense to make utf-8

Re: Best configuration for small VPS

2006-10-26 Thread orestis
Interesting. How much memory does each apache process consume ? Have you tested this under load ? Can you post the ps aux results ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to th

Re: ado_mssql introspection patch

2006-10-26 Thread abc123
Sean De La Torre wrote: > Can you post the entire traceback? I don't see this behavior with SQL > Server 2000 or MSDE. I may have to get a copy of SQL Server 2005. I can, the full traceback is rather long: E:\test>python manage.py syncdb # Note: Any fields that are named 'id', are of type 'Aut

Re: Diamanda Wiki support and some django tutorials :)

2006-10-26 Thread [EMAIL PROTECTED]
strange... I'll look into this. --~--~-~--~~~---~--~~ 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

Re: Store uploaded image by id

2006-10-26 Thread Dirk Eschler
Am Mittwoch, 25. Oktober 2006 03:20 schrieb Malcolm Tredinnick: > On Tue, 2006-10-24 at 19:10 +0200, Dirk Eschler wrote: > > Hi, > > > > i'm trying to store an uploaded image in a directory named after its id. > > Like in this simplified example: > > > > class Project(models.Model): > > image

Re: ado_mssql introspection patch

2006-10-26 Thread Carlos Yoder
I forgot to state my config. I'm running Django in my dev box, on Windows 2000 Pro. The server is running Windows 2003 Server, located elsewhere, accessed transparently via a secure VPN thru standard port 1433. Plus, I've been trying two more things: 1. Create an empty database, create some mod

Re: Best configuration for small VPS

2006-10-26 Thread [EMAIL PROTECTED]
I have a 64mb memory and 64mb swap vps from www.redwoodvirtual.com which is working really well for me. I'm running apache2 with mod_python and postgesql. I have a subversion running inside apache2. I'm also running several python batch and online processes in the background doing their own thing.

Re: directed graph in default admin

2006-10-26 Thread Guillermo Fernandez Castellanos
Cheers, have a look at the Meta options order_with_respect_to and ordering: http://www.djangoproject.com/documentation/model_api/#order-with-respect-to Hope it helps, G On 10/24/06, John Lenton <[EMAIL PROTECTED]> wrote: > > Hi all. > I've got an app where I have a table of nodes, and a table

Re: increase size of a charfield

2006-10-26 Thread Yasushi Masuda
Benedict Verheyen wrote: > Hi, > > a have a charfield of 255 chars in a model but on the form, it > consists of a smallish > inputfield instead of a textarea. > How can i increase the size of the form element? > > Change it via a manipulator. Assume you have a model with a CharField:: class M