Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Создание динамической модели их xml, yaml файла
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 31 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Виталий Попов  
View profile   Translate to Translated (View Original)
 More options Nov 14 2012, 1:47 am
From: Виталий Попов <sk1f....@gmail.com>
Date: Tue, 13 Nov 2012 22:47:51 -0800 (PST)
Local: Wed, Nov 14 2012 1:47 am
Subject: Создание динамической модели их xml, yaml файла

Привет Всем! Подскажите как создать модель из файла xml. Пытался сделать
это через десерелиз:
input = open("base.xml", "r")
    for ds in serializers.deserialize("xml", input.read()):
        ds.object
но не получилось.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cykooz  
View profile   Translate to Translated (View Original)
 More options Nov 14 2012, 2:10 am
From: Cykooz <cyk...@gmail.com>
Date: Wed, 14 Nov 2012 10:10:10 +0300
Local: Wed, Nov 14 2012 2:10 am
Subject: Re: Создание динамической модели их xml, yaml файла

Очень задачка похож на одно тестовое задание, которое мне дали при
собеседовании :) Вам случайно не для той же цели?

14 ноября 2012 г., 10:47 пользователь Виталий Попов <sk1f....@gmail.com>написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Виталий Попов  
View profile   Translate to Translated (View Original)
 More options Nov 14 2012, 2:26 am
From: Виталий Попов <sk1f....@gmail.com>
Date: Tue, 13 Nov 2012 23:26:12 -0800 (PST)
Local: Wed, Nov 14 2012 2:26 am
Subject: Re: Создание динамической модели их xml, yaml файла

Да вы правы, был уверен что у меня все быстро получиться, но почему то не
могу осилить.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
zae bee  
View profile   Translate to Translated (View Original)
 More options Nov 15 2012, 6:51 am
From: zae bee <zaebu...@gmail.com>
Date: Thu, 15 Nov 2012 03:51:28 -0800 (PST)
Local: Thurs, Nov 15 2012 6:51 am
Subject: Re: Создание динамической модели их xml, yaml файла

мое решение этой заадчи, для этого же собеседования,)
https://github.com/zaebee/exam/blob/master/apps/dynamic_models/models.py

среда, 14 ноября 2012 г., 11:26:12 UTC+4 пользователь Виталий Попов написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Сергей Панов  
View profile   Translate to Translated (View Original)
 More options Nov 15 2012, 9:07 am
From: Сергей Панов <spanoval...@gmail.com>
Date: Thu, 15 Nov 2012 20:07:09 +0600
Local: Thurs, Nov 15 2012 9:07 am
Subject: Re: Создание динамической модели их xml, yaml файла

Поделитесь кто это спрашивает и как выглядит  полное условие задачи.

15 ноября 2012 г., 17:51 пользователь zae bee <zaebu...@gmail.com> написал:

> мое решение этой заадчи, для этого же собеседования,)
> https://github.com/zaebee/exam/blob/master/apps/dynamic_models/models.py

> среда, 14 ноября 2012 г., 11:26:12 UTC+4 пользователь Виталий Попов
> написал:

>> Да вы правы, был уверен что у меня все быстро получиться, но почему то не
>> могу осилить.

>  --

--
Best Regards, Panov Sergey

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
zae bee  
View profile   Translate to Translated (View Original)
 More options Nov 15 2012, 3:07 pm
From: zae bee <zaebu...@gmail.com>
Date: Thu, 15 Nov 2012 12:07:32 -0800 (PST)
Local: Thurs, Nov 15 2012 3:07 pm
Subject: Re: Создание динамической модели их xml, yaml файла

Я честно говоря, не помню - ибо было год назад. Может быть, ТС ответит на
ваш вопрос.,

четверг, 15 ноября 2012 г., 18:07:12 UTC+4 пользователь Sergey написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cykooz  
View profile   Translate to Translated (View Original)
 More options Nov 16 2012, 4:51 am
From: Cykooz <cyk...@gmail.com>
Date: Fri, 16 Nov 2012 12:51:24 +0300
Local: Fri, Nov 16 2012 4:51 am
Subject: Re: Создание динамической модели их xml, yaml файла

Примерно так - реализовать приложение на джанге, которое свои модели
создаёт динамически из какого либо человеко-читаемого XML, YAML или JSON.
При этом должны нормально работать с такими моделями миграции через South и
в джанговской админке они должны быть доступны.

