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
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
--~--~-~--~~
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
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
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
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
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
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
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
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
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
11 matches
Mail list logo