These are chat archives for django/django

4th
Jan 2016
Kaushal Kumar
@kaushal087
Jan 04 2016 07:43 UTC
My project is absolutely runnning fine on local.
I have made necessary changes in setting but it says mytable not found
I am using sqllite with reference
Does reference work in postgresql
Bernard Ojengwa
@ojengwa
Jan 04 2016 09:23 UTC
Hi, I am having issues integrating celery with Django
so far, I have my tasks setup and the configs ready...
I am currently running a celery instance and this is the output from shell
?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_LOADERS.

 -------------- celery@dev.local v3.1.19 (Cipater)
---- **** ----- 
--- * ***  * -- Darwin-15.2.0-x86_64-i386-64bit
-- * - **** --- 
- ** ---------- [config]
- ** ---------- .> app:         flowxl:0x1072e4d90
- ** ---------- .> transport:   memory://localhost:6379/15
- ** ---------- .> results:     redis://localhost:6379/15
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ---- 
--- ***** ----- [queues]
 -------------- .> celery           exchange=celery(direct) key=celery


/Users/bernard/.virtualenvs/flowxl/lib/python2.7/site-packages/celery/fixups/django.py:265: UserWarning: Using settings.DEBUG leads to a memory leak, never use this setting in production environments!
  warnings.warn('Using settings.DEBUG leads to a memory leak, never '

[2016-01-04 08:35:43,900: WARNING/MainProcess] /Users/bernard/.virtualenvs/flowxl/lib/python2.7/site-packages/celery/fixups/django.py:265: UserWarning: Using settings.DEBUG leads to a memory leak, never use this setting in production environments!
  warnings.warn('Using settings.DEBUG leads to a memory leak, never '

[2016-01-04 08:35:43,901: WARNING/MainProcess] celery@dev.local ready.
This message was deleted
$ ./manage.py shell
Python 2.7.10 (default, Oct 23 2015, 18:17:08) 
Type "copyright", "credits" or "license" for more information.

IPython 2.2.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: from flowxl.channels import tasks as t

In [2]: t
Out[2]: <module 'flowxl.channels.tasks' from '/Users/bernard/Projects/Python/flowxl/flowxl/channels/tasks.pyc'>

In [3]: dir(t)
Out[3]: 
['Alert',
 'Channel',
 'ChannelLog',
 'Enum',
 'MageClient',
 'MageStreamAction',
 'SEND_MSG_TASK',
 '__builtins__',
 '__doc__',
 '__file__',
 '__name__',
 '__package__',
 'check_channels_task',
 'dict_to_struct',
 'get_redis_connection',
 'notify_mage_task',
 'pop_task',
 'send_alert_task',
 'send_msg_task',
 'settings',
 'sync_channel_task',
 'task',
 'test',
 'timedelta',
 'timezone',
 'trim_channel_log_task',
 'unicode_literals']

In [4]: t.test.delay()
Out[4]: <AsyncResult: a581268e-9a11-4ce6-aaa4-7c0314f35d5d>

In [5]:
From the example i followed, after running the task and getting this output, <AsyncResult: a581268e-9a11-4ce6-aaa4-7c0314f35d5d>, I should see a message logged in the shell that is running celery...
Bernard Ojengwa
@ojengwa
Jan 04 2016 09:28 UTC
I got nothing, however. What might I be doing wrong?
Bernard Ojengwa
@ojengwa
Jan 04 2016 09:34 UTC
Any help?
Michael Bykovski
@bykof
Jan 04 2016 13:09 UTC
Hey I get following error if I try to render a template through the Engine.get_template() module:
TemplateSyntaxError: 'l10n' is not a registered tag library. Must be one of:
I have Django 1.9
and also activated USE_L10N
Also there is following message:
Must be one of:
and no suggestions are mentioned here
Michael Bykovski
@bykof
Jan 04 2016 13:25 UTC
Ok I had to use the loader module instead of Engine