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
workaround. I'm thinking there must be a better way, using `Pinboard` and `prefetch_related` seems more straight forward, but I can't figure out how. BTW: It's on SO here: http://stackoverflow.com/questions/35410834/how-to-order-by-a-field-from-the-through-table-for-a-m2m-relationship

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

2016-01-20 Thread Brutus Schraiber
he following section of the docs: > https://docs.djangoproject.com/en/1.9/topics/testing/advanced/#using-the-django-test-runner-to-test-reusable-applications It is quite a bit overhead — even in it's simplest form — but sounds like a clean way to handle such cases. I will conside

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

2016-01-20 Thread 'Brutus' via Django users
ble-applications It is quite a bit overhead — even in it's simplest form — but sounds like a clean way to handle such cases. I will consider it in the future. Thanks again for your answer -brutus # Full Traceback ``` $ django-admin test app -v 3 Creating test database for alias '

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

Re: Help with Jinja Template

2007-10-14 Thread Brutus
Sorry for the push but can anyone drop me some hints or links? I do: print tmpl.render({"playlist": playlist}) Well playlist is a dictionary containing the tag-value pairs, parsed from the corresponding YAML file. In the template i want to itterate over a list of allowed tags and if the tag is p

Re: Help with Jinja Template

2007-10-10 Thread Brutus
Thank you Oliver for your answer. On 7 Okt., 22:19, olivier <[EMAIL PROTECTED]> wrote: > Calling a template seems a little bit overkill. Of course. But I just write some stuff to get my grip on Python again, haven't used it for a long time. I grabbed the newest version of "Learning Python" and

Re: Help with Jinja Template

2007-10-07 Thread Brutus
Hey again. I think i solved my (Jinja) problems. Well, it works like i want to, but it still feels kinda clumsy. Take a look if you want: http://dpaste.com/21722/ I would still like some thoughts of you, how would you do this (since i'm new to templates and am looking for "Best Practice"). Or ho

Help with Jinja Template

2007-10-07 Thread Brutus
Sorry if this is too offtopic but I couldn't find any help resources for Jinja, not on the official page nor trough google. Since Jinja seems to be very similar to Djangos template system (at least that's what i read and why i choose Jinja, but I'm pretty new at both template systems) i hope someo