An app to make migrations faster on Django 1.8

2017-04-06 Thread Shai Berger
operations. I have just released to PyPI an app[1] which, when installed, makes Django 1.8 use the faster mechanisms present in later Django versions. I hope those of you who are still on 1.8 may find it useful. Have fun, Shai. [1] http://pypi.python.org/pypi/django_18_fast_migrations

Re: apps.populate deadlock

2016-01-13 Thread Shai
all > the apps are doing reasonable things (monkey patching aside), and django > shouldn't be calling apps.populate to unpickle a model. Perhaps that is > unavoidable? > The question of whether Django should be calling apps.populate() to unpickle a model (instance) will be bett

Fwd: cx_Oracle 5.2

2015-06-21 Thread Shai Berger
FYI. The news as far as Django users are concerned are mostly improved support for Oracle 12c (not yet used in Django core, but available for users nonetheless) and some minor bugfixes. Have fun, Shai. -- Forwarded Message -- Subject: cx_Oracle 5.2 Date: Sunday 21

Re: ELSE don't work

2015-05-20 Thread Shai Efrati
What do you have in models.py for rt_calls? Did you try passing values that are not 0 or 1? > On May 20, 2015, at 5:47 PM, Emerson Luiz wrote: > > Shai Efrati, > > rt.controle is create by in view: > > exten = rt_calls.objects.all() > > Em quarta-feira, 20 de

Re: ELSE don't work

2015-05-20 Thread Shai Efrati
5cd5866 > > Thanks > > Em quarta-feira, 20 de maio de 2015 10:55:35 UTC-3, Shai Efrati escreveu: >> >> So, when do you expect else? It seems that you don't pass such values. >> >> On Wed, May 20, 2015 at 4:52 PM, Emerson Luiz wrote: >>> Shai Efrati

Re: ELSE don't work

2015-05-20 Thread Shai Efrati
So, when do you expect *else*? It seems that you don't pass such values. On Wed, May 20, 2015 at 4:52 PM, Emerson Luiz wrote: > Shai Efrati, > > Thanks for answer... > > rt.controle pass always 0 or 1 > I not pass any value.. only 0 or 1 > > Thanks > > Em qua

Re: ELSE don't work

2015-05-20 Thread Shai Efrati
What does rt.controle hold? Do you pass any values that are not 0 or 1? On Wed, May 20, 2015 at 4:37 PM, Emerson Luiz wrote: > Hi, > > I have the following logic: > > {% if rt.controle == 1 and rt.Exten|length > 7 %} > WORK's > {% elif rt.controle == 1 %} > WORK's > {% elif rt.controle == 0 and

Re: How can I get this result?

2015-02-15 Thread Shai Efrati
sorry. assuming: l = [{'key1':'a' , 'key2': 'b'},{'key1':'c' , 'key2': 'd'}] for e in l: for k, v in e.iteritems(): print v, print On 2/15/15, Shai Efrati wrote: > assuming: > l = [{'

Re: How can I get this result?

2015-02-15 Thread Shai Efrati
assuming: l = [{'key1':a , 'key2': b},{'key1':c , 'key2': d}] for e in l: for k, v in iteritems(e): print v, print On 2/15/15, aronivi...@gmail.com wrote: > [{'key1':a , 'key2': b},{'key1':c , 'key2': d}] > a,b > c,d > > -- > You received this message because you are subscribed

Re: create unmanaged model to oracle view/synonym

2015-01-01 Thread Shai
the view name: class MyUnManagedModel(models.Model): # ... # fields # ... class Meta: managed = False db_table = 'view_name' Have you run into difficulties? HTH, Shai. -- You received this message because you are subscribed to the Google Groups "Dj

Re: Python question about positioning of "from... import" statement

2014-10-01 Thread Shai Efrati
setdefault('DJANGO_SETTINGS_MODULE', 'tango.settings') after from rango.models import... Let me know if that helped :) Shai. On Wed, Oct 1, 2014 at 6:37 PM, Daniel Grace wrote: > Hi, this is more of a Python question but here is something I don't > understand in a Django

Fwd: [cx-oracle-users] cx_Oracle 5.1.3

2014-05-24 Thread Shai Berger
Hi all, This release of cx_Oracle includes fixes the segfaults encountered with Python3, and includes significant performance improvements for 64-bit platforms (where long is 64-bits, so, specifically, Windows not included). Strongly recommended for all Oracle users. Have fun, Shai

Re: jquery in included html file

2014-05-05 Thread Shai Efrati
How did you use it in the nav.html file? Can you please write it here, maybe it's a reference issue. On Monday, May 5, 2014, Andreas Bloch wrote: > How do you access (or include) jquery in a file, which is included? > I'm getting a "Uncaught ReferenceError: $ is not defined" when trying to > use

Re: CSS not rendering correctly

2014-04-02 Thread Shai Efrati
It seems to me that your app doesn't knwo where to pull the CSS from. Can you post your directories structure and your base.html? Shai. On Wed, Apr 2, 2014 at 2:45 PM, Warren Jacobus wrote: > Hi, > > I'm having some trouble with my css in my django app. See pic for how &g

Re: __unicode__() addition not working in basic poll application.

2014-03-27 Thread Shai Efrati
el): poll = models.ForeignKey(Poll) choice_text = models.CharField(max_length=200) votes = models.IntegerField(default=0) def __unicode__(self): return self.choice_text Good luck! Shai. On Thu, Mar 27, 2014 at 12:06 PM, Steve Evans <00sev...@gmail.com> wrote: > Hi I am

Re: Referring to the page -- https://docs.djangoproject.com/en/1.6/intro/tutorial01/

2014-03-26 Thread Shai Efrati
Hi Dan, In the shell, did you re-import your Poll model? (>>> from polls.models import Poll) I think you might use a previous version of your model (without the changes), and that's why it doesn't recognize it. I might be wrong though :) Please let me know if it worked.

Re: Get secret key from django settings

2014-03-25 Thread Shai Efrati
Hi Errfan, You can get the SECRET_KEY through the environment variables. Just use: from os import environ SECRET_KEY = environ.get('SECRET_KEY') Good luck! Shai. On Tue, Mar 25, 2014 at 8:36 AM, Errfan Wadia wrote: > Hi, > > I am using from django.conf import settings &g

Re: One to many mixins?

2009-12-11 Thread Shai
Thanks for the reply, but that would force me to link each SubForm1 object with both a Form1 & Form2 object. I would like to link them with either Form1 or Form2 Shai On Dec 10, 5:22 pm, Superman wrote: > Can you not create another Field in SubForm 1 model? Like so: > > c

One to many mixins?

2009-12-10 Thread Shai
return "SubForm1" Form = models.ForeignKey(Form1) ## some fields here I would like to have Form2 also be linked to a SubForm1 model. How can this be done? Thanks, Shai -- You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: Aggregates over reverse relationships?

2009-08-06 Thread Shai
On Aug 4, 2:09 am, Malcolm Tredinnick wrote: > On Mon, 2009-08-03 at 17:45 +0300, Shai Berger wrote: > > Hi all, > > > With the new aggregates in django 1.1, I wonder if there's an easy way to > > aggregate over reverse relationships. As an example, assume a simpl

Re: Aggregates over reverse relationships?

2009-08-03 Thread Shai Berger
The question about aggregates still stands -- however, if anybody is wondering about finding all childless parents, I figured a way: On Monday 03 August 2009 17:45:18 Shai Berger wrote: > > class Team(models.Model): > name = models.CharField(max_length=100) > > class Play

Aggregates over reverse relationships?

2009-08-03 Thread Shai Berger
ome obvious way (which I'm currently missing) to solve the specific problem of finding the empty teams without such aggregates; however, they do make sense in general. Is there a way? Thanks, Shai. --~--~-~--~~~---~--~~ You received this message becaus