W liście Jan Koprowski z dnia środa 21 stycznia 2009:
In MVC *M*odel should be abstract layer of data and hide data
representation and real method access giving: universal, good
described, readable and simple interface to manage this data: add,
remove, get all, get one etc... methods.
One
Just to announce the release of evoque 0.4, see posting below.
And, dedicated docs for using evoque specifically with various python
web frameworks are available, e.g:
[qp] http://evoque.gizmojo.org/ext/qp/
[pylons] http://wiki.pylonshq.com/display/pylonscookbook/Templating
Cheers, mario
Agreed.. data persistence should never be tied to the domain model. That's
precisely the problem with ActiveRecord (sic Django/RoR)
style of db development. It's treated as an afterthought when in fact, the
database is the most common point of contention within any web application
and usually
On Wed, Jan 21, 2009 at 2:00 AM, Jan Koprowski jan.koprow...@gmail.com wrote:
What's the problem with SQLAlchemy ? My class (for example User)
mapped by SQLAlchemy mapper doesn't have any additional methods. My
tool is meta.Session.query and my code use this. So, when I move my
data to my
chris mollis wrote:
Agreed.. data persistence should never be tied to the domain model.
That's precisely the problem with ActiveRecord (sic Django/RoR)
whoa, first Django and RoR do work for thousands of people / sites.
The question is can something else work even better? The goal is
On Jan 21, 2:00 am, Jan Koprowski jan.koprow...@gmail.com wrote:
In MVC *M*odel should be abstract layer of data and hide data
representation and real method access giving: universal, good
described, readable and simple interface to manage this data: add,
remove, get all, get one etc...
@Paweł Stradomski
University of Technology in Gdańsk
Ok. I understood this. But - i must wrote this methods. Simple CRUD
isn't something bad. SQLAlchemy could support something like this:
class User(SQLAlchemy.CRUD):
pass
and give optionaly something like in django. This will be nice.
W liście MilesTogoe z dnia środa 21 stycznia 2009:
chris mollis wrote:
Agreed.. data persistence should never be tied to the domain model.
That's precisely the problem with ActiveRecord (sic Django/RoR)
whoa, first Django and RoR do work for thousands of people / sites.
The question is
On Jan 21, 11:33 am, Jan Koprowski jan.koprow...@gmail.com wrote:
@Paweł Stradomski
University of Technology in Gdańsk
Ok. I understood this. But - i must wrote this methods. Simple CRUD
isn't something bad. SQLAlchemy could support something like this:
class User(SQLAlchemy.CRUD):
W liście Jan Koprowski z dnia środa 21 stycznia 2009:
def __new__(cls, *args, **kwargs):
if 'username' in kwargs.keys():
uid = getpwnam(kwargs.get('username')).pw_uid
if 'uid' in kwargs.keys():
uid = kwargs.get('uid')
# @todo - poprawic
On Jan 21, 11:48 am, Paweł Stradomski pstradom...@gmail.com wrote:
What exactly are you trying to achieve?
one of the tenets of activerecord is that constructing an object with
a primary key returns the existing object implicitly.
my example meant to read:
def __new__(cls, *args,
W liście Michael Bayer z dnia środa 21 stycznia 2009:
On Jan 21, 11:48 am, Paweł Stradomski pstradom...@gmail.com wrote:
What exactly are you trying to achieve?
one of the tenets of activerecord is that constructing an object with
a primary key returns the existing object implicitly.
2009/1/21 Jan Koprowski jan.koprow...@gmail.com:
Ok. I understood this. But - i must wrote this methods. Simple CRUD
isn't something bad. SQLAlchemy could support something like this:
class User(SQLAlchemy.CRUD):
pass
and give optionaly something like in django. This will be nice...
On Wed, Jan 21, 2009 at 08:33:03AM -0800, Jan Koprowski wrote:
IMHO this could be standard for all classes (why not). I understood
this SQLAlchemy forces you to write your own class methods wrap
meta.Session - but this isn't cool :P because i waste my time :P
Don't wrap meta.Session. That's
Personally, I reckon that if a response shouldn't contain any content, then
it stands to reason that a content-type header is pointless (why tell the
browser what type of data the non-existent content has?). As such, I'd
imagine the interpretation is strict but valid.
Regards,
Domhnall.
Well, Pylons and webob.Response are geared for the normal case of
sending HTML documents. If you do something different, you have to
set all necessary headers yourself. That's what the
redirect/redirect_to() and abort() functions do; change the headers to
match common scenarios. Perhaps abort
On 21 Sty, 18:53, Ross Vandegrift r...@kallisti.us wrote:
It seems like you're putting a square peg in a round hole.
I don't think so. My goal is just to made abstraction layer and this
forces me to wrap Session. Thats all. Methods line def add() wher i
use add and session method one by
Hey everyone,
Is there a good place in a pylons project to put data files that need
to be used by the app at various places? They don't need to be web
accessible - strictly internal stuff.
In this case I have some XSLT sheets that I need to load on demand.
Easy enough to add one if I need to,
If you're authoring them, a good place would probably be a subfolder
of config or lib of the distributions app folder.
If these are automatically generated / cached, i like to put them in
the data folder of the distribution. i also use prefixing/reverse
namespace to avoid collisions
ie:
i store a lot of stuff in config, much of which is 'framework' related
across modules.
the current way i deal with bools is this ( by storing things in
app_globals during init )
g.enable_feature_x= False
if 'org.opensn.pylons.enable_feature_x' in config:
On Wed, Jan 21, 2009 at 2:55 PM, Ross Vandegrift r...@kallisti.us wrote:
Hey everyone,
Is there a good place in a pylons project to put data files that need
to be used by the app at various places? They don't need to be web
accessible - strictly internal stuff.
In this case I have some
If you mean what is the best practise to convert bools, PasteDeploy
provide a few helpers:
from paste.deploy.converters import asbool
I also have this in helpers.py (don't know why I can't find something
similar in the paste namespace):
class Params(dict):
def __getattr__(self, attr):
22 matches
Mail list logo