dumpdata/loaddata through ssh

2010-07-29 Thread mack the finger
$ ./manage.py dumpdata some_app | ssh prgmr "cat | /srv/proj/manage.py loaddata" I'm trying to send fixtures over to my production server. Is there a one liner that can do this without creating an intermediate file? The above code doesn't seem to work. I get "No fixtures found" returned. -- You

lightning talks at djangocon

2010-08-19 Thread mack the finger
i submitted two talk proposals for djangocon, but neither was accepted. I can easily condense both topics into 5 minute presentations. I have never attended a "con" such as djangocon, so forgive me. How do lightning talks work? Do you "sign up" to do one right before the lightning talk session, or

defining models for unit testing only

2010-08-21 Thread mack the finger
I wrote a django 'app', thats basically just a class that takes a Queryset, some other information, and then outputs an HttpResponse object (it does some other things too). How do I write unit tests for this class? The app itself does not contain any models, yet the functionality of the class depen

app engine and the non-rel stuff going on lately

2010-08-24 Thread mack the finger
I'm considering starting a project, and am leaning towards using google app engine instead of the traditional LAMP stack. The problem is that with app engine, you can't use django models, or anything else that depends on django models, which means no modelforms, no admin, no authentication, no thir

Django admin for call center support?

2010-10-29 Thread mack the finger
I'm responsible for writing a customer service application for a django project, and it needs to be done by Monday (it's friday now). I'm currently getting it built with the Django Admin, but the bosses think the interface is too complex for the "knuckle-draggers" that commonly answer phones. I'm w

Getting started with generic relations

2010-12-05 Thread mack the finger
I can't quite wrap my brain around how to do generic relations. I have a `Receipt` model which is a receipt of a purchase. One of the fields is `item` which is a foreign key to a product model. I want to be able to not only have products, but other things that the user can buy. What do I need to d

Re: Getting started with generic relations

2010-12-06 Thread mack the finger
fields will be handled by the generic relation API. On Dec 6, 4:34 am, bruno desthuilliers wrote: > On 5 déc, 20:30, mack the finger wrote: > > > I can't quite wrap my brain around how to do generic relations. I have > > a `Receipt` model which is a receipt of a purchase.

createsuperuser with a custom User model

2013-02-10 Thread mack the finger
I created a custom User model. It has a few extra fields, most notably a "date_of_birth" field. Now when I try to crete a new superuser instance via the management command, I get this error: TypeError: create_superuser() takes exactly 4 arguments (3 given) My "create_superuser" manager meth

Re: createsuperuser with a custom User model

2013-02-10 Thread mack the finger
Ah, I didn't add my fields to REQUIRED_FIELDS, thanks. I was thinking createsuperuser would look at the fields I had included in create_superuser's signature... On Sunday, February 10, 2013 7:04:59 PM UTC-5, Russell Keith-Magee wrote: > > > On Mon, Feb 11, 2013 at 7:48

Need help with GeoDjango distance query.

2013-02-15 Thread mack the finger
http://stackoverflow.com/questions/14889780/distance-query-within-a-certain-distance-based-on-value-in-joined-table Basically I want all objects within a certain distance, AS WELL as within each object's preferred distance. -- You received this message because you are subscribed to the Google G

Handling huge fixtures

2011-01-14 Thread mack the finger
We have a feature of our django application where the user will enter a zipcode, and out site will lookup that zipcode against a database table and return the city and state. In order for us to do this, we have a ZipCode model, and a 22 thousand line initial_data.json fixture. The problem is th

len(qs.all()) != qs.count()

2011-01-18 Thread mack the finger
>>> p=EtilizeProduct.objects.all().using('etilize')[23424] >>> p.productdescription_set.all() [] >>> p.productdescription_set.count() 4 Does anybody have any idea why count() returns 4, but all() returns an empty list? I'm not using any custom routers. >>> str(p.productdescription_set.all().quer

Fabfile for a multi-server project

2011-02-08 Thread mack the finger
I'm working on building a fabric deployment for a project with a fairly complex environment. There will be 2+ app servers running django code, a few database servers running in some kind of master/ slave configuration, a rabbitmq server, a mail server, some load balancers, etc. There will be over 1