Django versions

2006-02-24 Thread Michal
Hello, I would like start with Django, but I don't know which version I should to download: - stable 0.91? - latest development from trunk? - magic-removal branch? Thank you for any advice. Regards Michal --~--~-~--~~~---~--~~ You received this message because y

Re: Django versions

2006-02-24 Thread Ijonas Kisselbach
The latest development branch works utterly fine for me. I update from it maybe once a day and haven't run into any problems yet (touch wood).AFAIK: magic-removal is changing all the time. Lots of refactoring. So if you're just starting out, I'd recommend the "trunk". Ij.On 2/24/06, Michal <[EMAIL

Re: django problem at dreamhost

2006-02-24 Thread Spider
Derek, what Linux distribution are your running at rimuhosting.com? I'm about to sign up with them myself. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Re: django problem at dreamhost

2006-02-24 Thread [EMAIL PROTECTED]
I'm on Debian, but that's because I have another couple of Debian servers already. It's very good, but the stable release won't have the latest versions of newer software. I use a stable release, then added other software manually, eg lighttpd. That caused a few version conflicts with APT (the pa

Re: Get list by Foreign Key when using generic views

2006-02-24 Thread [EMAIL PROTECTED]
Ok, I see. I used the Many-to-One relationship though from the Statement model and changed it to Many-to-Many instead creating an attribute in Account model instead. Now I can get the statements via the account object in my template. Thanks Luke for your help. -Alen --~--~-~--~~--

RemovingTheMagic doc suggestions

2006-02-24 Thread [EMAIL PROTECTED]
I just moved my first project to the magic-removal branch, so want to suggest a couple of updates to the wiki page http://code.djangoproject.com/wiki/RemovingTheMagic. The project used the old default structure: project/apps/app1/models/app1.py First off, the new default structure doesn't use an

Re: Django versions

2006-02-24 Thread Kenneth Gonsalves
On Friday 24 Feb 2006 1:40 pm, Michal wrote: > - latest development from trunk? this one -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க! --~--~-~--~~~---~--~~ You received this message because you are subsc

manage.py vs. django-admin.py

2006-02-24 Thread tomass
Hi Folks, I have /usr/local/lib/python2.4/site-packages in my sys.path. I've added a symlink from my project directory (/home/mthaddon/jmon_code/jobmonitor) to /usr/local/lib/python2.4/site-packages/jobmonitor and in this folder I have the settings.py, manage.py and urls.py as well as my app dire

Template IF statement with <,>,<=,>= (or equvalent)

2006-02-24 Thread [EMAIL PROTECTED]
Django Template engine seems to be very strate forward yet powerful, however I can't for the life of me figure out how to check if variable1 is greater then or smaller then variable2. Did a search on this group and looked at the templates doc and still can't figure it out. :-) It is a Friday in

Re: Django versions

2006-02-24 Thread ChaosKCW
Its a trade off, I chose the magic removal branch, because the syntactical changes really appeal to me. The models are a lot cleaner and DB API too. However it does have problems. And when 0.92 comes out you will have to change to the new syntax anyways. So if your starting from scratch like me,

Re: RemovingTheMagic doc suggestions

2006-02-24 Thread [EMAIL PROTECTED]
meant to add this for the table of old/new syntax under 'Descriptor fields'- there's no example showing 'limit', so how about old: reporters.get_list(fname__exact = 'John', limit = 5) new: Reporter.objects.filter(fname = 'John')[0:5] Derek --~--~-~--~~~---~--~~

Re: Accessing a session within template context processors

