Re: M2M: How to order by a field from the `through` table?

2016-02-17 Thread 'Brutus Schraiber' via Django users
Am Dienstag, 16. Februar 2016 10:00:43 UTC+1 schrieb Brutus Schraiber: > > Any hints on how to archive this (prefetch + ordering on `trough` table)? > Prefetch( 'notes', Note.objects.order_by('pinboard_pins__position'), ) -- You received this message beca

M2M: How to order by a field from the `through` table?

2016-02-16 Thread 'Brutus Schraiber' via Django users
Hi all… I can't come up with a syntax to order by a field of the `trough` table in a many to many relationship and how to combine it with `prefetch_related`. I have two models — _Note_ and _Pinboard_ — with a many to many relationship. Those two models are related trough another model — _Pin_

Re: How to view the generated SQL for test models?

2016-01-20 Thread Brutus Schraiber
Hi Michal, # The `ProgrammingError` Exception Am 18.01.2016 um 20:23 schrieb Michal Petrucha: > Could you perhaps post the full traceback of the ProgrammingError? The original exception was (full traceback at the end of the mail): ``` django.db.utils.ProgrammingError: (1064, "You have an error

Re: How to view the generated SQL for test models?

2016-01-18 Thread Brutus Schraiber
Am Samstag, 16. Januar 2016 22:23:06 UTC+1 schrieb Vijay Khemlani: > > At least to me it doesn't make a lot of sense to define new models in your > tests, but I also don't know the particular problem you are solving. > I have an app, that defines a couple of *abstract models* and *mixins* in it'

Re: How to view the generated SQL for test models?

2016-01-18 Thread Brutus Schraiber
Am Samstag, 16. Januar 2016 22:23:06 UTC+1 schrieb Vijay Khemlani: > > At least to me it doesn't make a lot of sense to define new models in your > tests, but I also don't know the particular problem you are solving. > I have an app, that defines a couple of *abstract models* and *mixins* in it'

Re: How to view the generated SQL for test models?

2016-01-16 Thread Brutus Schraiber
Wrong place to ask such things? This doesn't seem too uncommon or complicated, or am I missing the point? Am Montag, 11. Januar 2016 16:06:22 UTC+1 schrieb Brutus Schraiber: > > Hi all… > > I have some models in a `test.py` file. How can I view the SQL that will > b

How to view the generated SQL for test models?

2016-01-11 Thread Brutus Schraiber
Hi all… I have some models in a `test.py` file. How can I view the SQL that will be generated for them? Something like `django-admin sql` or similar but for models defined in `test.py` not in `models.py`. Regards, -brutus -- You received this message because you are subscribed to the Google

Re: What are the active Django e-commerce frameworks right now (2014)?

2014-04-26 Thread Brutus Schraiber
Thanks 'somecallitblues' I will definitely take a closer look at Mezzanine and Cartridge. But I'm kinda baffled. Only one answer after two weeks? Sure webshops might not be the hot topic anymore than they where a good couple of years ago, and most people just use PHP and Magento anyway, but st

What are the active Django e-commerce frameworks right now (2014)?

2014-04-15 Thread Brutus Schraiber
I played with Django a little bit a good couple of years ago and wanted to start out again. I created some pet projects to get into it again and I'm looking for a solid e-commerce framework to start some real projects. I just started to do some research in my free time and came across quite a l