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
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
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:
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
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
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
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
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
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
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
] 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
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
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
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
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
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)
>
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
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
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
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
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
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
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
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
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")
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
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 ?
#
27 matches
Mail list logo