Re: Django models question

2006-06-02 Thread Guillermo Fernandez Castellanos
I'm a beginner, but I would do like this: class Reservation(models.Model): properties=model.CharField(maxlength=7,primary_key=True) class Restaurant(models.Model): name=models.CharField(maxlength=30,primary_key=True) reservations=models.ForeignKey(Reservation) class Theater(models.M

Re: Rich Text Editor for BBCOde?

2006-06-02 Thread Jeroen Ruigrok van der Werven
On 6/1/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Does anyone know of a "fancy" rich text editor component which > generates BBCode instead of HTML (or is customizable so that it can be > tailored to generate BBCode)? Maybe even one for which there is a > Django integration "Howto"? No, s

Re: A little help with a filter

2006-06-02 Thread Chris Moffitt
A perfect explanation > > s1 = set([obj.id for obj in > item1.sub_item_set.filter(options__name__exact="Small")]) > s2 = set([obj.id for obj in > item1.sub_item_set.filter(options__name__exact="Blue")]) > > smallAndBlueIDs = s1.intersection(s2) > smallAndBlueSubItems = Sub_Item.objects.in_bulk(lis

installing docutils on Dreamhost

2006-06-02 Thread Rémi
Hello Sorry for the newbie question, but has anyone installed docutils on Dreamhost? I tried this: (using http://docutils.sourceforge.net/docs/dev/policies.html) - I'm on my /home/user directory - svn checkout svn://svn.berlios.de/docutils/trunk/docutils - I edit .bash_profile to umask 0

Re: update_object and preserving fields

2006-06-02 Thread Marcin Kaszynski
Michael Radziej <[EMAIL PROTECTED]> writes: > I've followed your discussion only in parts. But I usually handle > everything that is outside of the scope of the normal generic views > inside the manipulator, and I have patched some generic views so > that they accept a manipulator instance as add

Re: Tutorial Repo

2006-06-02 Thread lcaamano
Adrian Holovaty wrote: > On 5/31/06, Noah <[EMAIL PROTECTED]> wrote: > > I think it would be really good if there were a list of links or > > something as a tutorial repo on the main site. Also the main tutorial > > I've found isn't that useful or in-depth. It's not bad but left me > > wanting mo

Re: Admin password field

2006-06-02 Thread [EMAIL PROTECTED]
One solution would be to provide site admin the value for a known generic password. When a new user is created, they get this generic password, then are asked to change it when they log in. But, I agree, you would think the password field in admin could be smart enough to use the set_password() fu

Re: update_object and preserving fields

2006-06-02 Thread Michael Radziej
Hi Marcin, Marcin Kaszynski wrote: > The update_object view does, this: > > new_data = request.POST.copy() > errors = manipulator.get_validation_errors(new_data) > manipulator.do_html2python(new_data) > if not errors: > object = manipulator.save(new_data) > > The way I see it, new

Re: update_object and preserving fields

2006-06-02 Thread Marcin Kaszynski
Michael Radziej <[EMAIL PROTECTED]> writes: > If only the Manipulator would use its follow attribute to decide > which fields need to be validated. This way you would get only partial validation that would break stuff like ValidateIfOtherFieldEquals. > Or the if the generic view and manipulator

Re: update_object and preserving fields

2006-06-02 Thread Michael Radziej
Marcin Kaszynski wrote: > Michael Radziej <[EMAIL PROTECTED]> writes: >> Or the if the generic view and manipulators provided a way for a >> clean prepopulate. > > This is exactly what I have in mind. > > I also thought about adding another parameter to generic views that > would let you pass a

Good VPS and/or django hosting?

2006-06-02 Thread mamcxyz
Somebody have experience with a good VPS hosting provider? Or with the django hosting providers? Like I say in a thread before, I have experience in running under Win2003 hosting, but the lack of good support of python for IIS push me to look for other option.. I'm looking for something that le

Re: Good VPS and/or django hosting?

2006-06-02 Thread Jeremy Dunck
On 6/2/06, mamcxyz <[EMAIL PROTECTED]> wrote: > > Somebody have experience with a good VPS hosting provider? > > Or with the django hosting providers? I haven't hosted specifically for Django, but there's a list here: http://code.djangoproject.com/wiki/DjangoFriendlyWebHosts Gypsy is run by Jaco

Re: Good VPS and/or django hosting?

2006-06-02 Thread Derek Hoy
On 6/2/06, mamcxyz <[EMAIL PROTECTED]> wrote: > > Somebody have experience with a good VPS hosting provider? rimuhosting.com excellent responsive support. -- Derek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Rich Text Editor for BBCOde?

2006-06-02 Thread Joseph Heck
It's not a full implementation, but it's pretty useful:http://svn.zilbo.com/svn/django/magic-removal/common/text/bbcode.pyer... it's moved since I last pulled it: http://svn.zyons.python-hosting.com/trunk/zilbo/common/text/bbcode.py(please note this isn't mine - it's just something I spotted while

Re: Good VPS and/or django hosting?

2006-06-02 Thread Jeremy Dunck
On 6/2/06, Derek Hoy <[EMAIL PROTECTED]> wrote: > > On 6/2/06, mamcxyz <[EMAIL PROTECTED]> wrote: > > > > Somebody have experience with a good VPS hosting provider? > > rimuhosting.com > > excellent responsive support. I use rimu as well and am happy with it. I just don't run django on it (yet).

Re: Good VPS and/or django hosting?

2006-06-02 Thread Derek Hoy
On 6/2/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > I use rimu as well and am happy with it. I just don't run django on > it (yet). I've been with them for over a year- big advantage of a VPS setup- when django came along, I could just install it. I use the Debian setup, because I already ha

Re: installing docutils on Dreamhost

2006-06-02 Thread [EMAIL PROTECTED]
I have installed docutils 0.4 for use with my dreamhosted Django sites. I did not edit the .bash_profile like you. Instead I ran "setup.py install --prefix $HOME" which created the bin and lib dir right in $HOME. Then in my django.fcgi file I added $HOME/lib/python2.3/site-packages/ to the PYTH

Re: Small error with debug magi-removal with Komodo

2006-06-02 Thread mamcxyz
Hey, thanks to point me to the obvious.. Nothing like silently kill a exception ;) --~--~-~--~~~---~--~~ 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@googlegroup

Re: installing docutils on Dreamhost

2006-06-02 Thread Waylan Limberg
On 6/2/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I have installed docutils 0.4 for use with my dreamhosted Django sites. > > I did not edit the .bash_profile like you. Instead I ran "setup.py > install --prefix $HOME" which created the bin and lib dir right in > $HOME. Then in my djan

Re: installing docutils on Dreamhost

2006-06-02 Thread Rémi
On 2 Jun 2006, at 18:31, [EMAIL PROTECTED] wrote: > I did not edit the .bash_profile like you. Instead I ran "setup.py > install --prefix $HOME" which created the bin and lib dir right in > $HOME. Then in my django.fcgi file I added > $HOME/lib/python2.3/site-packages/ to the PYTHONPATH like th

Using AJAX to deal with slow views

2006-06-02 Thread Jay Parlar
The main view of my internal web app is a form with an upload field, and when the user uploads a file, my server-side processing takes about 15 seconds to complete (I generate and then compile some stuff based on the file they upload, and return the compiled result) >From the user's POV, it just

Re: Using AJAX to deal with slow views

2006-06-02 Thread spacedman
Jay Parlar wrote: > The thing is, I'm not sure how to fit that into Django. Currently, my > view function just blocks on the generation/compilation. To do this > with AJAX, it feels like I'd have to spawn a thread from Django to do > the processing, and let the view return immediately. But when

Re: update_object and preserving fields

2006-06-02 Thread Adrian Holovaty
On 6/2/06, Michael Radziej <[EMAIL PROTECTED]> wrote: > If Adrian/Jacob/Luke/etc. is listening: Would you accept patches that provide > docstrings for > classes and methods within the Django internals? It would help a lot in > understanding > what's happening in the Django machinery. Yes, defin

Re: close connections and restart django?

2006-06-02 Thread Adrian Holovaty
On 5/29/06, shaunc <[EMAIL PROTECTED]> wrote: > I can do all the steps individually, but deleting the database requires > closing the db connection. Can I get django to cleanup and close its > connections in a way that will allow me to start it up again? Yeah, just do this: from django.db import

Re: Using AJAX to deal with slow views

2006-06-02 Thread Jay Parlar
On 6/2/06, spacedman <[EMAIL PROTECTED]> wrote: > > > Jay Parlar wrote: > > > The thing is, I'm not sure how to fit that into Django. Currently, my > > view function just blocks on the generation/compilation. To do this > > with AJAX, it feels like I'd have to spawn a thread from Django to do > >

Re: Using AJAX to deal with slow views

2006-06-02 Thread Waylan Limberg
I have two thoughts on how you could do this. 1) You could just have some client side javascript which displays a progress bar that just guesses but never gets any feedback from the server. Any unexpected jump at the end makes it look like it took less time than expected. Works great as long as t

