I think there really are two ways to do it, as you say.
Either use a GenericForeignKey(), or have multiple ForeignKey(null=True,
blank=True), each one pointing to a different model. I personally use the
multiple foreign keys approach, but this is the case that GenericForeignKey
was designed for
I think this should work:
Item.objects.exclude(votes__value=False).annotate(score=Count('Votes'))
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+u
Can you make your UserProfile2 a subclass of UserProfile?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to t
Reading my answer on a desktop computer, doesn't inspire me much. So I
rewrite here... Sorry for the triple post...
2014-08-16 18:59 GMT+02:00 :
>
>
> À Sat Aug 16 2014 12:04:20 GMT+0200 (CEST), ngangsia akumbo a écrit :
> > I was having an argument about learning how to code from scratch and
>
If you're serious about wanting to learn more, then the best thing you can
do is learn more about Python itself.
Until you understand Python, you won't understand the internals of Django
and it's strengths/weaknesses.
Have a look at http://learnpythonthehardway.org/ - If you are adventurous,
star
Hi all,
I have php web programming background, and new to Django. I am helping my
brother to build an online system to manage inventory, and I've got a
database design & coding problem recently. Needing help!
That is, I have a set of tables of "possible products", "inventory",
"suppiler", etc. I
À Sat Aug 16 2014 12:04:20 GMT+0200 (CEST), ngangsia akumbo a écrit :
> I was having an augment about learning how to code from scratch and using
> content management systems like joomla, dupal to build websites.
>
> This guy was telling they can make any web application using Joomla the the
>
Hello
I am not sure how much time you have been programming and what you have
learned so far. I do know however that i have not taken a real computer
science course and i did not study computer science. if i can do it
without computer science, you certainly can do it.
One thing that helped me l
Hi Mariusz,
You won't go far in learning anything if you back out at the slightest
resistance. When your code spews errors, you should attempt to find out
what exactly caused the errors.
That said, Django is just pure python. Nothing special and magical about
it.
My advice, anytime you hit such s
À Sat Aug 16 2014 12:04:20 GMT+0200 (CEST), ngangsia akumbo a écrit :
> I was having an augment about learning how to code from scratch and using
> content management systems like joomla, dupal to build websites.
>
> This guy was telling they can make any web application using Joomla the the
>
Hi guys. If I seem like a spoilt brat or sth in this post then maybe I am,
let me know.
I'm completely new to programming. I completed Python tutorial on
codecademy and completed about 20 'assignments' on CheckiO, but I wanted to
actually implement what I'd learned to a larger project like a web
I have this problem,
i am working in an app that uses django-allauth for login with facebook.
When i ask for login i need to ask for publish_stream scope.
In local environment this work great.
In production does not.
Does anyone have a clue?
here my settings/base.py
SOCIALACCOUNT_PROVIDERS = {
>
I am getting the "standard" CircularDependencyError (Django 1.7c2 with
migrations) with ManyToManyFields and a custom user.
from django.db import models
from member.models import Member
from company.models import Company
class Affiliation( models.Model ):
member = models.ForeignKey( Member )
Most cms' of that ilk fits a very specific set of needs. Once you need to move
outside the mould they give you and need to customise it for a specific
business requirement, without some level of understanding of coding and the
chosen cms' underpinnings he'll find it very difficult to proceed any
Go to the joomla site and see what you think.
Bob gailer
On Aug 16, 2014 6:05 AM, "ngangsia akumbo" wrote:
> I was having an augment about learning how to code from scratch and using
> content management systems like joomla, dupal to build websites.
>
> This guy was telling they can make any web
prefetch_related() works great.
How about prefetching some computed value instead of records?
{% for item in items %}
{{ item.name }}
{{ item.score }}
{% endfor %}
I want to prefetch 'score' for every item, where 'score' would be
equivalent to:
score = Votes.objects.all().count() -
I was having an augment about learning how to code from scratch and using
content management systems like joomla, dupal to build websites.
This guy was telling they can make any web application using Joomla the the
other cms out there.
He does not need to learn coding.
so if that was possible wh
17 matches
Mail list logo