form? Or how you would refactor that? Thanks in advance!
Kind regards, Roald
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/Y-SyKhGnnLI
On 20 feb, 00:03, Reinout van Rees <rein...@vanrees.org> wrote:
> On 19-02-12 14:16, dummyman dummyman wrote:
>
> The solution is simple: just add a {{ csrf_token }} somewhere in your
> form. That ought to do it.
A typo there, Reinout ;-). You meant:
{% csrf_token %}
Chee
?
Hi Visgean,
I think you want inline formsets: https://docs.djangoproject.com/en/dev/topics/forms/modelforms/
#inline-formsets
Cheers, Roald
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-user
_set.update(bool_field=True)
Cheers, Roald
--
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
django-users+unsubscr...@goog
rguments '()' and
keyword arguments '{}' not found.
Cheers, Roald
--
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
django
-data-with-a-formset
Cheers, Roald
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com
; import sys
>>> file = sys.stdin
Option 2: read command line arguments
>>> import sys
>>> file = open(sys.argv[1])
Cheers, Roald
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email
tings/
#std:setting-TEMPLATE_CONTEXT_PROCESSORS?
Cheers, Roald
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send e
On Aug 11, 2010, at 7:25 PM, refreegrata wrote:
My code
--
class Format(models.Model):
name = models.CharField(max_length=5, unique=True)
myBoolean = models.BooleanField(default=False)
class FormFormat(forms.ModelForm):
boolean1 =
creation:
def __init__(self, *args, **kwargs):
super(MyForm, self).__init__(*args, **kwargs)
# If you want an other widget:
# self.fields['name'].widget =
forms.TextInput(attrs={something...})
self.fields['name'].widget.attrs['something'] = ...
Cheers, Roald
--
Yo
the django DRY principles.
Personally, I like all of my forms to be classes. If you want that,
you should create a context processor.
http://docs.djangoproject.com/en/dev/ref/templates/api/#writing-your-own-context-processors
Cheers, Roald
--
You received this message because you are subscribed
, and
therefore be saved in the database. If I create a personupdate using
PersonUpdate.objects.create or ~.get_or_create, I don't mind saving
the object, but I don't want to call 'self.save()' in
PersonUpdate.__init__. How should I handle this?
Cheers, Roald
--
You received this message because you
On Aug 5, 2010, at 3:15 PM, Roald de Vries wrote:
On Aug 5, 2010, at 3:00 PM, Emily Rodgers wrote:
On Aug 5, 1:50 pm, Roald de Vries <downa...@gmail.com> wrote:
Dear all,
I have the following error, and don't know what it means:
Error: One or more models did not va
On Aug 5, 2010, at 3:00 PM, Emily Rodgers wrote:
On Aug 5, 1:50 pm, Roald de Vries <downa...@gmail.com> wrote:
Dear all,
I have the following error, and don't know what it means:
Error: One or more models did not validate:
update.personupdate: 'address' has a relation with
the problems started when
I separated my Person class into an abstract base class PersonProfile
and a derived class Person, and added the class PersonUpdate, deriving
from PersonProfile too.
Can anybody help?
Thanks in advance, cheers,
Roald
--
You received this message because you are subscribed
n [lst[start:start+5] for start in range(0, len(lst), 5)]
Cheers, Roald
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
djang
e querying the Projects, you can not use Favourite fields
as keywords. So you'll (more or less) have to stick with the other
option.
Cheers, Roald
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, sen
On Jul 28, 2010, at 5:19 PM, kostia wrote:
Thank you very much Roald,
What is faster:
projects = Project.objects.filter(favourites__user = request.user)
or
select_related('project')
?
I think it doesn't matter much, but if one is faster, it should be the
first one. If you only use
oject')" if performance is an
issue for you.
Cheers, Roald
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
d
s, VIM doesn't leave
you with a crippled little finger (from all the 's)
- VIM has more commands than Emacs
I would say Emacs makes you more productive on shorter term, VIM makes
you more productive on longer term.
Cheers, Roald
--
You received this message because you are subscribed to the
snippet to django-dev and
django-snippets in a few weeks.
Kind regards,
Roald
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email
On Mar 31, 2010, at 9:12 AM, Eximius wrote:
Please help me out
On Mar 29, 11:04 pm, Eximius wrote:
Hi all,
I have created a django application using app engine sdk, and have
stored data in database using forms. But the problem i am getting
when
i deploy it, the
On Mar 11, 2010, at 11:56 AM, pyt...@roalddevries.nl wrote:
I have the following model:
1 class MyOrderItem(models.Model):
2 orderitem = models.ForeignKey(OrderItem, null=True,
blank=True)
3 # other fields
4
5 def save(self, *args, **kwargs):
6
23 matches
Mail list logo