Django по сравнению с опорами

IIRC это позволяет Вам создавать частные собственности и методы.

18
задан JasonMond 27 August 2015 в 22:51
поделиться

4 ответа

I'm using Pylons right now. The flexibility is great. It's all about best-of-breed rather than The Django Way. It's more oriented toward custom application development, as opposed to content-based web sites. You can certainly do content sites in it; it's just not specifically designed for them.

On the other hand, you do end up needing to read a lot of different documentation, in different places, of different quality, to grok all the components. Whereas one of the nice things about Django is that for all the core components, you just read "the" documentation.

The Mako (templates) + SQLAlchemy (DB & ORM) combo is really nice, though. Back when I used Django, I replaced its templating and DB system with them (giving up some of its integration features in the process) and they are standard with Pylons. Mako lets you use Python expressions, which is nice because even though you should separate business logic from design, dynamic sites do require significant display logic, and Django's template tags are clumsy to work with. SQLAlchemy lets you work with the same data model anywhere from the raw SQL level to the object-oriented ORM level.

I think it's worth the time to at least go through the docs and do the QuickWiki tutorial.

19
ответ дан 30 November 2019 в 08:27
поделиться

Pylons is not that much simpler than Django and it doesn't seem to have the same community. For lightweight apps I would recommend web.py. Even though there is a little magic, it doesn't feel like it. You see everything you do. For lots of other ideas see this very current list of web resources on python.

5
ответ дан 30 November 2019 в 08:27
поделиться

Something as simple as adding CSS classes to Django form fields IS possible.

1
ответ дан 30 November 2019 в 08:27
поделиться

Рискуя немного отклониться от темы, "я хочу иметь возможность (и бесплатно) делать что-то столь же простое, как добавление класса css в автоматически сгенерированную форму "может быть не лучшим индикатором мощности (или недостатка мощности) фреймворка. Генерация форм, как известно, трудно сделать гибким способом (см. http://blog.ianbicking.org/on-form-libraries.html ), и фреймворки всегда должны учитывать простоту использования. использование вместо поддержки расширенных вариантов использования. Раньше я использовал генерацию форм в Pylons и не обнаружил, что это особенно лучше или проще, чем то, как все работает в Django (но и не сложнее).

1
ответ дан 30 November 2019 в 08:27
поделиться
Другие вопросы по тегам:

Похожие вопросы: