RonnyPfannschmidt schrieb:
> while developing with django i encountered some ugly problems make my > work very hard > > > 1. sessions lack a direct relation to user, as well as a last-view > attribute > > this makes extensions like inactivity-logout, and statistics of online > members and guests unnecessary hard > > creating a extra table + middleware might be a solution, but it > wouldn't be a good solution *IMHO* > > 2. no support for relating objects to anonymous users in the database > > there is no support for anonymous users in django > > i hacked something myself, but every projects needs to relate data to > anonymous users will have its own solution, wich leads to decrasing of > interoperability and resuability of components in other projects wich > may allready have another solution for the anon-user problem > > haven't found a django-comaptible project wich addresses this problem, > some projects have a anon user by default using the id 1 > > > 3. limited expression power in templates > > sometimes i just need filters with 2 parameters or a deep loop on a > tree > > jinja, wich is inherited from djangos template engine addresses these > problems > i took a look and it seems like they did some good work enhancing the > templates while keeping application logic out of it > > take a look at http://wsgiarea.pocoo.org/jinja/ > > 4. lack of left join, no multiple pk's, small amount of db backends > > http://www.sqlalchemy.org/ addresses all of those > i dont see why django needs a own full orm layer, > in my opinion there is only need for a wrapper allows more pythonic > declaration of database models/relations > > since sqlalchemy rocks feature-whise - i'd say use it as backend, > it will save you work, debugging and add a few missing features > > 5. applications have no way to alter the output of other apps without > these apps knowing about them > > i think there is need for a few template tags allow template-writers to > add areas wich get their content from hooks so one could add stuff like > > <div class="pre-footer"> {% hookarea "prefooter" %}</div> > > to a template, and hook it to add content depend on activated > applications like a online users extension, > or a menu system automatically adds menu item defined in some > per-application configurations > > also it would be nice if appliations automatically could register a > base-url in other url configs > > for example - if i got a extended-user-information application, wich > has some views, i want to be able to tell it, to register itself in the > main-app or a specific sub-application if it is enabled > > > 6. the sites framework is infexible > > IMHO there should be a build-in system to determine the actual site by > the request and a fitting manager > > it would be nice if there was a way to completely disable it, if its > not necessary for a project/env > > 7. there is no framework to roll own admin applications, and the > build-in admin is just for basic data management > > we all know this one ;P > > RonnyPfannschmidt Solution for sites class ModPythonHandler(BaseHandler): def __call__(self, req): # mod_python fakes the environ, and thus doesn't process SetEnv. This fixes that req.add_common_vars() os.environ.update(req.subprocess_env) class WSGIHandler(BaseHandler): def __call__(self, environ, start_response): import os add = {} for key in environ: if not key.startswith('wsgi'): add[key]=environ[key] os.environ.update(add) then just import os site = Sites.objects.get(domain=os.environ.get(SERVER_NAME)) --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---