[00:11:59] madmercen is now online
[00:26:26] AlexZenon is now xa
[00:46:01] MAVr is now — Уважаемые пассажиры! Убедительно просим вас не аплодировать экипажу до полной остановки самолета. Спасибо!
[00:50:09] MAVr is now offline
[00:53:56] madmercen is now away
[00:55:08] madmercen is now online
[01:07:32] gigimon is now offline
[01:09:13] gigimon is now online
[01:11:00] gigimon is now offline
[01:23:49] fuzzy is now away
[01:26:32] madmercen is now away
[01:29:28] madmercen is now online
[01:59:34] Сволота is now online
[01:59:34] : Используемый вами псевдоним не зарегистрирован
[01:59:34] madmercen is now online
[01:59:34] Tony is now xa
[01:59:34] AlexZenon is now xa
[01:59:34] fuzzy is now away
[01:59:34] magic_pony is now online
[01:59:34] : slav0nic установил(а) тему: python.su | Сначала поищи ответ на docs.python.org | Теперь поищи в google.com | Код постить в dumpz.org | Хочешь задать вопрос - просто *задай* его! | Правила написания хорошего кода: http://➡.ws/pep8 | Логи: http://logs.python.su
[02:24:54] madmercen is now away
[02:32:54] madmercen is now xa
[03:02:57] Сволота is now online
[03:02:57] : Используемый вами псевдоним не зарегистрирован
[03:02:57] fuzzy is now away
[03:02:57] madmercen is now xa
[03:02:57] Tony is now xa
[03:02:57] AlexZenon is now xa
[03:02:57] magic_pony is now online
[03:02:57] : slav0nic установил(а) тему: python.su | Сначала поищи ответ на docs.python.org | Теперь поищи в google.com | Код постить в dumpz.org | Хочешь задать вопрос - просто *задай* его! | Правила написания хорошего кода: http://➡.ws/pep8 | Логи: http://logs.python.su
[03:33:09] : Используемый вами псевдоним не зарегистрирован
[03:33:09] fuzzy is now away
[03:33:09] Tony is now xa
[03:33:09] madmercen is now xa
[03:33:09] Сволота is now online
[03:33:09] AlexZenon is now xa
[03:33:09] : slav0nic установил(а) тему: python.su | Сначала поищи ответ на docs.python.org | Теперь поищи в google.com | Код постить в dumpz.org | Хочешь задать вопрос - просто *задай* его! | Правила написания хорошего кода: http://➡.ws/pep8 | Логи: http://logs.python.su
[03:33:09] magic_pony is now online
[03:39:53] Сволота is now away
[03:42:37] Сволота is now online
[03:47:37] Сволота is now away
[03:50:45] Сволота is now online
[04:09:49] Сволота is now away
[04:09:59] Сволота is now online
[04:15:19] Сволота is now away
[04:25:19] Сволота is now xa
[04:55:23] : Используемый вами псевдоним не зарегистрирован
[04:55:23] Сволота is now xa
[04:55:23] Tony is now xa
[04:55:23] madmercen is now xa
[04:55:23] fuzzy is now away
[04:55:23] AlexZenon is now xa
[04:55:23] magic_pony is now online
[04:55:23] : slav0nic установил(а) тему: python.su | Сначала поищи ответ на docs.python.org | Теперь поищи в google.com | Код постить в dumpz.org | Хочешь задать вопрос - просто *задай* его! | Правила написания хорошего кода: http://➡.ws/pep8 | Логи: http://logs.python.su
[04:58:45] Сволота is now online
[05:03:45] Сволота is now away
[05:06:57] Сволота is now online
[05:11:59] Сволота is now away
[05:21:59] Сволота is now xa
[05:43:19] Сволота is now online
[05:49:09] Сволота is now away
[05:59:09] Сволота is now xa
[05:59:55] fuzzy is now away
[06:07:39] Сволота is now online
[06:12:41] Сволота is now away
[06:19:13] Сволота is now online
[06:24:21] Сволота is now away
[06:28:41] Сволота is now online
[06:33:43] Сволота is now away
[06:36:41] Сволота is now online
[06:42:53] Сволота is now away
[06:48:43] Сволота is now online
[06:50:15] dicos is now online
[06:56:26] dicos is now away
[06:56:27] dicos is now away
[07:01:31] dicos is now away
[07:01:33] dicos is now online
[07:04:25] Сволота is now away
[07:14:25] Сволота is now xa
[07:20:30] dicos is now away
[07:20:32] dicos is now away
[07:25:30] dicos is now away
[07:25:32] dicos is now online
[07:31:35] Сволота is now online
[07:38:47] Сволота is now away
[07:46:09] Сволота is now online
[07:53:33] Сволота is now away
[07:57:27] tranq is now online
[08:01:31] Сволота is now online
[08:06:43] Сволота is now away
[08:11:15] tranq is now away
[08:11:15] tranq is now away
[08:11:36] tranq is now away
[08:11:36] tranq is now online
[08:15:16] madmercen is now online
[08:15:53] Сволота is now online
[08:20:57] Сволота is now away
[08:21:26] madmercen is now offline
[08:24:25] Tony is now online
[08:27:03] Сволота is now online
[08:32:07] Сволота is now away
[08:34:15] tranq is now offline
[08:42:07] Сволота is now xa
[08:58:40] slav0nic is now away
[09:07:21] Сволота is now online
[09:08:33] slav0nic is now xa
[09:09:55] levsha is now online
[09:12:21] Сволота is now away
[09:15:55] Сволота is now online
[09:18:05] slav0nic is now online
[09:22:01] Сволота is now away
[09:24:05] Сволота is now online
[09:25:00] levsha is now offline
[09:28:35] levsha is now online
[09:30:07] Сволота is now away
[09:31:52] levsha is now offline
[09:40:07] Сволота is now xa
[09:44:42] levsha is now online
[09:46:47] slav0nic is now away
[09:49:12] levsha is now offline
[09:49:20] dicos is now away
[09:49:21] dicos is now away
[09:50:18] dicos is now away
[09:50:19] dicos is now online
[09:50:39] slav0nic is now online
[10:05:33] slav0nic is now away
[10:10:27] slav0nic is now online
[10:12:01] dicos is now away
[10:12:02] dicos is now away
[10:17:06] dicos is now away
[10:17:08] dicos is now online
[10:26:23] Сволота is now online
[10:26:37] nuclearworm is now online
[10:31:43] remo is now online
[10:34:04] remo: итааак:)
[10:36:37] Сволота is now away
[10:36:46] levsha is now online
[10:37:54] remo: slav0nic: http://paste.debian.net/180874/
[10:38:17] Сволота is now online
[10:38:33] remo: slav0nic: если создать запись, а потом грузить файл - всё ок. Если при создании грузить файл, то он получает путь /None/filename
[10:38:41] remo: как правильно сделать ?
[10:40:45] slav0nic: ну id при создании будет None пока не засейвит
[10:40:46] remo: slav0nic: я понимаю, что id создается в базе при создании записи. И когда я загружаю файл при создании записи, то image = не успевает получить id(он еще не создался)
[10:40:57] slav0nic: да
[10:41:14] remo: slav0nic: ну да:). Но как это обойти ? И надо ли ? Может сначала создавать запись, а потом грузить файл и всё ?
[10:43:35] dicos is now away
[10:43:36] dicos is now away
[10:43:56] dicos is now away
[10:43:57] dicos is now online
[10:46:57] Сволота is now away
[10:49:19] dicos is now away
[10:49:21] dicos is now away
[10:49:41] slav0nic is now away
[10:50:28] remo: slav0nic: но тут еще трабла Если грузить файл в классе Slider, image = models.ImageField(upload_to=save_file, blank=True, null=False)
[10:50:54] remo: то путь первого слайдера будет /1/slide-left, второго /2/slide-right
[10:51:03] slav0nic is now online
[10:51:07] remo: а должно быть /1/slide-left /1/slide-right
[10:51:56] slav0nic: ну добавь уникальное имя слайду и по нему слаг генерь и создавай каталоги
[10:52:24] remo: slav0nic: где про это прочитать ?:)
[10:54:25] dicos is now away
[10:54:27] dicos is now online
[10:56:00] slav0nic: в доке
[10:56:07] slav0nic: slugfield
[10:56:57] Сволота is now xa
[10:57:08] slav0nic: объявляешь слаг уникальный и в админ модель https://docs.djangoproject.com/en/1.8/ref/contrib/admin/#django.contrib.admin.ModelAdmin.prepopulated_fields
[10:59:26] dicos is now away
[10:59:27] dicos is now away
[11:02:04] remo: slav0nic: в 1.6 нет такого
[11:02:21] Сволота is now online
[11:04:31] slav0nic is now away
[11:06:52] levsha is now away
[11:07:39] levsha is now online
[11:09:19] Сволота is now away
[11:12:04] remo is now away
[11:12:32] fuzzy is now away
[11:13:23] slav0nic is now online
[11:13:37] levsha is now away
[11:16:24] levsha is now online
[11:19:19] Сволота is now xa
[11:20:24] slav0nic: он ещё в 0.96 был ...
https://docs.djangoproject.com/en/1.6/ref/contrib/admin/#django.contrib.admin.ModelAdmin.prepopulated_fields
[11:21:15] fuzzy is now online
[11:23:41] remo is now online
[11:23:42] remo: slav0nic: prepopulated_fields doesn’t accept DateTimeField, ForeignKey, nor ManyToManyField fields.
[11:23:57] slav0nic: и?
[11:24:11] remo: slav0nic: а там как раз ForeignKey в классе Slider
[11:24:37] slav0nic: сказал же имя слайду добавь и уникальный слаг, по слагу и создавай каталог
[11:24:56] remo: slav0nic: ладно, я лучше разыменую картинки по типу 1-slider...jpg
[11:24:59] slav0nic: а ваще я б всё в один каталог ложил и не боролся с мельницами
[11:25:15] slav0nic: нахзера тебе привязка к id?
[11:25:18] remo: slav0nic: утож) вечно напридумываю себе что-то и упорно с этим борюсь
[11:25:58] gigimon is now online
[11:26:15] remo: slav0nic: да хотел, чтобы все изображения слайдов привязывались к группе слайдов
[11:26:54] slav0nic: вопрос а нахера оно тебе на фс если там тех слайдов будет с десяток небось
[11:27:00] remo: но это в принципе не критично т.к этот процесс не массовый
[11:27:53] remo: slav0nic: всё верно, не более 10. Я ж любитель бороться с ветрянными мельницами)
[11:30:25] AlexZenon is now online
[11:31:53] Сволота is now online
[11:36:57] Сволота is now away
[11:37:53] remo is now away
[11:44:10] dicos is now away
[11:44:12] dicos is now online
[11:45:39] Сволота is now online
[11:48:26] remo is now online
[11:49:13] remo: slav0nic: теперь задача такая: мне надо в первом цикле сделать итерации групп, во втором цикле в зависимости от group -> id итерировать slider_slider http://paste.debian.net/180911/ Как это правильно сделать ?
[11:54:26] slav0nic: аля group.slider_set
консоль запусти и разбирайся
[11:54:27] Сволота is now away
[11:56:36] remo: slav0nic: ok
[11:58:49] levsha is now away
[12:03:09] Сволота is now online
[12:04:26] levsha is now offline
[12:06:37] remo is now away
[12:10:27] slav0nic is now away
[12:12:42] gigimon is now online
[12:17:38] gigimon is now away
[12:20:27] slav0nic is now xa
[12:22:40] nmk is now online
[12:34:54] remo is now online
[12:35:08] remo: slav0nic: еще раз: мне надо вот такое http://paste.debian.net/180951/ но я не могу понять как это делается в контексте шаблонов)
[12:45:08] remo is now away
[12:47:53] slav0nic is now online
[12:49:29] slav0nic: так же for slide in group.slider_set.all
[12:54:22] remo is now online
[12:57:00] remo: slav0nic: да вот фигушки http://paste.debian.net/180972/ ничего не выводит
[12:59:52] gigimon is now away
[12:59:52] gigimon is now online
[13:01:31] remo: а, синтаксическая ошибка была. Всё работает:)
[13:01:55] slav0nic is now away
[13:04:59] slav0nic is now online
[13:11:31] remo is now away
[13:18:47] Сволота is now away
[13:21:15] Сволота is now online
[13:21:52] levsha is now away
[13:22:05] levsha is now online
[13:22:07] slav0nic is now away
[13:22:45] slav0nic is now online
[13:25:06] nuclearworm is now away
[13:25:08] nuclearworm is now away
[13:26:59] Сволота is now away
[13:29:57] Сволота is now online
[13:32:43] slav0nic is now away
[13:33:52] levsha is now away
[13:35:57] slav0nic is now online
[13:39:29] levsha is now offline
[13:39:50] levsha is now away
[13:39:56] levsha is now online
[13:43:55] fuzzy is now away
[13:45:41] Сволота is now away
[13:45:53] Сволота is now online
[13:50:25] fuzzy is now online
[13:56:50] fuzzy is now away
[14:01:24] nuclearworm is now away
[14:01:26] nuclearworm is now online
[14:02:58] AlexZenon is now offline
[14:03:13] AlexZenon is now online
[14:06:50] fuzzy is now away
[14:26:53] levsha is now away
[14:28:17] dicos is now offline
[14:29:13] levsha is now online
[14:37:25] fuzzy is now away
[14:37:30] fuzzy is now online
[14:41:37] Сволота is now away
[14:42:45] Tony is now away
[14:43:41] Сволота is now online
[14:52:19] Сволота is now away
[14:58:10] levsha is now away
[15:02:19] Сволота is now xa
[15:03:57] levsha is now offline
[15:07:45] Tony is now xa
[15:08:18] tachiorz is now online
[15:09:53] Tony is now online
[15:11:07] Сволота is now online
[15:25:33] Сволота is now away
[15:26:43] Сволота is now online
[15:31:24] dicos is now online
[15:34:14] dicos is now away
[15:34:16] dicos is now away
[15:41:14] dicos is now away
[15:41:16] dicos is now online
[15:45:47] Сволота is now away
[15:48:57] dicos is now away
[15:48:59] dicos is now away
[15:49:43] dicos is now away
[15:49:45] dicos is now online
[15:55:00] dicos is now away
[15:55:02] dicos is now away
[15:55:47] Сволота is now xa
[15:57:06] dicos is now away
[15:57:08] dicos is now online
[16:11:44] fuzzy is now away
[16:12:01] fuzzy is now online
[16:13:12] dicos is now away
[16:13:13] dicos is now away
[16:13:51] tachiorz is now away
[16:16:13] tachiorz is now online
[16:17:00] remo is now online
[16:17:49] Сволота is now online
[16:18:18] dicos is now away
[16:18:20] dicos is now online
[16:23:18] dicos is now away
[16:23:19] dicos is now away
[16:27:21] remo is now away
[16:27:22] remo is now online
[16:28:47] slav0nic is now away
[16:29:18] levsha is now away
[16:29:23] levsha is now online
[16:30:27] slav0nic is now online
[16:34:41] Сволота is now away
[16:37:38] remo is now away
[16:39:12] remo is now online
[16:42:22] remo: slav0nic: можно это как-то оптимизировать ? http://paste.debian.net/181093/
[16:44:41] Сволота is now xa
[16:46:25] slav0nic: зачем оптимизировать?
[16:46:57] slav0nic: правда get_*_display юзать тупня
[16:47:01] slav0nic: в ифе
[16:52:23] remo is now away
[16:53:20] remo is now online
[16:54:14] remo: slav0nic: ну там же TYPE_CHOICES = ( (u'0', u'Slide'), (u'1', u'Caption'), (u'2', u'Helper'), )
[16:54:25] remo: type = models.CharField(max_length=1, null=True, choices=TYPE_CHOICES)
[16:54:41] remo: они резольвятся в имена только при get_*_display
[16:54:54] remo: иначе надо сравнивать с 0, 1, 2
[16:55:21] slav0nic: в доке ёпт всё есть
SLIDE = 0
CAPTION = 1
TYPE_CHOICES = [(SLIDE,'Slide') ...]
[16:55:44] slav0nic: == slider.SLIDE и тп
[16:55:55] slav0nic: поменял язык и твоя аппа сдохла
[16:56:29] Viscara is now online
[16:57:03] Viscara: again :))
[16:57:06] Viscara: Есть две таблицы mysql: User(id, full_name), Payment(user_id, date, amount)
в таблице Payment записана дата и сумма, когда юзер совершил платеж.
Какой оптимальный запрос (в бд 3 ляма записей) покажет юзеров, которые не совершили платеж за указанный месяц?
[16:57:12] Viscara: levsha: :)
[17:04:21] Viscara: fuzzy:
[17:04:23] Viscara: slav0nic:
[17:04:32] levsha: та тут вариантов немного. left join с условием по дате. Понятно по второй таблице должен быть ключ по used_id и date
[17:04:55] remo is now away
[17:05:49] slav0nic: ну джоинишь и смотришь где id is null
[17:06:42] dicos is now away
[17:06:44] dicos is now online
[17:07:16] slav0nic: http://explainextended.com/2009/09/18/not-in-vs-not-exists-vs-left-join-is-null-mysql/
вон тут даже тебе бенчмарки
[17:07:22] fuzzy is now away
[17:07:27] fuzzy is now online
[17:09:52] levsha: MySQL is the only system that produces three different plans for three different methods.
[17:10:01] fuzzy is now away
[17:15:52] fuzzy is now online
[17:18:18] remo is now online
[17:18:24] remo: slav0nic: ничего не понял. Ссылку на доку дай плс)
[17:18:57] slav0nic: да в константы внести значения
[17:19:21] slav0nic: https://docs.djangoproject.com/en/1.8/ref/models/fields/#django.db.models.Field.choices
[17:20:30] dicos is now away
[17:20:31] dicos is now away
[17:22:54] dicos is now away
[17:22:56] dicos is now online
[17:26:37] fuzzy is now online
[17:28:09] Viscara is now online
[17:28:24] remo is now away
[17:29:25] Viscara is now online
[17:37:30] levsha is now away
[17:38:26] Viscara is now offline
[17:39:19] slav0nic is now away
[17:39:59] levsha is now online
[17:44:21] nuclearworm is now offline
[17:48:08] dicos is now offline
[17:49:19] slav0nic is now xa
[17:50:39] slav0nic is now online
[18:04:15] slav0nic is now away
[18:04:36] tachiorz is now offline
[18:14:15] slav0nic is now xa
[18:22:44] levsha is now away
[18:25:25] levsha is now online
[18:25:38] remo is now offline
[18:28:02] levsha is now away
[18:28:03] levsha is now offline
[18:32:17] gigimon is now offline
[18:34:39] levsha is now away
[18:34:52] levsha is now online
[18:48:37] tachiorz is now online
[19:01:09] levsha is now offline
[19:03:01] levsha is now online
[19:09:05] Tony is now away
[19:19:38] levsha is now away
[19:22:03] levsha is now online
[19:32:59] nmk is now offline
[19:38:26] levsha is now away
[19:44:04] levsha is now offline
[19:57:29] levsha is now away
[19:57:34] levsha is now online
[19:59:12] slav0nic is now offline
[20:18:55] fuzzy is now away
[20:25:14] levsha is now away
[20:25:40] fuzzy is now online
[20:30:13] levsha is now offline
[20:33:03] levsha is now away
[20:36:59] Сволота is now online
[20:52:00] levsha is now online
[21:18:42] levsha is now away
[21:20:13] levsha is now offline
[21:20:28] tranq is now online
[21:24:58] tranq is now online
[21:26:45] Tony is now offline
[21:27:23] Viscara is now online
[21:27:37] Viscara: sps :)
[21:34:52] tachiorz is now offline
[21:46:00] Viscara is now online
[21:46:58] tranq is now away
[21:46:58] tranq is now away
[21:48:52] tranq is now away
[21:48:52] tranq is now online
[21:54:01] tranq is now away
[21:54:01] tranq is now away
[21:58:35] Viscara is now online
[21:58:46] tranq is now away
[21:58:46] tranq is now online
[22:07:21] tranq is now away
[22:07:21] tranq is now away
[22:07:47] levsha is now online
[22:08:52] fuzzy is now away
[22:19:06] tranq is now away
[22:19:06] tranq is now online
[22:21:11] Viscara is now online
[22:27:25] tranq is now away
[22:27:25] tranq is now away
[22:28:07] tranq is now away
[22:28:07] tranq is now online
[22:32:44] gigimon is now online
[22:34:11] tranq is now away
[22:34:11] tranq is now away
[22:37:53] tranq is now away
[22:37:53] tranq is now online
[22:43:02] tranq is now away
[22:43:02] tranq is now away
[22:48:19] gigimon is now online
[22:49:12] Viscara is now online
[22:49:12] Viscara is now offline
[22:49:33] gigimon is now online
[22:57:53] tranq is now away
[22:57:53] tranq is now online
[23:09:50] tranq is now away
[23:09:50] tranq is now away
[23:14:05] tranq is now away
[23:14:05] tranq is now online
[23:19:42] tranq is now away
[23:19:42] tranq is now away
[23:20:36] tranq is now away
[23:20:36] tranq is now online
[23:32:28] gigimon is now online
[23:37:26] gigimon is now away
[23:42:21] tranq is now offline
[23:46:30] slav0nic is now online
[23:47:51] Viscara is now online
[23:58:11] slav0nic is now away
[23:58:56] levsha is now offline
[23:59:28] Viscara is now online