Re: Is there GUID available in Django or Python?

2008-12-17 Thread panta
The softwarefabrica.django.utils library includes, among other things, an UUIDField which you can use in your Django models as the primary key. In fact I'm using it for all my new projects. An example of usage: from softwarefabrica.django.utils.UUIDField import UUIDField class Wiki(models.Model

Re: ANN: Softwarefabrica Django Utils (PRE-RELEASE)

2008-12-18 Thread panta
On Dec 18, 4:33 pm, "Marco Pantaleoni" wrote: > > Binary packages are available in the Cheeseshop (PyPI): > > http://pypi.python.org/softwarefabrica.django.utils errata corrige, the correct link is: http://pypi.python.org/pypi/softwarefabrica.django.utils Marco --~--~-~--~~

Re: inlineformset_factory with a custom widget for a field

2008-12-18 Thread panta
I've never used inlineformset_factory(), but I guess you can use the formfield_callback parameter. For example: def my_formfield_cb(field): if condition_on_field(field): return SuitableFormField(widget = MyCustomWidget()) return field.formfield() FileFormSet = inlineformset_facto

Re: inlineformset_factory with a custom widget for a field

2008-12-18 Thread panta
noticing you have provided also models.py, here is a more complete answer: def my_formfield_cb(field): if isinstance(field, models.FileField) and field.name == 'file': return fields.FileField(widget = AdminFileWidget(attrs={'url': "/my/url/"})) return field.formfield() FileFormSe

Re: PDF creation!!!

2008-12-19 Thread panta
On Dec 19, 2:21 pm, Abdel Bolanos Martinez wrote: > Please can any one give me good references about tools for create PDF > reports, graphs in Django besides RepoLab > > thanks Hi Abdel, give a look at XHTML2PDF: http://www.htmltopdf.org/ See also: http://docs.djangoproject.com/en/dev/howto/o

Re: Putting tests in a tests folder

2008-12-19 Thread panta
On Dec 19, 3:32 pm, "Martin Lundberg" wrote: > Hello everyone! > > What do I need to do to be able to put my tests in a folder (called "tests") > inside my application folders and make django run them? > > I want something like: > > /project/app1/tests/module_tests.py > /project/app1/tests/module

Re: ANN: Softwarefabrica Django CRUD (PRE-RELEASE)

2008-12-19 Thread panta
On Dec 19, 4:18 pm, walterbyrd wrote: > Seems promising. Can I make a request/suggestion? Maybe you should > consider putting together a screencast, or a series of slides (I > happen to prefer slides) as a demo? Sometimes, a few graphics can be > worth a thousand words. Great idea, thanks! I'll

Re: django.newforms and AJAX

2008-03-28 Thread panta
Hi David, maybe it's something at a different level from what you are considering, but one thing I'd consider immensely useful is the ability to override the widget for ModelChoiceField (by default a ), adding buttons to open a search/edit form inside a popup (like in the admin). I don't even know

Re: newforms: required field mark

2007-10-23 Thread panta
I've done something similar for auto-generated forms (form_for_model() and form_for_instance()), by derivating a class from BaseForm and providing my own _html_output() method, which emits the label with different attributes depending on its "requiredness" (using the 'attrs' parameter to BoundFiel

Which is better: dreamhost or bluehost?

2006-05-10 Thread panta
Hi all, I'm going to setup a (small) site using django and I need to decide on a basic hosting plan. I'm considering both dreamhost and bluehost and I can't quite decide. Do you have any recommendations? Thanks in advance, Marco --~--~-~--~~~---~--~~ You received

Re: Which is better: dreamhost or bluehost?

2006-05-11 Thread panta
What's the order of magnitude for the number of simultaneous visitors to be safe? I've seen on http://wiki.dreamhost.com/index.php/Django that one is allowed to use ~50 CPU minutes per day, could it be related? Cheers, Marco --~--~-~--~~~---~--~~ You received thi