16 ноября 2012 г., 0:07 пользователь zae bee <zaebu...@gmail.com> написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Владимир Прохода  
View profile   Translate to Translated (View Original)
 More options Nov 16 2012, 4:53 am
From: Владимир Прохода <vladimirbri...@gmail.com>
Date: Fri, 16 Nov 2012 13:53:03 +0400
Local: Fri, Nov 16 2012 4:53 am
Subject: Re: Создание динамической модели их xml, yaml файла

Интересно, до сих пор ищут?

2012/11/16 Cykooz <cyk...@gmail.com>

--
Если есть трудное дело, поручите его лентяю: он найдет более легкое решение.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pavel Reznikov  
View profile   Translate to Translated (View Original)
 More options Nov 16 2012, 5:02 am
From: Pavel Reznikov <pashka.rezni...@gmail.com>
Date: Fri, 16 Nov 2012 12:02:40 +0200
Local: Fri, Nov 16 2012 5:02 am
Subject: Re: Создание динамической модели их xml, yaml файла

Но зачем? Чем питон не человекочитаемый язык?

//wbr Pavel Reznikov <pashka.rezni...@gmail.com>

-- Sent from my arithmometer

On 2012-11-16, at 11:51, Cykooz <cyk...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nikolay Fominykh  
View profile   Translate to Translated (View Original)
 More options Nov 16 2012, 5:04 am
From: Nikolay Fominykh <nikola...@gmail.com>
Date: Fri, 16 Nov 2012 14:04:04 +0400
Local: Fri, Nov 16 2012 5:04 am
Subject: Re: Создание динамической модели их xml, yaml файла

Тот кто может это сделать, скорее всего не пойдет в компанию, которая на
собеседовании это спрашивает. :)

16 ноября 2012 г., 13:53 пользователь Владимир Прохода <
vladimirbri...@gmail.com> написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Виталий Попов  
View profile   Translate to Translated (View Original)
 More options Nov 16 2012, 5:06 am
From: Виталий Попов <sk1f....@gmail.com>
Date: Fri, 16 Nov 2012 02:06:30 -0800 (PST)
Local: Fri, Nov 16 2012 5:06 am
Subject: Re: Создание динамической модели их xml, yaml файла

пятница, 16 ноября 2012 г., 14:02:46 UTC+4 пользователь Pavel Reznikov
написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cykooz  
View profile   Translate to Translated (View Original)
 More options Nov 16 2012, 5:12 am
From: Cykooz <cyk...@gmail.com>
Date: Fri, 16 Nov 2012 13:12:36 +0300
Local: Fri, Nov 16 2012 5:12 am
Subject: Re: Создание динамической модели их xml, yaml файла

Не факт, что это ценная в практическом смысле задача - это просто проверка
знания и умения их использовать. По ТЗ даже было не обязательно
реализовывать полный набор типов полей (что собственно и видно из моей
реализации).
При этом задачка вполне уникальна, и ответ в гугле просто так не найдёшь
(собственно сам этот тред - доказательство ценности этого тестового задания)

16 ноября 2012 г., 14:02 пользователь Pavel Reznikov <
pashka.rezni...@gmail.com> написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
George Regentov  
View profile  
 More options Nov 16 2012, 5:20 am
From: George Regentov <george.regen...@gmail.com>
Date: Fri, 16 Nov 2012 14:20:33 +0400
Local: Fri, Nov 16 2012 5:20 am
Subject: Re: Создание динамической модели их xml, yaml файла

О©╫О©╫О©╫ О©╫О©╫ О©╫О©╫О©╫О©╫О©╫О©╫О©╫, О©╫О©╫О©╫О©╫ О©╫О©╫ О©╫О©╫О©╫О©╫О©╫О©╫?

16.11.2012 13:51, Cykooz О©╫О©╫О©╫О©╫О©╫:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pavel Reznikov  
View profile   Translate to Translated (View Original)
 More options Nov 16 2012, 5:21 am
From: Pavel Reznikov <pashka.rezni...@gmail.com>
Date: Fri, 16 Nov 2012 12:21:41 +0200
Local: Fri, Nov 16 2012 5:21 am
Subject: Re: Создание динамической модели их xml, yaml файла

