Re: SQL cast for custom model lookup

2013-10-16 Thread Aryeh Leib Taurog
On Tue, Oct 15, 2013 at 10:20:08PM +0200, Aryeh Leib Taurog wrote: > I'm working with <https://github.com/ecometrica/django-dbarray> > and I'm wondering if there's a way to get django to add an explicit > cast to the SQL generated for field lookups. > > I have a

SQL cast for custom model lookup

2013-10-15 Thread Aryeh Leib Taurog
I'm working with and I'm wondering if there's a way to get django to add an explicit cast to the SQL generated for field lookups. I have a model that looks like this: class Floats(models.Model): arr = FloatArrayField() Which translates

Re: Login failing

2012-11-20 Thread Aryeh Leib Taurog
> On Feb 22, 11:34 pm, "Aryeh Leib Taurog" <v...@aryehleib.com> wrote: >> I'm seeing a very strange intermittent problem with logging in.  The login >> appears to be successful, because the response to the login POST is a 302 >> redirect.  However sometim

Re: Automatic indexes on foreign keys

2012-03-25 Thread Aryeh Leib Taurog
On Mar 23, 3:56 pm, Javier Guerra Giraldez <jav...@guerrag.com> wrote: > On Fri, Mar 23, 2012 at 4:37 AM, Aryeh Leib Taurog <v...@aryehleib.com> wrote: > > > My understanding is that one usually > > wants an index on the *referenced* field, not the *referencing* &g

Automatic indexes on foreign keys

2012-03-23 Thread Aryeh Leib Taurog
With the following models: class Group(models.Model): group_name = models.CharField(max_length=10, primary_key=True) class Item(models.Model): item_name = models.CharField(max_length=10) group = models.ForeignKey(Group) class Meta: unique_together =

Re: Exception handling in templates

2012-03-10 Thread Aryeh Leib Taurog
On Mar 6, 10:40 am, bruno desthuilliers <bruno.desthuilli...@gmail.com> wrote: > On Mar 6, 7:07 am, Aryeh Leib Taurog <v...@aryehleib.com> wrote: > > > Sometimes self.get_another_object() returns an object which doesn't > > have attribute 'x' so my_title() rais

Re: Exception handling in templates

2012-03-05 Thread Aryeh Leib Taurog
On Mar 6, 7:41 am, Russell Keith-Magee <russ...@keith-magee.com> wrote: > On 06/03/2012, at 12:56 PM, Aryeh Leib Taurog wrote: > > > Did exception handling in templates change somewhere between Django > > 1.2.x and 1.3.x? > > > I have a callable which is di

Exception handling in templates

2012-03-05 Thread Aryeh Leib Taurog
. This is a major behavior change, so I'm surprised it doesn't seem to be documented anywhere. What am I missing? Aryeh Leib Taurog -- 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@google

Re: Login failing

2012-02-23 Thread Aryeh Leib Taurog
Also worthy of note: I've seen this happen also with SESSION_SAVE_EVERY_REQUEST = True On Feb 22, 11:34 pm, "Aryeh Leib Taurog" <v...@aryehleib.com> wrote: > I'm seeing a very strange intermittent problem with logging in.  The login > appears to be successful, because the

Login failing

2012-02-22 Thread Aryeh Leib Taurog
I'm seeing a very strange intermittent problem with logging in. The login appears to be successful, because the response to the login POST is a 302 redirect. However sometimes the user doesn't seem to be stored in the session. Here's a snippet from my http access log where my testing app was

Re: Is it possible to output a graph from Matplotlib into Django like this?

2011-04-12 Thread Aryeh Leib Taurog
On Apr 11, 1:21 pm, nai wrote: > Is there anyway I can return the image like this `return > render_to_response('template.html', {'graph': matplotlib or some other graphing package>}` As noted, images are almost always loaded independently. See, for example, "Definition

Re: Versioning an app and displaying in template

2011-04-02 Thread Aryeh Leib Taurog
On Apr 2, 1:42 am, "christian.posta" wrote: > I would like to get some feedback on how others display the version of > their apps to the users of the app. > > I tag each build/version of the app in SVN when I deploy to my > clients, but i'm trying to figure out a good

Re: Looking for development services

2011-03-27 Thread Aryeh Leib Taurog
On Mar 23, 6:22 pm, Aryeh Leib Taurog <v...@aryehleib.com> wrote: > My employer (not me) is looking for development services to build a > relatively small site/service with django. Let me explain what I mean by "relatively small." I think this could be a one or two

Re: ANN: Django 1.3 released

2011-03-24 Thread Aryeh Leib Taurog
On Mar 23, 8:15 am, James Bennett wrote: > Django 1.3 has been officially released. I have created a windows compiled html "help" file of the django 1.3 documentation. It is available at http://www.aryehleib.com/CHM.html I've also made available there chm files for

Looking for development services

