Re: Use of the ORM in long running (non web) daemon

2009-08-06 Thread Russell Keith-Magee
On Wed, Aug 5, 2009 at 10:12 PM, wam wrote: > > I am using the Django ORM to build and manipulate models from outside > of a web context and within a long running daemonized application. I'm > using the django ORM talking to a postgresql db for this processing > since the results of this external

Re: Django documentation site is SLOW

2009-08-07 Thread Russell Keith-Magee
On Fri, Aug 7, 2009 at 8:06 PM, Léon Dignòn wrote: > > I have an Intel C2D E2200 with 4 GB RAM. The Django docs are killing > my browser, it feels like FireSLUG instead of Firefox 3.5 . I don't know what to say. Your experience in no way matches my own. I use Safari and Firefox, and I certain

Re: subclassed ModelForms initial values behavior changed from 1.1beta to 1.1

2009-08-07 Thread Russell Keith-Magee
On Sat, Aug 8, 2009 at 10:17 AM, David Haas wrote: > > Fair enough.  I've got some style questions about the best way to do > what I want to do, but they're probably not so relevant here. > Something that might be relevant is this . . . is it worth submitting > a documentation patch for this issue

Re: django 0.96.4 does not has django.utils._os

2009-08-11 Thread Russell Keith-Magee
On Tue, Aug 11, 2009 at 8:37 PM, dongua wrote: > > /django/core/servers/basehttp.py > code: > from django.utils._os import safe_join > > but there does not has any _os.py in pacakge, and after install 0.96.4 > will can't runserver It appears that the security fix that was committed in r11354 was

Re: inspectdb and postgresql schema

2009-08-11 Thread Russell Keith-Magee
On Tue, Aug 11, 2009 at 10:41 PM, Marek Pietrucha wrote: > > Hello, > > I have a relational database written in PostgreSQL 8.4. I use > different schemas - not default public schema. I tried to inspectdb my > database but the output was clean. It looked like the inspectdb tool > didn't look in my

Re: Django aggregates and having

2009-08-11 Thread Russell Keith-Magee
On Wed, Aug 12, 2009 at 5:50 AM, lfrodrigues wrote: > > Hi, > > I'm having some problems with "having": > > I want to group by date and restrict to a given week, in my tests I > can do this: > select_data = {"d": """date_format(date, '%%U')"""} > ScoreHistory.objects.extra(select=select_data).valu

Re: Location of Change User admin template

2009-08-11 Thread Russell Keith-Magee
On Wed, Aug 12, 2009 at 10:24 AM, Karen Tracey wrote: > On Tue, Aug 11, 2009 at 4:14 PM, bfrederi wrote: >> >> I was browsing contrib/admin templates for the "Change User" template >> that allows you to change the user's permissions and such. I can't >> seem to find it though. Can anyone point me

Re: django 0.96.4 does not has django.utils._os

2009-08-12 Thread Russell Keith-Magee
On Wed, Aug 12, 2009 at 12:48 PM, dongua wrote: > after i download ] > http://code.djangoproject.com/browser/django/branches/0.96-bugfixes/django/utils/_os.py > and runserver: > > Development server is running at http://127.0.0.1:8000/ > Quit the server with CTRL-BREAK. > Unhandled exception in th

Re: inspectdb and postgresql schema

2009-08-12 Thread Russell Keith-Magee
On Wed, Aug 12, 2009 at 6:09 PM, Marek Pietrucha wrote: > > Thank you for the anwser :) > > It's not comforting but now I don't have to dig the whole google > achieve ;) > > In this case, how do I construct django models? I don't want to seem rude, but we provide an extensive documentation for a

Re: Concurrent Web Access and Edits

2009-08-12 Thread Russell Keith-Magee
On Tue, Aug 11, 2009 at 10:14 PM, Doug Blank wrote: > > New Django user here with a question about the client side: Is there > built-in support for dealing with concurrent edits? I'm not referring > to the database issues (locking, etc) but is there Django support for > handling a request to acces

Re: Django for workflow

2009-08-13 Thread Russell Keith-Magee
On Thu, Aug 13, 2009 at 4:21 PM, Caisys wrote: > > Hi Everyone, > I would like to develop a small internal tool in my company for > telesales agents to fill in orders of different products then finance > can approve them and send them to the shipping department. I was going > to use php and dreamw

Re: ANN: Grappelli 2.0 prerelease

2009-08-14 Thread Russell Keith-Magee
On Fri, Aug 14, 2009 at 4:43 PM, patrickk wrote: > > The prerelease of Grappelli 2 is out now. Just a quick suggestion - if you're going to go to the trouble of announucing a pre-release, you might want to mention what Grappelli _is_. Is it an application? A utility? A desert topping? Yours, Rus

Re: How good is Django's MySQL driver & its unicode support?

2009-08-14 Thread Russell Keith-Magee
On Sat, Aug 15, 2009 at 6:35 AM, Continuation wrote: > > I came upon this blog post: > http://lucumr.pocoo.org/2009/1/8/the-sad-state-of-mysql-python > > It doesn't exactly have good things to say about mysql-python (aka > MySQLdb) which I believe is the MySQL driver used by Django. Among > other