А, работа ради работы. Это как плац ломом мести.

Зачем вообще такие вопросы на собеседовании? Почему бы просто не давать кусок реальной задачи, которую потом соискатель будет решать...

//wbr Pavel Reznikov <pashka.rezni...@gmail.com>

-- Sent from my arithmometer

On 2012-11-16, at 12:12, Cykooz <cyk...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cykooz  
View profile   Translate to Translated (View Original)
 More options Nov 16 2012, 5:35 am
From: Cykooz <cyk...@gmail.com>
Date: Fri, 16 Nov 2012 13:35:43 +0300
Local: Fri, Nov 16 2012 5:35 am
Subject: Re: Создание динамической модели их xml, yaml файла

Ну лично мне задачка понравилась, выполнял её с удовольствием.

16 ноября 2012 г., 14:21 пользователь Pavel Reznikov <
pashka.rezni...@gmail.com> написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nikolay Fominykh  
View profile   Translate to Translated (View Original)
 More options Nov 16 2012, 5:42 am
From: Nikolay Fominykh <nikola...@gmail.com>
Date: Fri, 16 Nov 2012 14:42:36 +0400
Local: Fri, Nov 16 2012 5:42 am
Subject: Re: Создание динамической модели их xml, yaml файла

Я бы давал такую задачку вместе с остальными, и отсеивал тех, кто её решил.
Занятие ерундой - вредная штука для реальных задач. И естественно со
стороны кандидата тоже должен возникнуть вопрос "Вы правда так делаете?".

Сама идея динамически менять модель - это тоже самое, что согласится жить в
мире, где законы физики каждый день новые.

16 ноября 2012 г., 14:21 пользователь Pavel Reznikov <
pashka.rezni...@gmail.com> написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Владимир Прохода  
View profile   Translate to Translated (View Original)
 More options Nov 16 2012, 5:47 am
From: Владимир Прохода <vladimirbri...@gmail.com>
Date: Fri, 16 Nov 2012 14:47:43 +0400
Local: Fri, Nov 16 2012 5:47 am
Subject: Re: Создание динамической модели их xml, yaml файла

Узнать о том как создаются классы моделей внутри джанго весьма полезный
опыт. Хорошее задание.

2012/11/16 Nikolay Fominykh <nikola...@gmail.com>

--
Если есть трудное дело, поручите его лентяю: он найдет более легкое решение.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pavel Reznikov  
View profile   Translate to Translated (View Original)
 More options Nov 16 2012, 6:06 am
From: Pavel Reznikov <pashka.rezni...@gmail.com>
Date: Fri, 16 Nov 2012 13:05:53 +0200
Local: Fri, Nov 16 2012 6:05 am
Subject: Re: Создание динамической модели их xml, yaml файла

Классы моделей декларируются. А чтоб решить эту задачу достаточно прочитать два абзаца о метаклассах, что никак не определяет умение решать прикладные задачи, как по мне. А про метаклассы достаточно просто спросить - человек либо знает что это, либо нет

//wbr Pavel Reznikov <pashka.rezni...@gmail.com>

-- Sent from my arithmometer

On 2012-11-16, at 12:47, Владимир Прохода <vladimirbri...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cykooz  
View profile   Translate to Translated (View Original)
 More options Nov 16 2012, 6:19 am
From: Cykooz <cyk...@gmail.com>
Date: Fri, 16 Nov 2012 14:19:23 +0300
Local: Fri, Nov 16 2012 6:19 am
Subject: Re: Создание динамической модели их xml, yaml файла

Тут вообще никакого понимания метаклассов не нужно - просто уметь
пользоваться встроенной функцией type() для динамического создания классов
и знать, что  добавить что то в питоновский модуль можно не только путём
добавления текста в его исходный код, но и динамически во время выполнения
программы.

16 ноября 2012 г., 15:05 пользователь Pavel Reznikov <
pashka.rezni...@gmail.com> написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nikolay Fominykh  
View profile   Translate to Translated (View Original)
 More options Nov 16 2012, 6:20 am
From: Nikolay Fominykh <nikola...@gmail.com>
Date: Fri, 16 Nov 2012 15:20:32 +0400
Local: Fri, Nov 16 2012 6:20 am
Subject: Re: Создание динамической модели их xml, yaml файла

