Does Django Migration binds data to code?

2015-11-16 Thread João Sampaio
Guys, I asked a question in Stack Exchange Programmers about whether Django Migration binds data to code. Can you contribute with your expertise? I asked the question over there because anyone can contribute to this discussion, not only Django programmers. :-) Thanks! -- You received this messa

Re: Does Django Migration binds data to code?

2015-11-16 Thread João Sampaio
By the way, the question: http://programmers.stackexchange.com/questions/302682/django-migrations-binds-data-to-code On Monday, November 16, 2015 at 11:47:40 AM UTC-3, João Sampaio wrote: > > Guys, I asked a question in Stack Exchange Programmers about whether > Django Migration binds data to c

Re: How do I let forms.models.ModelChoiceField.queryset relate on request.user?

2015-11-16 Thread Axel Rau
Any idea how to add __init__() to a form class, created by modelform_factory () ? Axel Am 02.11.2015 um 13:50 schrieb Vijay Khemlani : > At least what I do in those cases is to add a constructor (__init__) to the > form class which takes the user as a parameter, modify the choicefield > query

New version of Xapian-Haystack (with Python 3 support)

2015-11-16 Thread Jorge Cardoso Leitão
Hi, I'm glad to announce Xapian-Haystack 2.0.0 . The main features of this version are: - Support for Python 3 - Support for Django 1.8 (>=1.6) - Support for Xapian 1.3.* - N(Edge)grams (thanks to ANtlord ) Python 3

Reducing redundancy in tests, logged-in vs. not-logged-in

2015-11-16 Thread Tim Chase
Are there best practices for writing tests where every case has a "not logged in" and a "logged in" pairing? I'm finding myself writing too much redundant test-code where the only difference is whether the user is anonymous (and thus the test should fail) or logged in with appropriate rights (and

Re: Reducing redundancy in tests, logged-in vs. not-logged-in

2015-11-16 Thread Carl Meyer
Hi Tim, On 11/16/2015 01:35 PM, Tim Chase wrote: > Are there best practices for writing tests where every case has a > "not logged in" and a "logged in" pairing? I'm finding myself writing > too much redundant test-code where the only difference is whether the > user is anonymous (and thus the te

[ANNOUNCE] Django 1.9 release candidate 1 released

2015-11-16 Thread Tim Graham
We're closing in on the final Django 1.9 release, so it's release candidate time! Details are up on the Django project blog: https://www.djangoproject.com/weblog/2015/nov/16/django-19rc1-released/ -- You received this message because you are subscribed to the Google Groups "Django users" grou

[Django 1.8.6] How to dump sql from models

2015-11-16 Thread marcin . j . nowak
Hi! After upgrade from 1.5 to 1.8.6 I'm trying to dump sql from models. I'm not using django migrations, and my db_router does not allow for migrations. Every "sql*" management command gives me nothing (empty output), where I'm expecting generated SQL. 1. How can I dump tables and indices

Re: [Django 1.8.6] How to dump sql from models

2015-11-16 Thread Mike Dewhirst
On 17/11/2015 11:14 AM, marcin.j.no...@gmail.com wrote: Hi! After upgrade from 1.5 to 1.8.6 I'm trying to dump sql from models. I'm not using django migrations, and my db_router does not allow for migrations. Try this ... 1. Rename all the migrations directories if they exist 2. $~python ma

Re: [Django 1.8.6] How to dump sql from models

2015-11-16 Thread Tim Graham
For Django 1.9+, I don't think there's a built-in way to do so. Until that feature makes its way into Django (if it ever does), it might not be difficult to reimplement those commands to the extent that you need them as a third-party app. See https://groups.google.com/d/topic/django-developers/

Re: [Django 1.8.6] How to dump sql from models

2015-11-16 Thread marcin . j . nowak
Mike, thanks. I have no migration directories, so assuming that it would not help. Tim, also thanks. I've checked that django-dev discussion, but no updates here. I don't want to discuss again and again about kicking out useful tools. It looks like reimplementing old commands is the only way.

Re: [Django 1.8.6] How to dump sql from models

2015-11-16 Thread Mike Dewhirst
On 17/11/2015 12:33 PM, marcin.j.no...@gmail.com wrote: Mike, thanks. Â I have no migration directories, so assuming that it would not help. I just checked and I tested that on 1.8.5 So maybe step 0 is to downgrade and step 4 is to upgrade again. Cheers Mike Tim, also thanks. I've checke

Re: [Django 1.8.6] How to dump sql from models

2015-11-16 Thread Mike Dewhirst
On 17/11/2015 12:33 PM, marcin.j.no...@gmail.com wrote: I have no migration directories, so assuming that it would not help It has just occurred to me that I don't have any unmanaged apps. Maybe that is why it worked for me? I seem to remember you need to mark apps as unmanaged to switch of

Timer for online examination

2015-11-16 Thread Arindam sarkar
I am developing an online examination website. And having difficulty implementing the timer . Any one have done it or something related to countdown timer in django ? -- Regards, Arindam Contact no. 08732822385 -- You received this message because you are subscribed to the Google Groups "Dja

Re: Timer for online examination

2015-11-16 Thread Jani Tiainen
Hi, If you're looking something magical there isn't anything. Just declare expiracy timestamp and compare against it in code. It should be rather trivial to do with JS down counter to UI for mode concrete feedback to end user. But keep final word of expiracy in Django code. On 17.11.2015 08

Re: Timer for online examination

2015-11-16 Thread Robin Lery
Hello, I think you will have to implement jquery/javascript to make the timer. After the countdown finishes js can post the form automatically. Cheers. On Tue, Nov 17, 2015 at 1:11 PM, Jani Tiainen wrote: > Hi, > > If you're looking something magical there isn't anything. Just declare > expira