Using Pyscripter with Django

2006-06-02 Thread Filipe
Hi Is anyone using PyScripter (http://mmm-experts.com/Products.aspx?ProductId=4) as an IDE for working with Django? I find it very good for python, but haven't been able to use it to debug code in my django webapp. I got pydev running django built-in webserver as an "external tool" but the breakp

How know if I'm running under django or stand-alone? (newbie python question)

2006-06-02 Thread mamcxyz
I almost finish my unit testing setup, but exist something I'm missing. For example, when I run F5 from Komodo under a .py file under django, this complain about not have the settings configured. That is fine.. However, I like to run any .py of django like is possible of normal .py files. Becau

Re: update_object and preserving fields

2006-06-02 Thread Marcin Kaszynski
"Honza Král" <[EMAIL PROTECTED]> writes: > You can also try and have a look on the follow parametr of > manipulators, note that the generic views do pass this parameter on > from their kwargs... Cool, I did not know about this parameter until now. It looks like it will solve some of my problems

Re: FileField with custom upload_to

2006-06-02 Thread medhat
Jay Parlar wrote: > I went ahead and filed a patch with Trac, > http://code.djangoproject.com/ticket/1994 > > Jay P. I like this solution... actually, I was trying to achieve something similar and came up with an almost identical solution. So, I am +1 for this patch. -- Thanks, Medhat --~--~

Re: Good VPS and/or django hosting?

2006-06-02 Thread mamcxyz
Ok... I chek your suggestion and look good... Somebody use a Windows based hosting VPS? I'm a little nervous about jump with a full linux stack... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gr

Saving an object

2006-06-02 Thread Chris Moffitt
It's my understanding that primary keys get created when an object is saved. I also presume that any relationships defined via manytomany would only be "available" after an object has been saved. Is this true? The reason I'm asking is that I'm trying to do some validation work before saving

Ajax support, there is no need for reinventing the wheel

2006-06-02 Thread Jaroslaw Zabiello
I have heard that in Django 0.92 we will have added Ajax. We are having 0.95 now (svn) and still nothing was added. :( Why? The idea is simple. Ajax is pain in ass if we would like to use only pure JavaScript. So we need good helpers fo more comfortable work. For me Rails has very cool Ajax supp

Re: how to use instance method in the validator_list of a field in model?

2006-06-02 Thread favo
I got a way to do these, however a little magic because the logic in django.db.models.manipulators.ManipulatorDescriptor.__get__ : ... bases = [self.base] if hasattr(model, 'Manipulator'): # here we have a chance to add something to the auto-manipulator. bases

Re: Ajax support, there is no need for reinventing the wheel

2006-06-02 Thread Matt McDonald
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jaroslaw Zabiello wrote: > I have heard that in Django 0.92 we will have added Ajax. We are having > 0.95 now (svn) and still nothing was added. :( > > Why? The idea is simple. Ajax is pain in ass if we would like to use > only pure JavaScript. So we

Re: Ajax support, there is no need for reinventing the wheel

2006-06-02 Thread Malcolm Tredinnick
On Sat, 2006-06-03 at 02:29 +, Jaroslaw Zabiello wrote: > I have heard that in Django 0.92 we will have added Ajax. We are having > 0.95 now (svn) and still nothing was added. :( > > Why? The idea is simple. Ajax is pain in ass if we would like to use > only pure JavaScript. So we need good h

Re: Ajax support, there is no need for reinventing the wheel

2006-06-02 Thread Bjørn Stabell
Ajax, in the form of Dojo, was slated to be added to the admin interface, and it totally makes sense there in order to provide a better user interface as compared to standard HTML widgets. I'm not sure why it still isn't merged in, though. I think it would totally kick ass :) --~--~-~-