Re: Django and CouchDB

2009-08-18 Thread Russell Keith-Magee
On Tue, Aug 18, 2009 at 7:40 PM, Joshua Partogi wrote: > > > On Tue, Aug 18, 2009 at 8:17 PM, sjtirtha wrote: >> >> Hi, >> >> i found some Python API to access couchDB. >> I'm asking here for experience. > > Django model is really tight to RDBMS. You are going to have a hard time > making django

Re: Aggregation on expressions

2009-08-18 Thread Russell Keith-Magee
On Tue, Aug 18, 2009 at 9:21 PM, mettwoch wrote: > > Hi, > > Some time ago I asked if there is a way to aggregate on an expression > and I was told that it's not possible at the moment. I managed to use > a mix of aggregation and some arithmetics to reduce processing time by > a factor of 20 in cr

Re: Django and CouchDB

2009-08-18 Thread Russell Keith-Magee
On Tue, Aug 18, 2009 at 11:12 PM, sjtirtha wrote: > Yes, > > I do have interest to help on Object non-Relational Mapper. > Does Django has a kind of interfaces, where I can implement my own Object > non-Relational Mapper and inject it to Django? I don't want to seem rude, but this is one of those

Re: Aggregation on expressions

2009-08-20 Thread Russell Keith-Magee
On Tue, Aug 18, 2009 at 10:48 PM, mettwoch wrote: > > The whole thing behind that it is: I'm developing an invoicing/ > inventory application and I run into performance problems that might > require using raw SQL and admittedly I'm not an SQL expert and I > dislike the idea of doing so. > > I thou

Re: Django1.1 logs me out after few seconds inactivity

2009-08-20 Thread Russell Keith-Magee
On Fri, Aug 21, 2009 at 12:17 AM, Kelvan wrote: > > I've a big problem with user authentification, my application get an > username and a hashkey to verify if the user is logged in. I wrote a > function that check this, it worked fine to log in the user with: > > user.backend = 'django.contrib.aut

Re: Test Client: include HTTP_HOST parameter when following redirect?

2009-08-20 Thread Russell Keith-Magee
On Fri, Aug 21, 2009 at 2:23 AM, ringemup wrote: > > I'm writing an application that servers multiple domains with > middleware that depends on every request having an HTTP_HOST header. > This isn't a problem in the test client with normal GET requests > because I can set the HTTP_HOST parameter.

Re: Model-level data integrity constraints?

2009-08-20 Thread Russell Keith-Magee
On Fri, Aug 21, 2009 at 3:03 AM, William wrote: > > From what I read in the Django documentation and elsewhere on the Web, > I do not think it is possible to define arbitrary data integrity > constraints for a model beyond the options offered by each model field > type. Do I understand this correc

Re: TestCase bug?

2009-08-21 Thread Russell Keith-Magee
On Fri, Aug 21, 2009 at 6:38 PM, dmishe wrote: > > Ok, so i've testing my app, everything was ok, when suddenly postgres > started to throw errors (in log) like this: > > INSERT INTO "auth_permission" ("name", "content_type_id", "codename") > VALUES (E'Can add item_ > deferred_added_by_id_date_add

Re: Django1.1 logs me out after few seconds inactivity

2009-08-21 Thread Russell Keith-Magee
On Fri, Aug 21, 2009 at 9:10 PM, Florian Schweikert wrote: > In summary: > * On the server (etch) session flushes by request.user.is_authenticated() > (e.g session.user switched to anonymous without any findable reason) after a > while equal if session still marked active in database and cookie.

Re: Django ORM and Google Gears (or alternatives?)

2009-08-23 Thread Russell Keith-Magee
On Sun, Aug 23, 2009 at 11:23 AM, Victor Hooi wrote: > > heya, > > I've got a small project involving an ordering system web application. > One of the requirements is offline functionality (i.e. it will > function without a direct internet connection, at least on a limited > scale - e.g. they can

Re: saving M2M with through table behavior change - (r.10189 vs. r.10190)

2009-08-24 Thread Russell Keith-Magee
On Mon, Aug 24, 2009 at 6:27 AM, David Haas wrote: > > Hi: > > Yet again, I've run into a behavior change which seems to be linked to > svn revision 10190.  I've figured out a workaround for my code, but > I'm wondering if someone could provide some feedback if the change is > just a definition of

Re: too much GROUP BY columns in generated sql query

