Wednesday, February 2, 2011

Re: Loose Coupling? Dependencies for "forms" and "db".

It's true I've seen Django-nonrel, however it is unappealing to me
primarily, because it just tries to hook into Django's current ORM,
which I'm not crazy about. Further than that, I don't know that I
want to create "Models" that are hard coded. Why add type checking to
a database that doesn't need it? Python doesn't need type checking :)

Maybe I'm just not using the forms correctly, however I have a very
user interface intensive site and they seem to obfuscate the HTML
code. I very much dislike the idea of putting HTML code in Python
Strings. Actually, as a side note, putting any sort of code into
strings in another language is typically bad practice.

I don't know if I will actually fork the project, but I am getting to
the point where I am maintaining multiple sites. So I'm seeing a lot
of duplicate code between different sites of mine. I guess this is
kind of an open ended question, but what is the best way to go about
this? My current plan is to build a custom framework alongside
Django. What are your thoughts?

Thanks for the reply.

On Feb 2, 8:45 am, Masklinn <maskl...@masklinn.net> wrote:
> On 2011-02-02, at 14:45 , bluesolver wrote:> I have decided that I need considerably more control over both my HTML
>
> and my database, which in point of fact is being moved from Postgresql
> to MongoDB.
> DB sure, but last time I checked django never took *any* control of my HTML (unless I specifically ask it to by rendering a form directly, and *even then* you can easily create your own form field widgets, or just render your forms manually)
>
> > So, what are the dependencies for "forms" and "db".  Obviously, I know
> > that most of the "contrib" package is out.  What else?  Cause I'm
> > thinking of maybe forking the Django project for my own use.
>
> Wait, why are you talking about the dependencies for db *and forms*?
>
> The ModelForms stuff depends on db as its purpose is to create forms *form models*, but forms themselves should be independent from models and useable regardless of your use of the Django ORM. And it's not like anybody forces you to use the built-in forms rendering.
>
> > Cause I'm thinking of maybe forking the Django project for my own use.
>
> Why would you *fork* django? Why not just stop using the ORM for your stuff (and stop using anything relying on the ORM obviously)? What would a fork bring you if your goal is just "I don't want to use the ORM"?
>
> And if what you want is a nonrel datastore interface, why not use django-nonrel[0]?
>
> [0]http://www.allbuttonspressed.com/projects/django-nonrel

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment