Re: Expression Engine for Django?

2009-01-29 Thread Sean Perry
On Thu Jan 29 13:49 , "maltebeckm...@mac.com" sent: > >I am an Expression Engine (CMS) fan who recently got convinced that >Python is way cooler than PHP. Problem is that Expression Engine is >written in PHP. > >Is there an Expression Engine for Django, i.e. an installation package >that can b

Re: Any one knows equivalent non php plugin for this?

2009-09-28 Thread Sean Perry
On Mon Sep 28 15:04 , ydjango sent: > >http://www.frontpageslideshow.net/ > > >Anyone knows equivalent plugin of above which I can use in python/ >django site. > >The plugin above is in jquery and php. Most of the magic is in the javascript (they use jQuery) and CSS, integrating that with Dja

Re: Sick of defining urls

2009-12-03 Thread Sean Perry
On Thu Dec 3 8:42 , Todd Blanchard sent: > >I've read the little poem. I disagree with about half of it. If you can't >take constructive criticism of your toolkit (I have plenty negative to say about rails and any of the other dozen web app development environments I know too) then you sh

Re: Python 2.6 Decompile --- I lost my views.py but have the views.pyc

2009-12-17 Thread Sean Perry
On Thu Dec 17 11:28 , Bill Freeman sent: >I saw a demo of a byte code disassembler once. It won't get you the >source code back, but you could conceivably construct equivalent from >it. You can, for example, see what it's calling, and sketch out the >contiditionals and any loops. You could g

Re: Looping through my POST data?

2007-07-27 Thread Sean Perry
On Jul 27, 2007, at 10:36 PM, Greg wrote: > AssertionError at /rugs/cart/addpad/ > [u'0'] > > Does that mean that the value is 0? below is my view function and > template code: That little 'u' in front of the '0' means unicode so the value is the unicode string "0" not the number zero. Very di

Re: age in years calculation

2007-08-03 Thread Sean Perry
On Aug 3, 2007, at 9:57 AM, Doug Van Horn wrote: def age(d, bday): > ... return (d.year - bday.year) - \ > ... ((d.month, d.day) < (bday.month, bday.day) and 1 or 0) Or to be a little more explicit about it: def age(d, bday): return (d.year - bday.year) - \

Re: url styling

2007-08-09 Thread Sean Perry
On Aug 9, 2007, at 10:21 PM, james_027 wrote: > > hi, > > is there any advantage or disadvantage or best practices in forming > urls? like which set are much better? > > domain/employee/1 > domain/edit_employee/1 > domain/inactive_employee/1 > > or > > domain/employee/1 > domain/employee/1/edit/

Re: Row level security

2007-08-20 Thread Sean Perry
On Aug 20, 2007, at 6:41 PM, Catriona wrote: > > Hello > > Is there a way to implement row level security where a user can > determine who can do what to particular records - ie invoices? The > default would be full access only to the creater. > > I am looking at implementing a ContactInvoiveRole

Re: non-event driven method called?

2007-08-23 Thread Sean Perry
On Aug 23, 2007, at 12:12 PM, John Menerick wrote: > Inside my django app, regardless of the events of my django- > application, I would like to call a method every minute. Since > Django is heavily event driven, I'm at a loss as how to make this > work. I'm looking for a way to make this

Re: Importing Excel/CVS into Database

2007-08-24 Thread Sean Perry
On Aug 24, 2007, at 3:27 PM, robo wrote: > > Wow, your tip works like a charm. > > Do you personally know of a good tutorial that teaches things like > this? I'd like to read them. > 1) read a Python book. Several good ones to choose from. Once you understand how the language works and how to "

Re: Django on Nokia 770?

2007-09-05 Thread Sean Perry
On Sep 5, 2007, at 4:16 PM, Steve Bergman wrote: > > Does anyone have comments about the possibility of running a django > server on the Nokia 770? Is it possible? I have a simple app that I > want to demo on it with both the django server and the browser running > on the same device. > Shoul

Re: Django is more?

2008-01-05 Thread Sean Perry
Jeff Anderson wrote: > Does anyone else use django for a framework? > > Jeff Anderson > Django is the back end for my home multimedia system (-: The web interface is nice, but during initial design I have simple scripts like the following which plays a random 3 songs from each artist in the

Re: advice on table joins

2008-01-10 Thread Sean Perry
Ken wrote: > I need some advice. I'm struggling with a query that spans 4 tables. > "Struggling" is a bad word; I'll explain later. Django uses a model- > oriented query system together with a Foreign Key manager to get to > the "next" joining table. A query that spans several tables results >

Re: How to implement funky caching

2007-09-22 Thread Sean Perry
On Sep 22, 2007, at 10:26 AM, julian.bash wrote: > > Thanks a lot for your answers! > > The even greater thing with funky caching is that the webserver only > has to serve html (if there is a cached version) and doesn't have to > run django. So, django's normal caching is good, but when the serve

Re: keeping SECRET_KEY secret

2007-11-03 Thread Sean Perry
On Nov 2, 2007, at 6:02 AM, James Bennett wrote: > Personally I wonder if this is due to a conception that the *project* > is somehow the deliverable; I can understand how that conception would > be easy to form from the documentation, and I've suggested more than > once that the docs should empha

newforms and multiple forms objects in one html form question

2007-11-03 Thread Sean Perry
I have a html form which will create an instance of a model plus its m2m relations. So you have something like: MainModelField1 MainModelField2 MainModelField3 ... m2mModelField1a, m2mModelField1b, m2mModelField1c m2mModelField2a, m2mModelField2b, m2mModelField2c ... hidden_count In my view

Re: does is_valid handle unique=True

2007-11-09 Thread Sean Perry
Kenneth Gonsalves wrote: > hi, > > I was using form_for_model with one field which has unique=True. This > form passes the is_valid test, but postgres barfs on the duplicate > entry - am I doing something wrong, or does is_valid not handle > unique=True? is_valid simply validates that the

Re: Can I run Django on my Sun-Ray?

2007-11-24 Thread Sean Perry
walterbyrd wrote: > I'm running Solaris 10. I have Python. I am not looking to build a > production site. Just trying to learn some django during dead time. > > I'm not sure what to do about a database. I don't think I can install > mysql or postgresql - maybe sqlite. Django runs on the Nokia we

question about custom orderings

2007-11-30 Thread Sean Perry
say I have the following classes: class Foo(models.Model): name = models.CharField(max_length=30) number = models.PositiveSmallIntegerField() def __unicode__(self): return u"%s(%d)" % (self.name, self.number) class Meta: ordering = ['name',] class FooColle

Re: Do away with django's support for python 2.3?

2007-12-01 Thread Sean Perry
AmanKow wrote: >> Also, in practice, there are a *lot* of >> installations still running Python 2.3. Sometimes it's just not >> convenient to upgrade your Python installation every couple of years. > > I understand that. But, with 2.6 coming soon and 3.0 on the horizon, > it seems that continue

custom ordering on related objects

2007-12-10 Thread Sean Perry
Say we have: class Foo(models.Model): title = models.CharField(max_length=128) number = models.PositiveSmallIntegerField() bar = models.ForeignKey('Bar') class Meta: ordering = ['title',] class Bar(models.Model): title = models.CharField(max_length=128) c

Re: create models from the admin page?

2006-05-03 Thread Sean Perry
James Bennett wrote: > Going further, it seems to me that, rather than encouraging the design > of good, well-thought-out models, building models through a web > interface would encourage a slapdash "if we get it wrong we'll just go > into the web interface and change it" mentality, which would be

trunk doc confusion

2006-05-03 Thread Sean Perry
Following the new tutorial this morning I ran into a few problems: * tutorial and other docs go back and forth between Poll and Blog apps. Choosing one would be nice. * __str__ vs __repr__ The tutorial01 says defining __str__ will then cause Model.objects.all() to show a human readable string,

Re: Tutorial 2 - Admin

2006-05-03 Thread Sean Perry
Luke Plant wrote: > On Wednesday 03 May 2006 17:51, Kenneth Gonsalves wrote: > >> when making major upgrades, sometimes old .pyc files remain giving >> errors like this. Nuking subversion is the best solution > > Or, if you use *nix this will be a bit less drastic and faster: > > find your/djan

Re: Alternative to PIL (Python Imaging Library)?

2006-07-13 Thread Sean Perry
Carlos Yoder wrote: >>> Is there a way around PIL? Can Django use another kind of library? If >>> not, has anyone got around this? Maybe by getting a precompiled Linux >>> PIL? > >> http://packages.debian.org/unstable/python/python-imaging >> ? > > Don't think so. I don't have root access to my

Re: Django Models, DRY, Scalability

2006-08-22 Thread Sean Perry
bayerj wrote: > As soon as I change my database schema, I have several possibilites to > get my app up again: > (a) Change the model. Then drop the current db schema, fire up the new > one. Drawback: I lose my data. > (b) Change the model and change the schema manually. Drawback: I am > repeating

Re: Rolling my own basic authentication?

2006-08-25 Thread Sean Perry
magus wrote: > I'd like to roll my own basic authentication for a web service, i.e. I > don't want to use the contrib.auth module. If possible I'd like to > avoid relying on the server for this. Anyone who can offer some > pointers on how to raise a 401 on a request that doesn't contain the > Auth

Re: Rolling my own basic authentication?

2006-08-25 Thread Sean Perry
magus wrote: > Yes, but "cheapness" is only one of my concerns. I have two bigger > concerns: > > 1. By limiting the external dependencies (i.e. the number of django > modules I use) I will lower the risk of being hit by a bug that I don't > control. > 2. AFAICS the session is represented by a

Re: manage.py: error: no such option: -u

2006-09-03 Thread Sean Perry
petrov wrote: > Hi, > > i am not sure how everyone else does this but here goes. > > I have some sample data in xml. so, i converted added the "insert into > ...values(..) " format and placed into the myapp/sql/myapp.sql > > at this pont i wanted to clear the table and add the sample data. > ho

confusion with ManyToMany relation on self

2006-09-04 Thread Sean Perry
Consider: class Foo(models.Model): related = models.ManyToManyField('self') suggestions = models.ManyToManyField('self') Both should be symmetrical. If A suggests B, B suggests A (for this code base anyways). What I expected to happen is adding B to A would add A to B. Instead I get:

Re: confusion with ManyToMany relation on self

2006-09-04 Thread Sean Perry
Russell Keith-Magee wrote: > On 9/4/06, Sean Perry <[EMAIL PROTECTED]> wrote: >> >> So according to this, I am doing things correctly and should not get an >> error. Bug? Code change without document update? > > > Yes, this seems to be a bug. The documentati

Re: confusion with ManyToMany relation on self

2006-09-04 Thread Sean Perry
http://code.djangoproject.com/ticket/2653 --~--~-~--~~~---~--~~ 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

understanding regroup

2005-11-15 Thread Sean Perry
I have the following classes in my model: class Category: description = charField() class Thing: self.description = charField() self.category(ForeignKey, Category) I would like a page layed out like: Category1 * foo * bar * baz CategoryX * woo * war * waz etc. The {% regr

Re: understanding regroup

2005-11-15 Thread Sean Perry
Jacob Kaplan-Moss wrote: On Nov 15, 2005, at 2:15 AM, Sean Perry wrote: The {% regroup %} tag looked promising, but I can not get it to work. {% regroup user.get_thing_list|dictsort:"category" by category as grouped %} You have to group by actual fields (and not relation

Re: understanding regroup

2005-11-15 Thread Sean Perry
Robert Wittams wrote: Would: {% regroup user.get_thing_list|dictsort:"category_id" by category_id as grouped %} {% for category in grouped %} {{ category.list.0.get_category.description }} {% for entry in category.list %} {% endfor %}

Re: Comments on Ruby code slides from Snakes and Rubies?

2005-12-14 Thread Sean Perry
Afternoon wrote: On 14 Dec 2005, at 12:04, [EMAIL PROTECTED] wrote: Its another surplus layer which complicates the process. That's one way to look at it, but the other is that the Django model contains more information than an SQL create statement. It centralises all information abou

Re: making photo gallery

2006-01-05 Thread Sean Perry
Kevin wrote: return map(*([None] + [value[i::cols] for i in range(0, cols)])) Nice, but why use all of that magic? return [value[i:i+cols] for i in range(0, len(value), 4)] your version actually returns [(1,2), (3,4)], iow a list of tuples.

Re: making photo gallery

2006-01-05 Thread Sean Perry
Sean Perry wrote: Kevin wrote: return map(*([None] + [value[i::cols] for i in range(0, cols)])) Nice, but why use all of that magic? return [value[i:i+cols] for i in range(0, len(value), 4)] your version actually returns [(1,2), (3,4)], iow a list of tuples. where that last 4

Re: rss problem

2006-01-26 Thread Sean Perry
While on the subject, my Nokia 770's RSS reader always believes there are new versions available of the main Django and the Django community blogs.

Re: Upcoming project... 0.91 or svn or magic-removal?

2006-02-08 Thread Sean Perry
ToddG wrote: I'm going to be starting a project in the next few weeks, and I was wondering what people recommend building on at this point. I've been exploring with the svn of trunk, but I'm not sure on what version of the codebase would be best to start a "real" project with. Any suggestions?

db-api.txt bug

2006-05-03 Thread Sean Perry
save_FOO_file(filename, raw_contents) - For every ``FileField``, the object will have a ``get_FOO_filename()`` method, where ``FOO`` is the name of the field. This saves the given file to the filesystem, using the given filename. If a file with the given file