2011-03-23 Thread Aryeh Leib Taurog
send sample work and pricing structure to dlev...@warmwisdompress.com. thanks! Aryeh Leib Taurog -- 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 th

Re: Importing modules in code

2011-02-16 Thread Aryeh Leib Taurog
On Feb 16, 12:21 pm, galago wrote: > My django runs on FastCGI as I can see. > I have that small part of the code: > > # Generate user register_hash >                 import hashlib >                 reg_hash = hashlib.md5() >                

Re: Django Mutlisite Setup

2011-02-15 Thread Aryeh Leib Taurog
On Feb 14, 5:08 am, Jason Drane wrote: > Forgive me if this question  offends you more advanced users. I am > begun down the road of learning Django. I am curious if it is possible > to place Django in the root of my server and reference it to each of > multiple sites in

Re: Questions about documentation management

2011-02-08 Thread Aryeh Leib Taurog
I forgot to mention: Python itself, as of 2.6 I believe, uses Sphinx http://docs.python.org/release/2.6/documenting/index.html -- 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.

Re: Questions about documentation management

2011-02-07 Thread Aryeh Leib Taurog
On Feb 7, 10:29 pm, anastasia wrote: Disclaimer: I'm not really responsible for django documentation, but have poked at it a bit, and am somewhat familiar with the platforms. > - What platform does Django use for its documentation? (e.g. a wiki? > DocBook?) Sphinx

Re: Sorting list view on based on field from joined table

2011-02-07 Thread Aryeh Leib Taurog
On Feb 7, 10:50 pm, SimpleDimple wrote: > I am new to django and building a school system but am experience > developer otherwise having firm grip over rails, php, .net and java. > > I can see the list and do sorting & search but only based on the > fields which are in

Re: read-only Form.as_* views

2011-02-07 Thread Aryeh Leib Taurog
On Feb 7, 10:57 pm, Ian Stokes-Rees wrote: > I love the fact that I can quickly and easily get a "view" of my objects in > Django, but is there any current way to get "read-only" views of objects > where fields are not editable?  I want to be able to display the

Re: how to make a datatime filed model without timestamp?

2011-02-06 Thread Aryeh Leib Taurog
On Feb 5, 1:04 pm, Nima Gaemi wrote: > hello, > i am using Djano 1.3 rev.15387 and i made a field > 'last_updated=models.DateTimeField(auto_now=True)' > when i wanted to get the data out of the database i wanted to get a > delta with datetime module of python but i was warned

Re: Having trouble creating instances of another model in the __init__ of one model

2011-02-06 Thread Aryeh Leib Taurog
On Feb 5, 5:09 pm, Daniel Klein wrote: > So I need to create the two teams for a new game instance when I > create the game instance? That just feels so clumsy. Doesn't seem so terrible to me, but if you're likely to do it in several places you could use a custom ModelManager

Re: DB-Views or read-only tables in models

2011-01-27 Thread Aryeh Leib Taurog
, but if you are using Django 1.2, you could probably make a read-only admin interface fairly easily: 1. See Chris Matthews' suggestion for removing the delete action 2. Supply your own admin template which won't include 'add' or 'save' buttons if the model is marked read-only 3 Subclass ModelAdmi

Re: Django Deployment Statistics (via djangosites.org)

2011-01-23 Thread Aryeh Leib Taurog
On Jan 23, 7:03 am, Ross Poulton wrote: > Hello fellow Django users, > > A long time ago I started collecting deployment information from > Django users submitting their websites towww.djangosites.org. I > promised at the time to make the stats public, and although i've > shared

Custom Model Select in Model Formset

2011-01-13 Thread Aryeh Leib Taurog
I have models that look something like this: class ProductGroup(models.Model): name = models.CharField(max_length=10, primary_key=True) def __unicode__(self): return self.name class ProductRun(models.Model): date = models.DateField(primary_key=True) def __unicode__(self): return

documentation in chm format

2010-12-27 Thread Aryeh Leib Taurog
I have compiled the documentation for various versions of Django to windows compiled html format. The chm files are available here: http://www.aryehleib.com/CHM.html I hope others will find them as useful as I do. Aryeh Leib -- You received this message because you are subscribed to the

Re: Easy API for Ordered ManyToMany Relation Fields

2009-04-03 Thread Aryeh Leib Taurog
On Apr 1, 3:11 am, Russell Keith-Magee <freakboy3...@gmail.com> wrote: > On Wed, Apr 1, 2009 at 3:48 AM, Aryeh Leib Taurog <v...@aryehleib.com> wrote: > > > I have an API implementation for ordered many-to-many relation fields > > which uses the Python lis

Easy API for Ordered ManyToMany Relation Fields

2009-03-31 Thread Aryeh Leib Taurog
I have an API implementation for ordered many-to-many relation fields which uses the Python list interface to allow easy data manipulation via the special manager associated with the field. I posted more information and a patch for the latest django release on my website: