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 exc

Re: Channels 2.0 close code and http response status

2018-06-24 Thread Kirill Tyushchakov
t; accept the socket, letting the handshake finish, and then close 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 everyon

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

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 t

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 Grou

Re: Tutorial confusion: flat project layout with django 1.3.1

2011-10-16 Thread Kirill Spitsin
also 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 th

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 -- Che

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 descriptio

Re: ALL CAPS input and Sentence case

2011-07-26 Thread Kirill Spitsin
sentence 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.' -- Kiri

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
https://code.djangoproject.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@googlegr

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 Spits

Re: Confusion about DJANGO_SETTINGS_MODULE

2011-06-02 Thread Kirill Spitsin
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
blem before? (And, > 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" gro

Re: save out a test database?

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

Re: Django DATETIME_FORMAT Localization

2011-05-31 Thread Kirill Spitsin
tils.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+unsu

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

2011-05-31 Thread Kirill Spitsin
y dbshell, and ALTER TABLE yourself, 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@googlegr

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
want. Any tips, 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.co

Re: Django model manager "live" object issues

2011-05-19 Thread Kirill Spitsin
t; Finally, 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. T

Re: Built-in login form via inclusion tag

2011-05-19 Thread Kirill Spitsin
r.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" group. To post to this group, se

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 rece

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

2011-05-12 Thread Kirill Spitsin
ngo loads session 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 Googl

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 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... > I have some

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 ? #