2009-08-25 Thread Russell Keith-Magee
On Tue, Aug 25, 2009 at 6:28 PM, peterf81 wrote: > > Hello, > what could be the problem when from this code : > >    reputation = Repute.objects.extra( >        select={'positive': 'sum(positive)', 'negative': 'sum > (negative)', 'question_id':'question_id', >            'title': 'question.title'}

Re: Adding tests to a patch

2009-08-26 Thread Russell Keith-Magee
On Wed, Aug 26, 2009 at 6:49 PM, Peter2108 wrote: > > I'm trying to help fix but #6138. I've done a patch for the code and a > separate test.py module. But someone ('Alex') added a request to > "Please put the tests in the same diff as the patch itself, it is > possible to use svn add locally". I'

Re: Temporary session directory

2009-08-28 Thread Russell Keith-Magee
On Sat, Aug 29, 2009 at 1:13 AM, John Barham wrote: > > I'd like to store per-session files so need a way to reliably create a > per-session temp directory.  Is it reasonable to use the > session.session_key to generate a unique name? It's a reasonable candidate. It's unique by definition. I can'

Re: Getting all unique values of a field with Django ORM

2009-08-30 Thread Russell Keith-Magee
On Mon, Aug 31, 2009 at 9:37 AM, stevedegrace wrote: > > Hi guys, > > I'm making a refback type linkback app for my hobby CMS. I want to > find all the unique page targets. I am thinking broadly of a couple of > ways to do it. One with the ORM sort of line this: > > targets = list(set([linkback.ta

Re: No Module named ... problem

2009-09-02 Thread Russell Keith-Magee
On Wed, Sep 2, 2009 at 11:38 PM, phoebebright wrote: > > And it's not a missing __init__.py program that I can see. > > Am trying to move a site to a new server - CentOS to Ubuntu and > version of python are changing from 2.4.3 to 2.5.2 and using wsgi now > instead of mod_python. > > I already hav

Re: Serializing with not just the query data but also some additional columns

2009-09-03 Thread Russell Keith-Magee
On Fri, Sep 4, 2009 at 11:58 AM, Andy McKay wrote: > > > On 2009-09-03, at 1:21 PM, Neeraj wrote: >> I am trying to serialize a queryset but for each row I want >> supplementary data that is appropriate to the context I am doing the >> serialization in. I might want to add a column to each row in

Re: Problem with content type creation order and data recovery scheme

2009-09-04 Thread Russell Keith-Magee
On Fri, Sep 4, 2009 at 4:57 PM, Joshua Russo wrote: > My goal here is to create a backup and recovery scheme, where recovery is > possible on any computer. > I've been performing incremental updates to an application that people have > started to use. The incremental updates seem to have created a

Re: Cloning/using Django admin without auth_ and django_ database tables?

2009-09-04 Thread Russell Keith-Magee
On Fri, Sep 4, 2009 at 1:31 PM, Ulf Kronman wrote: > > Hi all, > > I’m using Django to build an Intranet web interface to a big legacy > database running in a MS SQL Server. > With the help of the code from the guys over at the django_pyodbc > project (http://code.google.com/p/django-pyodbc/) I ha

Re: will dmigrations be merged into django codebase?

2009-03-25 Thread Russell Keith-Magee
On Thu, Mar 26, 2009 at 8:42 AM, Joshua Partogi wrote: > > Is there any chance dmigrations > (http://code.google.com/p/dmigrations/) will be merged into django > codebase? Because it removes the pain for db migrations :-D dmigrations is one of several database schema migration projects that exis

Re: Does the INSTALLED_APPS order of auth and contenttypes maters?

2009-03-25 Thread Russell Keith-Magee
On Thu, Mar 26, 2009 at 1:22 AM, @@ wrote: > Hi, > I run into a strange problem when i changed my code a little and then test > my apps. > In some tests(not the first) i got the error message below: ... > IntegrityError: (1452, 'Cannot add or update a child row: a foreign key > constrai > nt fail

Re: model filed with default type set in database

2009-03-25 Thread Russell Keith-Magee
On Thu, Mar 26, 2009 at 1:02 AM, mark wrote: > > so its not possible to model this in django? > >>  created timestamp without time zone DEFAULT now(), >>  number_polls integer DEFAULT 0, Depends on exactly what you are trying to achieve. Django doesn't support database-level defaults - Django's

Re: ManyToMany

2009-03-25 Thread Russell Keith-Magee
On Wed, Mar 25, 2009 at 9:54 PM, Bro wrote: > > Hi, > > I'm trying to use ManyToMany in 2 sens : > > --- > class Person(models.Model): >    name = models.CharField(max_length=128) >    groups = models.ManyToManyField(Group, through='Membership') > >    def __unicode__(

Re: Split Database Model for Replication: RW/RO

2009-03-26 Thread Russell Keith-Magee
On Thu, Mar 26, 2009 at 8:08 PM, Brett Parker wrote: > Doesn't that mean sessions would be broken, though? Public website > without write access to the database -> no session data... Only if you are using the database to store session data. Django provides several session backends as alternative

Re: Serialize references to foreign keys

2009-03-29 Thread Russell Keith-Magee
On Sun, Mar 29, 2009 at 9:49 PM, Kariem wrote: > > I tried using the serialization as documented in > http://docs.djangoproject.com/en/dev/topics/serialization/ and do > something along the lines of > >        json = serializers.get_serializer('json')() >        json.serialize(o, ensure_ascii=Fal

Re: TemplateDoesNotExist error when postmortem says it exists?

2009-03-29 Thread Russell Keith-Magee
On Mon, Mar 30, 2009 at 1:42 AM, Rob Hudson wrote: > > Wow, that was a tricky one to track down... ... > I take it that gets interpreted as a single value tuple.  D'oh!  That It does, operator precedence notwithstanding (for example, a lambda expression returning a tuple that is being used as an

Re: Django 1.0 Template Book

2009-03-30 Thread Russell Keith-Magee
On Tue, Mar 31, 2009 at 10:45 AM, nick wrote: > > Has anyone bought and read "Django 1.0 Template Development" by Scott > Newman? I'd like to know your opinion before I get it. Luke Plant (one of the Django core developers) reviewed it on his website a while back: http://lukeplant.me.uk/blog.ph

Re: Django 1.1 beta, problem with group_by and extra()

2009-03-31 Thread Russell Keith-Magee
On Tue, Mar 31, 2009 at 4:15 PM, Eric Bandel wrote: > Hi, i've just upgrade my django install from 1.1 alpha to 1.1 beta. > > i have a simple query. > > data = mymodel.objects.extra(select={'month':'month(date)', > > 'test':'SUM(IF(ok,0,ok)}) > data.query.group_by = [''month] > > with the 1.1 alp

Re: Easy API for Ordered ManyToMany Relation Fields

2009-03-31 Thread Russell Keith-Magee
On Wed, Apr 1, 2009 at 3:48 AM, Aryeh Leib Taurog wrote: > > 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

Re: Fixtures for django.contrib.sites.Site

2009-04-01 Thread Russell Keith-Magee
On Thu, Apr 2, 2009 at 5:49 AM, Adam Nelson wrote: > How do I do a fixture for the Site model?  I've tried all sorts of different > model names > [ >   { >     "model": "sites.site", >     "pk": 1, >     "fields": { >       "domain": "example.com", >       "name": "Example" >     } >   }, > ] > A

Re: Sync db and model

2009-04-01 Thread Russell Keith-Magee
On Thu, Apr 2, 2009 at 7:58 AM, MartinBorthiry wrote: > > Hello: > >  We are using django-evolution to sync our model with the db, but we > have some issues. > >  Which is the best way to keep synchronized our model and db? > >  We want to keep the previous data into db. You're going to need to

Re: Error creating test database

2009-04-02 Thread Russell Keith-Magee
On Thu, Apr 2, 2009 at 9:23 PM, Andrew G. wrote: > > I have a django app that is built against an existing database.  In > the database, there are a couple tables used as the many-to-many > relation lookup table.  However, I have mapped models to the many-to- > many lookup table, since I have a n

Re: django.contrib.auth user password decryption

2009-04-05 Thread Russell Keith-Magee
On Sun, Apr 5, 2009 at 6:12 AM, Joshua Partogi wrote: > > > > On Apr 4, 11:49 pm, Masklinn wrote: >> On 4 Apr 2009, at 15:38 , Joshua Partogi wrote: >> >> > Dear all, >> >> > I already take a look at the django.contrib.auth.models but could not >> > find any methods for decrypting the user passw

Re: Error creating test database

2009-04-06 Thread Russell Keith-Magee
On Mon, Apr 6, 2009 at 10:03 PM, Andrew G. wrote: > > Specifying "through" instead of "db_table" did not raise any errors, > but it caused the relevant field in the admin change form to > disappear! This is to be expected. m2m intermediate tables don't get the same treatment in the admin as norm

Re: Still Learning...!

2009-04-06 Thread Russell Keith-Magee
On Tue, Apr 7, 2009 at 2:14 AM, dls wrote: > > I think the easiest way to get started is to follow the "Creating a > project" instructions from the Django documentation: > > http://docs.djangoproject.com/en/dev/intro/tutorial01/#intro-tutorial01 > > It is my understanding that these steps are nec

Re: Still Learning...!

2009-04-07 Thread Russell Keith-Magee
On Tue, Apr 7, 2009 at 7:41 PM, dls wrote: > > Russ - can you name some of the books and blogs that are devoted to > this? I'm interesting in seeing how Django would be used as a > component of a larger site, instead of "being the site". I'm an > embedded engineer, so web programming is still pre

Re: Replacing select in admin forms

2009-04-07 Thread Russell Keith-Magee
On Wed, Apr 8, 2009 at 1:43 PM, Garth wrote: > > I have noticed that admin forms where it is possible to select from a > list for a related entity (specified by a foreign key) take a long > time to load if the related entity has more than a few hundred rows. > Is this a problem that others have e

Re: Ignore Fixtures or Skip Fixtures

2009-04-08 Thread Russell Keith-Magee
On Wed, Apr 8, 2009 at 10:27 PM, Adam Nelson wrote: > > Is there any way to ignore fixtures when running syncdb?  I'm using > django-command-extensions and when using runscript from a previous > datadump, I get a unique index violation.  I'd like to be able to > ignore fixture imports. 1) Yes -

Re: Ignore Fixtures or Skip Fixtures

2009-04-08 Thread Russell Keith-Magee
On Thu, Apr 9, 2009 at 12:25 AM, Adam N wrote: > > > > On Apr 8, 11:13 am, Russell Keith-Magee > wrote: >> On Wed, Apr 8, 2009 at 10:27 PM, Adam Nelson wrote: >> >> > Is there any way to ignore fixtures when running syncdb?  I'm using >> >

Re: Aggregates with multiple (conflicting) conditions?

2009-04-09 Thread Russell Keith-Magee
On Thu, Apr 9, 2009 at 12:29 PM, Adam Seering wrote: > > Hey, >        I have a table setup that boils down to something like the following: > > class MyUser(models.Model): >        type = models.IntegerField() > > class MyStuffs(models.Model): >        stuffs = models.ForeignKey(MyUser) > > I wo

Re: Selecting date formats for aggregate calculations from database with Django

2009-04-09 Thread Russell Keith-Magee
On Fri, Apr 10, 2009 at 5:23 AM, Andrew C wrote: > > I would like to do aggregate calculations based on month for a > datetime field. This feature request has been made before; it's logged as ticket #10302. > I am currently using the extra() function to format the date like: > > ...extra(select

Re: Generic relations and unit tests.

2009-04-10 Thread Russell Keith-Magee
On Sat, Apr 11, 2009 at 5:53 AM, Poromenos wrote: > > Hello, > I created a model that has a ForeignKey to ContentType, but now I > can't use my test fixtures, since the IDs they point to are random > every time the test database is created. I can't dump the contenttypes > data because then I get

Re: Unittests

2009-04-15 Thread Russell Keith-Magee
On Thu, Apr 16, 2009 at 5:04 AM, Daniel Joshua Worth wrote: > I'm trying to learn unit test and have a unit test for a model in test.py > and have a test set up to fail. > When I run manage.py test it returns that all tests are OK. > If I run manage.py test it returns OK. > If I run manage.py te

Re: Why does dumpdata, flush, loaddata cycle not result in same db content?

2009-04-15 Thread Russell Keith-Magee
On Thu, Apr 16, 2009 at 10:43 AM, Phil Mocek wrote: > > I have a simple project using the flatpages app.  If I use > manage.py to run dumpdata (with no command line arguments, > redirecting output to a file), then flush, then loaddata (with no > command line arguments, redirecting input from a fi

Re: manage.py loaddata fails to report error [was: Why does dumpdata, flush, loaddata cycle not result in same db content?]

2009-04-16 Thread Russell Keith-Magee
On Thu, Apr 16, 2009 at 11:30 AM, Phil Mocek wrote: > > On Thu, Apr 16, 2009 at 11:03:33AM +0800, Russell Keith-Magee wrote: >> Loaddata doesn't take input from stdin - it loads files that are >> specified on the command line. > > Thanks, Russell. > > I should

Re: proposal to allow loaddata to read from stdin [was: manage.py loaddata fails to report error]

2009-04-17 Thread Russell Keith-Magee
On Fri, Apr 17, 2009 at 3:56 PM, Phil Mocek wrote: > > However, due to long-standing conventions, the filename suffix > ("extension" in MS-DOS parlance) often provides a clue about the format > of the data within.  These conventions allow loaddata to make a > reasonable guess about the content of

Re: Unittests

2009-04-17 Thread Russell Keith-Magee
On Sat, Apr 18, 2009 at 5:32 AM, Alex Gaynor wrote: > > On Fri, Apr 17, 2009 at 5:28 PM, Daniel Joshua Worth > wrote: >> >> Of course that worked. I would like to put a plug in for adding that the >> tests need to begging with test in the docs. Would have saved me some >> trouble. Thank you guys

Re: Unittests

2009-04-17 Thread Russell Keith-Magee
On Sat, Apr 18, 2009 at 8:06 AM, Daniel Joshua Worth wrote: >> No - please don't. The Django docs explicitly state that Django's test >> framework is based on Python's unittest and doctest frameworks, and >> provides links to the docs for those frameworks. It's not our place to >> including "how

Re: Turning password reset

2009-04-21 Thread Russell Keith-Magee
2009/4/21 Filip Gruszczyński : > > Hi! > > I don't have password reset in my project and the base test suite > fails because of this. Can I somehow turn of these tests until I > decide to add password reset? Short answer - no. There is not currently any way to skip a test or disable a test suite,

Re: Can I use the django test server for this?

2009-04-21 Thread Russell Keith-Magee
On Wed, Apr 22, 2009 at 8:15 AM, Kevin Audleman wrote: > > I've been moving forward with the django server option and have come > across an oddity: while I can access my site on the resident machine > via http://localhost:8000, if I try to access it from another machine > on the network via http:

Re: dynamically testing for response.context or response.context[0]

2009-04-22 Thread Russell Keith-Magee
On Thu, Apr 23, 2009 at 5:06 AM, meppum wrote: > > sorry to bring this up again in a different thread, but the old thread > was locked: > http://groups.google.com/group/django-users/browse_thread/thread/4fe2774b35b14b82/5af08bf613ba1f4c?lnk=gst&q=meppum+template+test#5af08bf613ba1f4c > > is there

Re: rude, curt, and impatient, or direct, cut-through-the-B.S. communications? [was: Webpy vs Django]

2009-04-23 Thread Russell Keith-Magee
On Thu, Apr 23, 2009 at 10:19 PM, Phil Mocek wrote: > > On Thu, Apr 23, 2009 at 06:58:53AM -0700, joeygartin wrote: >> Their inner sorrow is projected out in a form of rage and that usually >> (hopefully) only comes out as rude, curt and inpatient. > > That's a common misperception. > >

Re: rude, curt, and impatient, or direct, cut-through-the-B.S. communications

2009-04-24 Thread Russell Keith-Magee
On Fri, Apr 24, 2009 at 1:16 PM, Phil Mocek wrote: > > On Fri, Apr 24, 2009 at 10:46:46AM +0800, Russell Keith-Magee wrote: >> 2) If you would stop changing the subject line of discussions every >> time you respond, that would be just dandy, too. Rapid-fire subject >> c

Re: ManyToMany relationship being 'lost'?

2009-04-24 Thread Russell Keith-Magee
On Sat, Apr 25, 2009 at 2:32 AM, Rubens Altimari wrote: > Hello, > Sorry if this is a known issue, but I didn't find anything elsewhere. > I have these two models related by a many-to-many relationship. I'm using > the 'default' admin application to edit data, and in order to be able to > edit bo

Re: FileField uploading into an user-specific path

2009-04-28 Thread Russell Keith-Magee
2009/4/29 Julián C. Pérez : > > anyone?? > how can i make that happen?? You asked your original question 4 hours ago. This is an international mailing list. Many of the audience for your message are asleep. Please show some patience. If you have a more immediate need please try a more immediate

Re: annotation and grouping

2009-04-29 Thread Russell Keith-Magee
On Wed, Apr 29, 2009 at 4:08 PM, omat wrote: > > Hi all, > > I would like to fetch the latest entries for each user from a model > like: > > class Entry(models.Model): >    user = models.ForeignKey(User) >    entry = models.TextField() >    date = models.DateTimeField(auto_now_add=True) > > Is it

Re: Do you know about Django 1.1 current status

2009-04-30 Thread Russell Keith-Magee
On Thu, Apr 30, 2009 at 2:29 PM, Alex Gaynor wrote: > > > On Thu, Apr 30, 2009 at 2:27 AM, chefsmart wrote: >> >> Hi, >> >> Am not sure whether Django-users or Django-developers is the better >> mailing list for this topic? However,... >> >> The Django roadmap for 1.1 estimated the release to be

Re: Databrowse

2009-05-04 Thread Russell Keith-Magee
On Mon, May 4, 2009 at 3:58 PM, skyl wrote: > > Who is working on databrowse?  What is the status?  Does anyone have > links where I can trac this app? django.contrib.databrowse is part of the Django core. This means that it is part of the normal Django development process. Anyone wishing to con

Re: cannot save in the admin site

2009-05-05 Thread Russell Keith-Magee
On Tue, May 5, 2009 at 6:07 PM, Lame Spirale wrote: > > I'm glad nobody is too upset about this :/ I don't mean to belittle your problem, but we haven't got too upset because you haven't given us anything to get upset about. Once you strip back the cursing, the full extent of the detail in your

Re: cannot save in the admin site

2009-05-05 Thread Russell Keith-Magee
On Tue, May 5, 2009 at 7:58 PM, Lame Spirale wrote: > > When i turn firebug on, and press "enregistrer" absolutely nothing > happens > > When i access the page the (development) server tells > [05/May/2009 13:28:38] "GET /admin/sites/site/add/ HTTP/1.1" 200 3093 > [05/May/2009 13:28:38] "GET /adm

Re: Separate Admin for each Site

2009-05-07 Thread Russell Keith-Magee
On Thu, May 7, 2009 at 11:31 AM, Steve R wrote: > > I’m looking to create an Admin so that when a user from one Site logs > into the admin they will not be able to see or modify entries for > other sites. ... > Do I need to subclass AdminSite in contrib.admin.sites.py?  Or modify > the Admin view

Re: Separate Admin for each Site

2009-05-07 Thread Russell Keith-Magee
On Thu, May 7, 2009 at 5:38 PM, modelmike wrote: > > Hi, > > How do I instantiate AdminSite for my app and then subclass > ModelAdmin? Like I said in my original email, if you interested in this problem, you're going to need to do a little digging of your own. This particular problem wasn't a sp

Re: Separate Admin for each Site

2009-05-07 Thread Russell Keith-Magee
On Thu, May 7, 2009 at 4:49 PM, Russell Keith-Magee wrote: > On Thu, May 7, 2009 at 11:31 AM, Steve R wrote: >> >> I’m looking to create an Admin so that when a user from one Site logs >> into the admin they will not be able to see or modify entries for >> other s

Re: Test suite for Django tutorial?

2009-05-08 Thread Russell Keith-Magee
On Sat, May 9, 2009 at 6:09 AM, Charles Anderson wrote: > > Before I go off and re-invent the wheel, does anyone have a unit/ > functional test for the Django poll tutorial (http:// > docs.djangoproject.com/en/dev/intro/tutorial01/)?  I ask because I'm > teaching a class on Python, and we're movi

Re: Seperate thread - best practices

2009-05-13 Thread Russell Keith-Magee
2009/5/14 Filip Gruszczyński : > > I would like to run additional process apart from the main server > thread, so it would periodically perform some operations (basically > check, if it should some info mails). Are there any best practices in > Django at which point to start this thread and use it

Re: ForeignKeys to MTI models break admin (as of 10756)

2009-05-14 Thread Russell Keith-Magee
On Fri, May 15, 2009 at 2:21 PM, Michael Strickland wrote: > > Hi all, > > I've recently encountered a problem that arose with revision 10756. > Say you have the following models: > > class Person(models.Model): >    name = models.CharField(max_length=20) > > class Student(Person): >    grad_year

Re: Composite keys

2009-05-15 Thread Russell Keith-Magee
On Sat, May 16, 2009 at 5:27 AM, Mike Driscoll wrote: > > Hi, > > I posted about this over a year ago and Jacob Kaplan-Moss said that > Django would eventually get composite key support, but he didn't know > when. Has anything changed?  I dug around for SqlAlchemy+Django links, > but they seem to

Re: additional data on ManyToManyField and symmetrical

2009-05-17 Thread Russell Keith-Magee
On Sat, May 16, 2009 at 6:14 PM, Alex Rades wrote: > > Hi, > I have a model which looks like: > > class Person(models.Model): >    friends = models.ManyToManyField("self", through="Friendship") > > class Friendship(models.Model): >   person_a = models.ForeignKey(Person) >   person_b = models.Fore

Re: how to identify if fix for ticket 7028 is in trunk?

2009-05-18 Thread Russell Keith-Magee
On Tue, May 19, 2009 at 8:24 AM, Margie wrote: > > I am looking at ticket #7028 and trying to figure out if the > associated fix is in the trunk.  It looks to me like the fix went into > the newforms-admin branch and when I look at my checked out trunk and > do: > > svn log RelatedObjectLookups.j

Re: Parsing the arguments in HTTP GET

2009-05-19 Thread Russell Keith-Magee
On Tue, May 19, 2009 at 10:38 PM, Andrew Ingram wrote: > > This is the only real way to do this with Django, though I do wish > there was a core Django way to validate GET params, ie which ones are > allowed and what format they should be. You mean, something like the Forms framework? :-) Ordin

Re: Recursive ManyToMany field question

2009-05-19 Thread Russell Keith-Magee
On Wed, May 20, 2009 at 12:57 PM, Adam Olsen wrote: > > I'm trying to make a tagging application.  I want to have tags that > have related tags, ie, if they choose the tag 'car', it should also > choose 'automobile'.  If they choose 'automobile', it should not > automatically choose 'car'.  I'm u

Re: Custom urlconfs in django.contrib.auth tests failing when reverse is used in templates

2009-05-21 Thread Russell Keith-Magee
On Fri, May 22, 2009 at 3:08 AM, Andrew Fong wrote: > > Figured this out somewhat: To get around this, you can do something > like this when referencing external apps in auth templates: > > {% url project.other_app.views.other_view as view %} > > This won't raise an error if that reference doesn'

Re: Question about django.views.generic.simple.redirect_to

2009-05-24 Thread Russell Keith-Magee
On Sat, May 23, 2009 at 4:56 AM, Nicolas Steinmetz wrote: > > Hi, > > I was thinking about something like the following in urls.py : > >     (r'(?P\w+)', 'django.views.generic.simple.redirect_to', > {'url': Shorturl.objects.get(slug=shortcut).url }), > > But I did not manage to make it work. > >

Re: Problem with loading fixture in testcase

2009-05-24 Thread Russell Keith-Magee
On Sat, May 23, 2009 at 12:59 AM, Stefan Tunsch wrote: > > Hi! > > I have a fixture in json format, which I want to start using together > with my test cases. > > I have deleted the data I didn't want from my development database and > have dumped the data with the following command: > manage.py

Re: Problem with loading fixture in testcase

2009-05-29 Thread Russell Keith-Magee
On Fri, May 29, 2009 at 4:57 PM, motard wrote: > > This does indeed seem to have relation with the contents of what is > being dumped to JSON. > > My experience is that simply dumping the data of a db will result in a > file that will not be loadable "as is". ... > So I'm not sure whether it make

Re: dumpdata and loaddata as simple DB migration tool?

2009-06-02 Thread Russell Keith-Magee
On Wed, Jun 3, 2009 at 12:06 PM, Kegan wrote: > > Hi, > > About Django database migration. I know there's a couple of tools > available (South, evolution, dmigration, etc), but I am pondering an > alternative here. Hope good discussion entails. > > This is what I am doing manually now for my data

Re: Possible memory leak moving to Django 1.1 from 1.0.2 in mixed use test.

2009-06-03 Thread Russell Keith-Magee
On Wed, Jun 3, 2009 at 1:22 AM, proteus...@gmail.com wrote: > > We've got an application that is running behind apache, mod_wsgi and > front ending a postgres 8.3 db. We needed to upgrade our Satchmo to > the latest version which requires Django 1.1.  After the upgrade the > system starts eventua

Re: dumpdata and loaddata as simple DB migration tool?

2009-06-03 Thread Russell Keith-Magee
On Wed, Jun 3, 2009 at 11:38 PM, Kegan Gan wrote: > > Hi Russell, > > On the first issue: Good point. I have not the opportunity to work > with such a huge database. > > On the second issue: Yes, what I am doing now is really about writing > conversion code to fit the old json to match the new sc

Re: dumpdata and loaddata as simple DB migration tool?

2009-06-03 Thread Russell Keith-Magee
On Thu, Jun 4, 2009 at 10:00 AM, Brian May wrote: > > On Tue, Jun 02, 2009 at 09:06:38PM -0700, Kegan wrote: >> 1. Use Django's management command "dumpdata" to get the JSON >> representative of an app. Save the JSON into a file (oldmodel.json). >> 2. Git pull the latest code. And do a reset to t

Re: dumpdata and loaddata as simple DB migration tool?

2009-06-03 Thread Russell Keith-Magee
On Thu, Jun 4, 2009 at 11:19 AM, Brian May wrote: > > On Thu, Jun 04, 2009 at 10:27:35AM +0800, Russell Keith-Magee wrote: >> If you're going to start throwing around claims that loaddata/dumpdata >> doesn't work, you _really_ need to back them up with a demonstrated

Re: Creating a temporary model in tests

2009-06-05 Thread Russell Keith-Magee
On Fri, Jun 5, 2009 at 5:28 PM, foxbunny wrote: > > Hi, > > I'm trying to figure out how to create tests for my PermaLib app. It > uses ContentTypes to store permalinks for any model in a Django > project. Since the app itself has only one model, and it has no > get_absolute_url() (obviously, beca

Re: How to group_by..

2009-06-05 Thread Russell Keith-Magee
On Fri, Jun 5, 2009 at 11:24 PM, Darren wrote: > > Hey, > > Would anyone be able to to help me convert this SQL to Django code? > > SELECT A.a, COUNT(B.b) > FROM A, B > WHERE A.id = B.a_id > GROUP BY A.id > ORDER BY A.id; It's impossible to give you a canonical answer without a complete Django mo

Re: How to group_by..

2009-06-05 Thread Russell Keith-Magee
On Sat, Jun 6, 2009 at 12:20 AM, Darren wrote: > > Fantastic, thanks! > > This is 1.1 only though correct? Apologies, I should have mentioned this. Yes, the syntax I gave will only work with Django trunk (soon to be v1.1) Yours, Russ Magee %-) --~--~-~--~~~---~--~---

Re: How to group_by..

2009-06-05 Thread Russell Keith-Magee
On Sat, Jun 6, 2009 at 7:55 AM, Alex Gaynor wrote: > > > On Fri, Jun 5, 2009 at 12:03 PM, Darren wrote: >> >> That's cool. You don't happen to have an updated estimate of the 1.1 >> release date by any chance? >> > At this point 1.1 will be released as soon as the last 30 or so bugs have > been f

Re: how to switch of autosaving for a m2m-relationship

2009-06-06 Thread Russell Keith-Magee
On Sat, Jun 6, 2009 at 5:11 PM, Julian wrote: > > hello, > > i have a queryset and a model with a manytomany-relationship, let's > say a pizza has toppings. > > my pizza margharita has already some toppings and now i retrieve a > queryset of some more and want to add them to the pizza: > > for top

Re: how many levels allowed in models

2009-06-08 Thread Russell Keith-Magee
On Mon, Jun 8, 2009 at 1:45 PM, jayvandal wrote: > > I have four tables > 1 Patient >      2 has many doctors >            3  doctor issues pills >                    4  order many pills > when I run syncdb I get the 3 levels showing in adminstrative screen. > I can't get it to show the order scre

Re: poll tutorial admin question

2009-06-09 Thread Russell Keith-Magee
On Tue, Jun 9, 2009 at 8:34 AM, zignorp wrote: > > Hello, > I'm getting going with the tutorial, it's so exciting to see the admin > panel, but I've got a problem with the breadcrumbs. > So I'm working from this page: > http://docs.djangoproject.com/en/dev/intro/tutorial02/#intro-tutorial02 > and

<    1   2   3   4   5   6   7   8   9   10   >