Backend exception after upgrade.

2020-09-25 Thread Kirill Maksimov
Hello guys. I'm using Python3.8 and Django2.2. After upgrade to django 2.2, I'm getting weird exception which happens only on ecs sever: *AttributeError partially initialized module 'django_redis.cache' has no attribute 'RedisCache' (most likely due to a circular import)* Also had similar

Re: Channels 2.0 close code and http response status

2018-06-24 Thread Kirill Tyushchakov
e it > immediately with a custom WebSocket close code (you can do all of that > inside connect, I think). > > Andrew > > On Thu, Jun 21, 2018 at 2:52 PM Kirill Tyushchakov > wrote: > >> Hello everyone! >> I'm new in Django Channels. I'm using Channels 2.0 an

Channels 2.0 close code and http response status

2018-06-21 Thread Kirill Tyushchakov
Hello everyone! I'm new in Django Channels. I'm using Channels 2.0 and I have few questions about it. I'm using JsonWebsocketConsumer class for my consumer and I wrote my definition of connect method like this: def connect(self): user = self.scope.get('user') if user.is_anonymous:

Re: django signals.post_save() and conditions.

2013-01-02 Thread kirill . yakovenko
Hello, I'm not sure that I've understood you completely. What condition are you going to apply to a signal? Best regards, Kirill Yakovenko On Wednesday, January 2, 2013 4:34:35 PM UTC+7, ysfjwd wrote: > > Is there a way to check a condition on sender model before processing a > co

Re: Validators for fields in Proxy Model - possible without monkeypatching?

2012-01-17 Thread Kirill Panshin
I've found the solution, initially I was looking in wrong direction. All I needed to do is to use ``Model.clean()`` method and then call ``Model.full_clean()`` in ``save()``: from django.contrib.auth.models import User class CustomUser(User) def clean(self): """ Clean username field

Validators for fields in Proxy Model - possible without monkeypatching?

2012-01-16 Thread Kirill Panshin
I use proxy model class inherited from `django.contrib.models.User` and I want to apply custom validator to `username` field. Is threre a way to do this without monkeypatching, as I cannot override fields in parent class? -- You received this message because you are subscribed to the Google

Re: Tutorial confusion: flat project layout with django 1.3.1

2011-10-16 Thread Kirill Spitsin
lso says: ... You are reading tutorial for development version of Django, and startproject default layout was recently changed [1]. Tutorial for 1.3 is here: https://docs.djangoproject.com/en/1.3/intro/tutorial01/ [1] https://code.djangoproject.com/changeset/16964 -- Kirill Spitsin -- You received

Porting BugFix #3615 (Can't define forward references in fixtures using MySQL with InnoDB) to Django 1.3.1

2011-10-06 Thread Kirill Panshin
Hey, If you get this problem with your fixtures when loading them into MySQL InnoDB, you can use this forked branch of Django: https://github.com/kipanshi/django/tree/1.3.1.1 To install via pip: pip install -e git+git://github.com/kipanshi/ django.git@1.3.1.1#egg=django-1.3.1.1 --

Re: ALL CAPS input and Sentence case

2011-07-26 Thread Kirill Spitsin
On Tue, Jul 26, 2011 at 07:19:46PM +0300, Kirill Spitsin wrote: > On Tue, Jul 26, 2011 at 08:48:24AM -0700, christian.posta wrote: > > For user input, I would like to format what they enter into 'sentence > > case' > > Example, if they input ALL CAPS for a description

Re: ALL CAPS input and Sentence case

2011-07-26 Thread Kirill Spitsin
upper > case, rest lowercase up to the period). > > I was hoping something like this exists as a convenience function/ > module, but if not i guess i'll have to write it myself. >>> 'ALL CAPS. aNd MixED.'.title() 'All Caps. And Mixed.' -- Kirill Spitsin -- You received this m

Re: Database doubt

2011-07-26 Thread Kirill Spitsin
] http://south.aeracode.org/ -- Kirill Spitsin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@goog

Re: Need help intercepting SQL

2011-07-11 Thread Kirill Spitsin
angoproject.com/browser/django/branches/releases/1.2.X/django/db/backends/__init__.py#L280 -- Kirill Spitsin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To un

Re: How do I access a field's verbose_name?

2011-06-20 Thread Kirill Spitsin
On Mon, Jun 20, 2011 at 08:54:14AM -0700, Jeff Blaine wrote: > I'd like to make use of a field's verbose_name in some code instead of > duplicating that sort of info. Can someone show me how? >>> SomeModel._meta.get_field(field_name).verbose_name -- Kirill Spitsin -

Re: Confusion about DJANGO_SETTINGS_MODULE

2011-06-02 Thread Kirill Spitsin
ath syntax"? Would it be ok if I just provide the value as a > file name? Perhaps, "new_setting.py"? "new_setting" And i would recommend you read this part of python tutorial: http://docs.python.org/tutorial/modules.html -- Kirill Spitsin -- You received this

Re: spawning threads within test cases in django test framework

2011-06-01 Thread Kirill Spitsin
gt; ideally, came up with a really neat solution...) Try to use TransactionTestCase instead of TestCase (and don't use in-memory SQLite datebase). -- Kirill Spitsin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Re: save out a test database?

2011-06-01 Thread Kirill Spitsin
serialize >>> queryset1 = Model1.objects.filter(...) >>> queryset2 = Model2.objects.filter(...) >>> fixture = serialize('json', list(queryset1) + list(queryset2)) >>> f = open('mydate.json', 'w') >>> f.write(fixture) >>> f.close() -- Kirill Spitsin

Re: Django DATETIME_FORMAT Localization

2011-05-31 Thread Kirill Spitsin
formats.date_format` function. -- Kirill Spitsin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr.

Re: Can I perform an "alter table" to remove a "not null" constraint?

2011-05-31 Thread Kirill Spitsin
rself, for example, for PostgreSQL:: ALTER TABLE ALTER COLUMN DROP NOT NULL; -- Kirill Spitsin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this

Re: setlang using AJAX

2011-05-30 Thread Kirill Spitsin
On Mon, May 30, 2011 at 08:03:46AM -0700, Luca Casagrande wrote: > Thank you very much, for your help and your code. > The problem is that the POST request is missing the csrf_token and so > I have got a 403 Error. https://docs.djangoproject.com/en/1.3/ref/contrib/csrf/#ajax -- Kiril

Re: admin ordering for NULL fields

2011-05-27 Thread Kirill Spitsin
, hints? http://www.mail-archive.com/django-users@googlegroups.com/msg64668.html -- Kirill Spitsin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscri

Re: Django model manager "live" object issues

2011-05-19 Thread Kirill Spitsin
, why is none of this being cached? Not quite so, QuerySet has a cache [1]. .. [1] http://docs.djangoproject.com/en/1.3/topics/db/queries/#caching-and-querysets -- Kirill Spitsin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Built-in login form via inclusion tag

2011-05-19 Thread Kirill Spitsin
rt AuthenticationForm @register.inclusion_tag("you_template.html") def login_tag(): form = AuthenticationForm() return {"form": form,} -- Kirill Spitsin -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Where does SessionMiddleware load the session object from the SessionStore backend?

2011-05-12 Thread Kirill Spitsin
o/contrib/sessions/backends/base.py#L46 SessionBase._session is a property, with getter SessionBase._get_session(): http://code.djangoproject.com/browser/django/trunk/django/contrib/sessions/backends/base.py#L168 and in _get_session() SessionBase.load() is called. -- Kirill Spitsin -- You

Re: Where does SessionMiddleware load the session object from the SessionStore backend?

2011-05-12 Thread Kirill Spitsin
on from store lazily, after first access to session, in `SessionStore.load()` method. For example: https://code.djangoproject.com/browser/django/trunk/django/contrib/sessions/backends/db.py#L16 -- Kirill Spitsin -- You received this message because you are subscribed to the Google Groups &q

Creating one model row from another model save method

2011-03-02 Thread Kirill Gorin
Hi community I have two models in two apps, first named newsItem from django.db import models from datetime import datetime class newsItem(models.Model): pubDate = models.DateTimeField('date published',default=datetime.now()) author = models.CharField(max_length=20, default="author")

Form Wizard and captcha

2009-04-13 Thread Kirill Zaborski
need to make any additional steps for this to happen? Kirill. On 8 апр, 22:29, qrilka <qri...@gmail.com> wrote: > I've stumbled upon from revalidation in form wizard. The similar > problem was discussed a year ago - http://groups.google.com/group/django-users/browse_thread/thread/a6fd

Model for newbie

2009-01-29 Thread Kirill
Hello all! I have some logic problem I really don't understand how make model for this task: I have registered users (i want to use User class). Each registered user can create project (or group or blog) where he can invite another users So, how it's better to do model ?