Чем полезен этот опыт? Умение гуглить, копаться в открытом коде?

Хуже юниора - юниор с инициативой.

16 ноября 2012 г., 14:47 пользователь Владимир Прохода <
vladimirbri...@gmail.com> написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pavel Reznikov  
View profile   Translate to Translated (View Original)
 More options Nov 16 2012, 7:12 am
From: Pavel Reznikov <pashka.rezni...@gmail.com>
Date: Fri, 16 Nov 2012 14:12:37 +0200
Local: Fri, Nov 16 2012 7:12 am
Subject: Re: Создание динамической модели их xml, yaml файла

Использование манкипатчинга для решения такой задачи - это маркер, по которому можно отсеивать быдлокодеров.

//wbr Pavel Reznikov <pashka.rezni...@gmail.com>

-- Sent from my arithmometer

On 2012-11-16, at 13:19, Cykooz <cyk...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cykooz  
View profile   Translate to Translated (View Original)
 More options Nov 16 2012, 7:56 am
From: Cykooz <cyk...@gmail.com>
Date: Fri, 16 Nov 2012 15:56:22 +0300
Local: Fri, Nov 16 2012 7:56 am
Subject: Re: Создание динамической модели их xml, yaml файла

В данном случае речь не о внешнем воздействии на модуль, а про то что код
внутри модуля добавляет в этот же модуль новые классы при первом его
импорте.

16 ноября 2012 г., 16:12 пользователь Pavel Reznikov <
pashka.rezni...@gmail.com> написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Serge Matveenko  
View profile   Translate to Translated (View Original)
 More options Nov 19 2012, 2:16 am
From: Serge Matveenko <se...@matveenko.ru>
Date: Mon, 19 Nov 2012 11:16:10 +0400
Local: Mon, Nov 19 2012 2:16 am
Subject: Re: Создание динамической модели их xml, yaml файла
2012/11/16 Cykooz <cyk...@gmail.com>:

> В данном случае речь не о внешнем воздействии на модуль, а про то что код
> внутри модуля добавляет в этот же модуль новые классы при первом его
> импорте.

А кто сказал, что в этот же? Эх, задача, на самом деле, действительно
для метамага.

Когда мне нужны были динамические модели (генерация из админки, а не
из xml), еще до того как появились всякие CouchDB и MongoDB, мы
сделали это шаблонами файлов models.py, автоматической миграцией и
програмной перезагрузкой приложения. И эта наркомань даже работала. И
никаких метаклассов, кстати.

--
Serge Matveenko
mailto: se...@matveenko.ru
github: http://lnkfy.com/1
linkedin: http://lnkfy.com/S


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mikhail Kashkin  
View profile   Translate to Translated (View Original)
 More options Nov 16 2012, 10:40 am
From: Mikhail Kashkin <mkash...@gmail.com>
Date: Fri, 16 Nov 2012 22:40:35 +0700
Local: Fri, Nov 16 2012 10:40 am
Subject: Re: Создание динамической модели их xml, yaml файла

Вообще-то вполне стандартная задача на понимание метапрограммирования и
джанго в частности. Не знаю о каком заказчике речь и что там у вас за
фанатская тусовка вокруг него собралась, но идея так проверить знания очень
понравилась. Случайно или нет, но ребята придумали хорошее задание.

2012/11/16 Nikolay Fominykh <nikola...@gmail.com>

> Чем полезен этот опыт? Умение гуглить, копаться в открытом коде?

> Хуже юниора - юниор с инициативой.

--
Mikhail Kashkin
http://comfort.ly/
http://www.vurt.ru/

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Виталий Попов  
View profile   Translate to Translated (View Original)
 More options Nov 20 2012, 11:54 pm
From: Виталий Попов <sk1f....@gmail.com>
Date: Tue, 20 Nov 2012 20:54:20 -0800 (PST)
Local: Tues, Nov 20 2012 11:54 pm
Subject: Re: Создание динамической модели их xml, yaml файла

Мне тоже задание понравилось. Да и не какой тусовки нет просто разные люди
разные мнения.

пятница, 16 ноября 2012 г., 19:40:35 UTC+4 пользователь Mikhail Kashkin
написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 31   Newer >
« Back to Discussions « Newer topic     Older topic »