Re: template modules like joomla

2009-09-15 Thread Randy Barlow
, then you can simplify this, but I think it's pretty simple as is! - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYE

Re: template modules like joomla

2009-09-15 Thread Randy Barlow
hing similar. Is it possible? Store your templates in the DB! - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmai

Re: python manage.py syncdb error (L@@K)

2009-09-14 Thread Randy Barlow
self). Should be: def __str__(self): - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http

Re: Django ORM - Table Changes

2009-09-10 Thread Randy Barlow
le that is to run ALTER TABLE yourself. Another way to do it is to dump the data from your DB to a serialized format (like JSON), alter that dump using REGEXes, build a brand new DB (using syncdb), and then load the serialized data into it. The latter is typically how we do it for our pro

Re: django & flex

2009-08-31 Thread Randy Barlow
ata. The AMF protocol allows the use of ordinary Python data types, so no need to worry about XML or JSON - just use strings, dicts, and lists as usual! - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: Gnu

Re: Python FOR loop syntax question

2009-08-21 Thread Randy Barlow
mal >>> tst = {'myTst': (decimal.Decimal, 0)} >>> for key in tst.keys(): >>> print('%s: %s'%(tst[key][0], tst[key][1])) - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -B

Re: Error in setting up psycopg2

2009-08-21 Thread Randy Barlow
assword is wrong. I > cannot go any further as your advised. What should I do? I am not too > familiar with using Linux. Please help. The problem is that su wants a username and you are giving it a user id. You can look in /etc/passwd to see what user has UID 70 and then su - . - -- Ran

Re: Bulk data insert

2009-08-20 Thread Randy Barlow
port system for my project... - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://e

Re: Counting results

2009-08-05 Thread Randy Barlow
ay it, the blog posts are shown on a > seperate page to the comments but i guess you would still have to > create the query set in the posts view so that you can count the > results. Try appending '.count()' to the end of your query! http://docs.djangoproject.com/en/dev/ref/models/quer

Re: How to tell if a fields was modified

2009-07-24 Thread Randy Barlow
elf).save(stuff_and_junk) - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.m

Re: TransactionMiddleware not working

2009-07-21 Thread Randy Barlow
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Parag Shah declared: > I am using MySql. I believe it does support transactions. MySQL only supports transactions if you are using INNODB tables. This is not the default. - -- Randy Barlow Software Developer The American Research Institute h

Re: unittest DB questions

2009-07-13 Thread Randy Barlow
ive site data anyway? I highly highly recommend that you separate your development, testing, and production instances of your DB and web server. You should never ever develop or test on a production system! - -- Randy Barlow Software Developer The American Research Institute http://amer

Re: Model Inheritance

2009-07-09 Thread Randy Barlow
Javier Guerra wrote: > On Thu, Jul 9, 2009 at 5:52 PM, Randy Barlow<rbar...@americanri.com> wrote: >> sjtirtha declared: >>> class Media(Document): >>>link = >>>type = >>>class Meta: >>>abstract = True &g

Re: Model Inheritance

2009-07-09 Thread Randy Barlow
on't know what their most specific type is, and thus can't determine whether they are a Document or a Media. Hopefully, this will be fixed soon! You should know that this will generate three DB tables. The media and document tables will share primary keys, with the media table defining any fields not fou

Re: Admin login needs to be https

2009-07-08 Thread Randy Barlow
you can configure it to redirect for that URL. Something like this: RedirectMatch (.*) https://example.com$1 - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.11 (GNU/Linux) Comment

Re: How to code for multiple sub-types of a model

2009-07-01 Thread Randy Barlow
ll our models. That way, if we did have a User and a ResearchUser, if we had queried for the User, we can call a special method we made on the user, user.downcast_completely(), and it will give us back the ResearchUser version of the object. Neato, eh? - -- Randy Barlow Software Developer The Amer

Re: Django and PyAMF - RemotingError

2009-06-25 Thread Randy Barlow
Noxxan wrote: > I'm trying to place in my app an amf gateway, > so I make one gateway with code: > > #-*- coding: utf-8 -*- > from pyamf.remoting.gateway.django import DjangoGateway > > from my.views import some_view > > services = { > 'some_service.hello': some_view.get_smt, > } > >

Re: annotate over period of time

2009-04-22 Thread Randy Barlow
n I think you want to filter for all the price points for a particular product in a particular market, which is an AND operation. Try filter(mercado=mercado, producto=producto, etc...) instead! - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971

Re: OperationError: fe_sendauth: no password supplied

2009-04-08 Thread Randy Barlow
LeeRisq wrote: > I have also tried entering a password (same one I use to logon to the > network) in settings.py, but when I do that I get this: > This is almost certainly your problem. You need a username and a password to the database you are using. It sounds like you are trying to use

Re: OperationError: fe_sendauth: no password supplied

2009-04-08 Thread Randy Barlow
>> from django.db import connection >>>> cursor = connection.cursor() > > Then I get the error. Any ideas? Did you configure a DB password in settings.py? - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP

Re: ManyToManyField() causes bugs when using 'ModelName' instead of 'self'

2009-04-02 Thread Randy Barlow
ith requiring self to be there (though I do think using the model class's name is more natural, self is OK too), but it would indeed be helpful if there were an exception. Perhaps you could bring this up on django-developers? - -- Randy Barlow Software Developer The American Research Institute http://americanr

Re: avoid cascade delete

2008-11-17 Thread Randy Barlow
, and you won't have even noticed that it happened! -- Randy Barlow http://electronsweatshop.com --~--~-~--~~~---~--~~ 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@goog

Re: sessionid

2008-07-10 Thread Randy Barlow
ugh! -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send em

Re: DB relations and delete question

2008-07-03 Thread Randy Barlow
any? same question applies to > update My understanding is that deletion is a cascading operation, following all relations in the database. So use it very carefully! -- Randy Barlow Software Developer The American Research Institute http://americ

Re: Use django0.97 with cmemcached

2008-06-09 Thread Randy Barlow
..so does your user have write permissions to that directory? - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhNNPYACg

Re: Setting a ManyToMany default

2008-06-04 Thread Randy Barlow
s it is passed another type of wine. Would anybody care to comment on whether this is possible? - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with Mozilla -

Re: Setting a ManyToMany default

2008-06-04 Thread Randy Barlow
us? How about writing your own constructor that takes an argument of type and has a default value assigned there? - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.9 (GNU/Linux) Comment:

Re: Dev server won't run. (Complete Newbie)

2008-05-27 Thread Randy Barlow
sses this issue. > > Any suggestions? Are you running the web browser inside the VM, or on the host machine? - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.9 (GNU/Linux) Comment:

Re: How to add files to the django built-in webserver

2008-05-22 Thread Randy Barlow
Turns out that this can be done with what is described at [1]. [1] http://www.djangoproject.com/documentation/static_files/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

How to add files to the django built-in webserver

2008-05-22 Thread Randy Barlow
Hi all, I'm new to the group with a fairly simple question. I'd like to use the Django webserver to demo a site I'm working on, and I would like to be able to add a file I've created to the document root. The file is a simple crossdomain.xml file for flash, and I'd like it to be accessible at