Hi all,
In order to teach myself Django I am creating a simple film database
project. My search code looks like this:
results = Film.objects.filter(
Q(title__icontains=q) |
Q(director__name__icontains=q) |
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi all,
My app has a page where you can enter new data into the database through
a form. All is working well, except that some of the fields require a
choice from a drop down menu. If the choice for these fields the user
wants is not already in the
On 23 Aug 2013, at 16:58, Daviddd wrote:
> In my template I tried:
>
> {% for key, groups in queryset.iteritems %}
> groups = {{ groups }}
> {% for group_key, cols in groups.iteritems %}
> cols = {{ group_key }}
> {% for objs in cols %}
> {# rest of the code #}
>
On 24 Aug 2013, at 16:02, Oleg Gorjajnov wrote:
> And this is not my case.
>
> So what's wrong with that? It must work well without meta classes.
>
Do you get any problems when you do manage.py runserver or syncdb? I think your
problem stems from trying to build within Sublime Text.
--
Yo
On Saturday, 24 August 2013, Brian Lee wrote:
> So, my website, involving lots of database calls, works perfectly fine,
> even after a reboot.
>
> However, attempting to connect directly via dbshell results in this error:
> $ ./manage.py dbshell
> mysql: unknown variable 'character-set-server=utf
On Sunday, 25 August 2013, Brian Lee wrote:
> [client]
> 20 port= 3306
> 21 socket = /var/run/mysqld/mysqld.sock
> 22
> 23 # Here is entries for some specific programs
> 24 # The following values assume you have at least 32M ram
> 25
> 26 # This was formally known as [safe_mysq
You're creating an entirely new DecimalField, rather than altering the error
messages of your existing field.
I think what you want is:
class YourForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(YourForm, self).__init__(*args, **kwargs)
self.fields["amount"
On Monday, 26 August 2013, Daviddd wrote:
> Sincerely, I don't know how I can create the dict without using
> defaultdict.
>
> D
>
You can create it using a defaultdict if you want to, but once it is
created, and before you pass it to the template, loop through all the
values of your outer dict a
8 matches
Mail list logo