2006-02-24 Thread olive
Hi Ross, this is the way (simplified) I do with a generic view: Url: (r'^app/$', 'project.app.views.index'), View: --- from django.views.generic import list_detail def index(request): return list_detail.object_list(request, 'app', 'module', extra_context = {"region": request.s

Admin interface table detail showing incorrect number of entries

2006-02-24 Thread va:patrick.kranzlmueller
i´m having the problem described here: http://code.djangoproject.com/ticket/480 1. wrong numbers are displayed 2. it´s not possible to use the foreign keys for sorting - Exception Value: (1054, "Unknown column 'films.-id' in 'order clause'") any suggestions? thanks, patrick --~--~-~--

Re: Multi-page forms

2006-02-24 Thread Andrew Gwozdziewycz
On Feb 23, 2006, at 8:12 AM, Jason F. McBrayer wrote: > > "Chetan Vaity" <[EMAIL PROTECTED]> writes: > >> I want to build a two-page form for creating an object. As I see >> it there are two options: >> 1. Store values in hidden fields >> 2. Use the session to store the variables from the firs

Two Fields; One Required

2006-02-24 Thread [EMAIL PROTECTED]
I am designing a model that has a contact_phone and a contact_email. They MUST fill out one of these fields. How do I go about implementing that logic? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djang

Admin interface table detail showing incorrect number of entries

2006-02-24 Thread va:patrick.kranzlmueller
(sorry, i´ve accidentally replied to one of the previous messages) i´m having the problem described here: http://code.djangoproject.com/ticket/480 1. wrong numbers are displayed 2. it´s not possible to use the foreign keys for sorting - Exception Value: (1054, "Unknown column 'films.-id' in 'ord

edit_inline & raw_id_admin

2006-02-24 Thread va:patrick.kranzlmueller
i have 2 tables, films and stars, each with lots of entries (>1). each film has a list of cast-members which relate to the table stars. i´m trying to do that relation using M2M with an intermediary table to add a job for every star (like actor, director, camera ...). class Cast(meta.Model)

Re: edit_inline & raw_id_admin

2006-02-24 Thread va:patrick.kranzlmueller
first think, then write -> problem solved! Am 24.02.2006 um 15:37 schrieb va:patrick.kranzlmueller: > > i have 2 tables, films and stars, each with lots of entries (>1). > each film has a list of cast-members which relate to the table stars. > > i´m trying to do that relation using M2M with

Re: ManyToMany and Admin Interface

2006-02-24 Thread Philippe Mironov
[EMAIL PROTECTED] a écrit : >The following model was taken from : >http://www.djangoproject.com/documentation/models/many_to_many/ > >** >from django.core import meta > >class Publication(meta.Model): >title = meta.CharField(maxlength=30) > >def __repr__(se

Re: ManyToMany and Admin Interface

2006-02-24 Thread va:patrick.kranzlmueller
hmm, what about using "edit_inline" like: class Article(meta.Model): headline = meta.CharField(maxlength=100) publications = meta.ManyToManyField(Publication, edit_inline=meta.TABULAR) i didn't try that btw. patrick Am 24.02.2006 um 16:14 schrieb Philippe Mironov: > > [EMAI

order_with_respect_to

2006-02-24 Thread va:patrick.kranzlmueller
i´m having the following model which gives me an error when trying to save something: class Filmstarts(meta.Model): id = meta.AutoField('ID', primary_key=True) film = meta.ForeignKey(Film, raw_id_admin=True) class META: order_with_respect_to = "film" admin = met

Re: order_with_respect_to

2006-02-24 Thread Amit Upadhyay
On 2/24/06, va:patrick.kranzlmueller <[EMAIL PROTECTED]> wrote: class Filmstarts(meta.Model): id = meta.AutoField('ID', primary_key=True)Why are you doing this? Every model has a file named `id` if you do not specify any primary_key. If there is no strong reason to do it, consider removing this

Re: order_with_respect_to

2006-02-24 Thread va:patrick.kranzlmueller
good point.i´d still appreciate some help with my initial question though.thanks,patrickAm 24.02.2006 um 17:10 schrieb Amit Upadhyay:On 2/24/06, va:patrick.kranzlmueller <[EMAIL PROTECTED]> wrote: class Filmstarts(meta.Model): id = meta.AutoField('ID', primary_key=True)Why are you doing this? E

Re: order_with_respect_to

2006-02-24 Thread Amit Upadhyay
Hi Patrick,good point.i´d still appreciate some help with my initial question though. Can you please post the exact error that you are getting? -- Amit UpadhyayBlog: http://www.rootshell.be/~upadhyay +91-9867-359-701 --~--~-~--~~~---~--~~ You received this message be

Re: order_with_respect_to

2006-02-24 Thread patrick k
Title: Re: order_with_respect_to here it is (i´m not sure if you need all of this ...): Traceback (most recent call last):   File "/usr/lib/python2.3/site-packages/Django-0.91-py2.3.egg/django/core/servers/basehttp.py", line 272, in run self.result = application(self.environ, self.start_re

Re: order_with_respect_to

2006-02-24 Thread Amit Upadhyay
On 2/24/06, patrick k <[EMAIL PROTECTED]> wrote: here it is (i´m not sure if you need all of this ...): TemplateSyntaxError: Caught an exception while rendering.This is a template syntax error, you can put a TEMPLATE_DEBUG=True in your settings file and restart server to help you find about

Re: order_with_respect_to

2006-02-24 Thread patrick k
Title: Re: order_with_respect_to did that. exactly the same error. On 2/24/06, patrick k <[EMAIL PROTECTED]> wrote: here it is (i´m not sure if you need all of this ...): TemplateSyntaxError: Caught an exception while rendering. This is a template syntax error, you can  put a TEMPLATE_DEBUG=T

Re: order_with_respect_to

2006-02-24 Thread Amit Upadhyay
On 2/24/06, patrick k <[EMAIL PROTECTED]> wrote: did that. exactly the same error.Enabling template debugging won't solve your problem, it will just help you pin point it. The errors should be the same, but the output should also include some template code, with a few line in red, post those l

Re: Two Fields; One Required

2006-02-24 Thread nesh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: > I am designing a model that has a contact_phone and a contact_email. > They MUST fill out one of these fields. How do I go about implementing > that logic? Use RequiredIfOtherFieldNotGiven from validators.py as a validator

Re: order_with_respect_to

2006-02-24 Thread patrick k
Title: Re: order_with_respect_to sorry for didn´t making myself clear. "exactly the same error message" - that´s what i wanted to say. nevertheless, i tried to use TEMPLATE_DEBUG=False and got the following error: (1064, "You have an error in your SQL syntax. Check the manual that corresponds

Re: order_with_respect_to

2006-02-24 Thread nesh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Amit Upadhyay wrote: > On 2/24/06, *patrick k* <[EMAIL PROTECTED] > > wrote: > > here it is (i´m not sure if you need all of this ...): > > TemplateSyntaxError: Caught an exception while rendering. > > > This

Re: order_with_respect_to

2006-02-24 Thread patrick k
> Not! This will happen when a exception is thrown from some code in template > rendering, you must put > *TEMPLATE_DEBUG=False* to get actual error. did that - see previous posting > > Also post result of django-admin.py sql for Filmstarts table. CREATE TABLE `skip_filmstarts_a` ( `id` m

Re: Multi-page forms

2006-02-24 Thread Jason F. McBrayer
Andrew Gwozdziewycz <[EMAIL PROTECTED]> writes: > Why not just store the values in the database after each pages > submission? That's a point. I hadn't observed that it was a multi-page form for creating an object --- I was looking at the general case of multi-page actions where you are not ne

Re: Multi-page forms

2006-02-24 Thread Eric Walstad
On Friday 24 February 2006 10:56, Jason F. McBrayer wrote: > Andrew Gwozdziewycz <[EMAIL PROTECTED]> writes: > > Why not just store the values in the database after each pages > > submission? > > That's a point. I hadn't observed that it was a multi-page form for > creating an object --- I was lo

Re: order_with_respect_to

2006-02-24 Thread nesh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 patrick k wrote: > query is: > > 'INSERT INTO `skip_filmstarts_a` (`film_id`,`_order`) VALUES (%s,(SELECT > COUNT(*) FROM `skip_filmstarts_a` WHERE `film_id` = %s))' No luck, django.core.meta.__init_py:1020 # TODO: This assumes the database support

Re: order_with_respect_to

2006-02-24 Thread patrick k
i´m using 4.0.18 (well, my hosting company does). besides that, i don´t really understand the query. it is "SELECT COUNT(*) FROM `skip_filmstarts_a` WHERE `film_id` = '778". the film_id i have entered is "7786". patrick > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > patrick k wrote:

Re: order_with_respect_to

2006-02-24 Thread nesh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 patrick k wrote: > i´m using 4.0.18 (well, my hosting company does). > > besides that, i don´t really understand the query. > it is "SELECT COUNT(*) FROM `skip_filmstarts_a` WHERE `film_id` = '778". > the film_id i have entered is "7786". Probably l

Re: order_with_respect_to

2006-02-24 Thread patrick k
i´m trying to implement an up/down-list with dom-drag ... so, i think i´ll ask my hosting company to upgrade mysql. nesh & amit: thanks for your help. patrick > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > patrick k wrote: >> i´m using 4.0.18 (well, my hosting company does). >> >>

Re: django problem at dreamhost

2006-02-24 Thread MC
I too have had issues with dreamhost concerning core files and performance. Every week I'll find a build up of 4-5 core.* dumped files. And most of the time my site gutata.com performs very slowly on gower.dreamhost.com. Granted I'm using the cheapest package and perhaps I have a slow implementati

Re: manage.py vs. django-admin.py

2006-02-24 Thread Kirk McDonald
tomass wrote: > Hi Folks, > > I have /usr/local/lib/python2.4/site-packages in my sys.path. I've > added a symlink from my project directory > (/home/mthaddon/jmon_code/jobmonitor) to > /usr/local/lib/python2.4/site-packages/jobmonitor and in this folder I > have the settings.py, manage.py and ur

code mod to get raw admin template output

2006-02-24 Thread hsitz
Back in middle of last year Adrian Holovaty posted some very helpful information on how to get the raw output of admin templates for use as basis for your own views. I'm a newbie trying to get my head around Django, and it seems the code has been refactored since then. Is it a simple matter to r

Re: Django versions

2006-02-24 Thread oggie rob
> - latest development from trunk? If you plan to deploy anytime in the next month or two (yes, this is a real possibility with Django!), you should start with trunk but settle on a revision before you get too far into the project. I wouldn't recommend updating from trunk once you've deployed unt

Re: edit_inline & raw_id_admin

2006-02-24 Thread Malcolm Tredinnick
On Fri, 2006-02-24 at 15:43 +0100, va:patrick.kranzlmueller wrote: > first think, then write -> problem solved! Since you are unlikely to be the only person to ever come across this problem, how about posting your solution to the list so that it shows up in a search of the archives? Thanks, Malc

Re: Django versions

2006-02-24 Thread Adrian Holovaty
On 2/24/06, Michal <[EMAIL PROTECTED]> wrote: > Hello, > I would like start with Django, but I don't know which version I should > to download: > - stable 0.91? > - latest development from trunk? > - magic-removal branch? Go with the latest trunk development -- it's the most stable and has the la