Re: Django 1.5 with uwsgi(threaded)/mysql seems to magically cache querysets

2013-04-09 Thread Andy Dustman
You know, I had another report of this, which seemed completely improbable: https://plus.google.com/u/0/101898908470597791359/posts/AuMJdgEo93k Maybe it's related to a bug in Django 1.5 that was fixed in 1.5.1? https://www.djangoproject.com/weblog/2013/mar/28/django-151/ On Thu, Apr 4, 2013 at 1

Re: [gripe] Pain on OSX

2011-07-28 Thread Andy Dustman
My development setup is: Snow Leopard X-Code MacPorts Python-2.6 via MacPorts MySQLdb via MacPorts MySQL server on an Ubuntu VM (mimics production) Django-1.3 via virtualenv easy_install WingIDE or Django internal HTTP server Production (and pre-production testing) is on Ubuntu Lucid, Apache, mod

Re: ImportError: No module named site

2011-06-30 Thread Andy Dustman
On Thu, Jun 30, 2011 at 4:54 AM, bruno desthuilliers wrote: > On Jun 29, 7:32 pm, Kyle Latham wrote: > (snip) >> I have no idea what is going wrong, but here is all my code thus far >> (I'm following the tutorial to create my own app that will display >> various material measurements) >> >> -

Re: mach-o, but wrong architecture

2011-06-24 Thread Andy Dustman
. > > John-Paynes-MacBook-Pro:~ jpayne$ sudo port install python27 > --->  Computing dependencies for python27 > Error: Dependency 'python_select' not found. > Error: Status 1 encountered during processing. > To report a bug, see <http://guide.macports.org/#project.tic

Re: mach-o, but wrong architecture

2011-06-24 Thread Andy Dustman
sql (had to > reinstall XCode for some reason) and it tells me that it cant find a > dependency of python_select, but apparently python_select has been > deprecated. > > Do you know a way around this? > > On Jun 23, 5:50 pm, Andy Dustman wrote: >> Did you make sure you comp

Re: mach-o, but wrong architecture

2011-06-24 Thread Andy Dustman
"Safe" probably means "it won't crash". On Fri, Jun 24, 2011 at 11:03 AM, John wrote: > So the documentation is incorrect? > > It claims that it is multi-process safe. > > On Jun 23, 6:53 pm, Malcolm Box wrote: >> Re your cacheing problem the behaviour you are seeing is exactly what would >> be

Re: mach-o, but wrong architecture

2011-06-23 Thread Andy Dustman
Did you make sure you completely cleaned out the build directory between attempts? I.e. manually remove it. Also see (if you haven't already) http://stackoverflow.com/questions/3061277/python-mysql-wrong-architecture-error I don't know exactly why it's so hard to build on Mac OS X, and I wrote th

Re: Need some help with MySQL and on OSX

2011-06-06 Thread Andy Dustman
Everyone complains, but no one submits patches. On Mon, Jun 6, 2011 at 12:54 PM, scot.hac...@gmail.com wrote: >> On Monday, June 6, 2011 2:30:25 AM UTC+1, Kolbe wrote: >> >> > Anyone have any good documentation on getting django with MySQL on OSX >> > out there? > > It really is amazing how diffi

Re: Need some help with MySQL and on OSX

2011-06-06 Thread Andy Dustman
MacPorts will install it too, but you might find there are a lot of dependencies. On Jun 6, 2011 9:56 AM, "Ivo Brodien" wrote: > > >> MAMP. about as easy as it can get. >> http://www.mamp.info/de/index.html > > But you will still need to install somehow MySQLdb and that is the main problem. > > I

Re: ANN: PyMySQL 0.3

2010-09-10 Thread Andy Dustman
On Sun, Sep 5, 2010 at 12:48 AM, Andy wrote: > Thanks Pete. > > I'm definitely interested in using PyMySQL for production. > > I'm interested in running Django in an async mode using gevent (http:// > www.gevent.org/). gevent provides a money patch that turns any Python > code into non-blocking. T

Re: Help with installing MySQLdb package for Django on OS X Snow Leopard

2009-12-02 Thread Andy Dustman
To sum up (because I've been helping him off list too): It looks like he had old versions of setuptools and XCode (from OS X 10.4, running 10.6). I think once XCode gets upgraded, he should be OK... assuming MySQL is actually installed... As for ZMySQLDA: SourceForge features the most release of a

BINARY columns

2009-02-16 Thread Andy Dustman
I'm working on a custom field type for Django which depends on being able to save data in a BINARY column. (Not a big BLOB, just a couple of bytes.) Unfortunately Django (trunk and probably 1.0) keeps trying to turn it into unicode which fails. I'm now using patch.3.txt on http://code.djangoprojec

Re: Weird get_or_create error

2007-05-09 Thread Andy Dustman
On 5/8/07, Brandon Low <[EMAIL PROTECTED]> wrote: > > Still not sure what's going on myself -- I've had one more occurence of > the error, and have now confirmed that autocommit is on in the > production application (by printing the result of select @@autocommit). > > It sounds quite possible that

Re: Weird get_or_create error

2007-05-08 Thread Andy Dustman
Not sure what is happening there. Django is not setting autocommit, and MySQLdb disables autocommit by default. Have you actually verified that autocommit is on when running your application? It may also be due to the fact that MySQL (5.0 and earlier at least) does not defer foreign key checks in

Re: Why are my FloatFields strings ?

2007-05-08 Thread Andy Dustman
On 5/2/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > I'm going to work on that problem (putting in decimal support) this week > sometime. Maybe today or tomorrow. It's starting to annoy me, seeing all > the decimal-reated tickets in Trac, so after I knock off all the email > ones (today), I

Re: Weird get_or_create error

2007-05-01 Thread Andy Dustman
On 5/1/07, Brandon Low <[EMAIL PROTECTED]> wrote: > > my model is very simple: > > class Referrer(models.Model): > url = models.CharField(maxlength=255, unique=True) > > here is the relevent view code: > > referrer = request.META.get('HTTP_REFERER','-') > r, r_new = Referrer.objects.ge

Re: Why are my FloatFields strings ?

2007-05-01 Thread Andy Dustman
On 5/1/07, Chris Brand <[EMAIL PROTECTED]> wrote: > > I've got a model that includes FloatFields as well as IntegerFields and > CharFields. > When I access the CharFields, I get strings. When I access the > IntegerFields, I get integers, but when I want to use the Floatfields, I > always have to a

Re: Weird get_or_create error

2007-05-01 Thread Andy Dustman
On 5/1/07, Brandon Low <[EMAIL PROTECTED]> wrote: > > How can a get_or_create cause an integrity constraint error? Also... It's hard to see exactly what's going on because the code in the traceback is using **kwargs. If you use get() or get_or_create(), it's looking for a match on all the paramet

Re: Weird get_or_create error

2007-05-01 Thread Andy Dustman
On 5/1/07, Brandon Low <[EMAIL PROTECTED]> wrote: > > How can a get_or_create cause an integrity constraint error? The error is on key 2, which is an additional unique index you presumably have in your model. get_or_create should not cause integrity errors on the primary key, but that's not what'

Re: Mod_python + MySQLdb won't install ...

2007-03-21 Thread Andy Dustman
On 3/20/07, dbee <[EMAIL PROTECTED]> wrote: > > System: Linux 2.6.9-34.0.1.EL #1 Wed May 24 07:40:56 CDT 2006 i686 > athlon i386 GNU/Linux > OS: CentOS > Python: 2.3.4 > Mysql: 5.0 > > I'm having lots of issues trying to get my django server up. It seems > that mod_python won't work on my system.

Re: MySQLdb version

2007-03-20 Thread Andy Dustman
On 3/20/07, chasfs <[EMAIL PROTECTED]> wrote: > > Thanks for the quick reply! Do you know if Django has been tested > with MySQLdb > 1.2.2? Yes. 1.2.2 is the best version you can get. Trust me. > On Mar 20, 11:20 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > > On 3/20/07, chasfs <[EMAIL PROT

Re: Database introspection dies?

2007-02-28 Thread Andy Dustman
On 2/28/07, Adam Seering <[EMAIL PROTECTED]> wrote: > > Hi all, > I'm trying to introspect an old MySQL database (the old software > that used the database was written in some nasty mix of Perl and C; > it just bit the dust recently). I try an inspectdb on it, and I get > an ugly-looking

Re: Getting HTTP header data in templates

2007-01-22 Thread Andy Dustman
On 1/22/07, James Bennett <[EMAIL PROTECTED]> wrote: > > On 1/22/07, James Bennett <[EMAIL PROTECTED]> wrote: > > On 1/22/07, Andy Dustman <[EMAIL PROTECTED]> wrote: > > > Here's how I made it work: > > > > > > Index: django/views/d

Re: Getting HTTP header data in templates

2007-01-22 Thread Andy Dustman
On 1/22/07, Andy Dustman <[EMAIL PROTECTED]> wrote: > On 1/22/07, Bo Shi <[EMAIL PROTECTED]> wrote: > > > > I think request.META is what you're looking for, i.e.: > > > >referrer = request.META.get('HTTP_REFERER', '/') > >

Re: Getting HTTP header data in templates

2007-01-22 Thread Andy Dustman
On 1/22/07, Bo Shi <[EMAIL PROTECTED]> wrote: > > I think request.META is what you're looking for, i.e.: > >referrer = request.META.get('HTTP_REFERER', '/') I know that; I need to have access to it from a template, specifically my 404.html template, in a way that will work with generic views

Getting HTTP header data in templates

2007-01-22 Thread Andy Dustman
I have a 404 page that I would like to display some of the HTTP headers (particularly HTTP_REFERER) in so that user receiving the error can make a usable report. Is there some way at getting at this information in a template without having to have your view return a HttpResponseNotFound object? I'

Re: What can be done about all the spam in django-users?

2007-01-19 Thread Andy Dustman
Don Arbow wrote: On Jan 19, 2007, at 7:40 AM, LD 'Gus' Landis wrote: > If the spam can't be stopped, the unsubscribe is the only option I > guess, eh? No, you go to the Google Groups web page and report the spam. In the title of the message is a "Show Options" link, click that, then click th

Re: appname in admin

2007-01-05 Thread Andy Dustman
On Jan 5, 9:08 pm, "Aljosa Mohorovic" <[EMAIL PROTECTED]> wrote: i can't find info on how to change appname in admin interface. example: if i have "my_cool_app" app in project and it has admin interface enabled it will display something like "My_cool_app" in administration, can i make it display

Re: >*< Free PC to PC access >*< Remote Access software >*

2006-12-21 Thread Andy Dustman
On 12/21/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: Shabana wrote: > [expunged] there's no way to get google groups to simply just nuke anything that mentions 50webs.com ? I, for one, have been aggressively going after spammers in django-users this morning, and I recommend everyone using

Somewhat awkward ImageField usage

2006-12-14 Thread Andy Dustman
I have this model: class Photo(Model): title = CharField( maxlength = 80, ) description = TextField() photo = ImageField( upload_to = "photos/%Y/%m/%d", height_field = "H", width_field = "W", ) W = PositiveSmallIntegerField("Width",

Re: Adding a button to admin view?

2006-11-15 Thread Andy Dustman
On 10/31/06, iain duncan <[EMAIL PROTECTED]> wrote: > > Hi folks, I would like to add a custom form button to the admin > interface somehow and am not sure how to go about it. > > I want to add a "download now" button the list view for some file > entries, so it needs to be a link to file. Any ide

Re: UTF8 character set problem

2006-11-01 Thread Andy Dustman
On 10/30/06, Pythoni <[EMAIL PROTECTED]> wrote: > > Here are MySQL settings, both on Linux and XP windows > > > LINUX MySQL settings > +--++ > | Variable_name| Value | > +--+---

Re: Incompatible unicode django / mysql

2006-11-01 Thread Andy Dustman
On 11/1/06, mamcxyz <[EMAIL PROTECTED]> wrote: > > I having this error: > > OperationalError: (1267, "Illegal mix of collations > (latin1_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for > operation '='") > > When I try to run code like this: > > City.objects.filter(name='Medellín') > > I h

Re: Still really struggling with JOINS

2006-10-27 Thread Andy Dustman
On 10/27/06, Tom Smith <[EMAIL PROTECTED]> wrote: > Is there a way to do a complete dump, re-build the database and then > import stuff (avoiding import errors... i.e doing some form of > coercion)? Use mysqldump with the --no-create-info option which avoids dumping the table schemas. Drop the d

Re: How to make tables generated by Django be utf8 encoded by default?

2006-10-27 Thread Andy Dustman
On 10/25/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > I want to store Chinese characters in my MySQL 4.1.11 through Django > but unluckily, like most novices, I get totally mess characters when > displaying them on utf-8 encoded templates. > After some investigation I found that the

Re: Django and Media Temple Grid Server

2006-10-18 Thread Andy Dustman
http://news.netcraft.com/archives/2006/10/17/price_competition_emerges_in_grid_hosting.html This article from Netcraft focuses primarily on Media Temple (who I never heard of before this discussion) and lists some competitors. All-in-all, MT's software selections are somewhat conservative, at be

Re: What IDE do you use? (semi-OT)

2006-10-10 Thread Andy Dustman
On 10/8/06, Serg Kovrov <[EMAIL PROTECTED]> wrote: > I'd like to know what editor/IDE Django users (and developers) uses on > daily basis, to boost development process. And why exactly - what > features you find useful, how it helps you to save time (or just makes > coding enjoyable, which probab

Re: ForeignKey field with null = True and blank = True

2006-10-05 Thread Andy Dustman
On 10/4/06, Seemant Kulleen <[EMAIL PROTECTED]> wrote: > Hi All, > > Now I'm at ForeignKey funkiness. So I have the Services model which > has a ForeignKey field to the Sermon model. The funny thing is that > if I choose a sermon object when I first create a new service object, > all is well. I

Re: Relevance

2006-10-04 Thread Andy Dustman
On 10/4/06, Beau Hartshorne <[EMAIL PROTECTED]> wrote: > > On 4-Oct-06, at 6:12 PM, Andy Dustman wrote: > > > I'm not sure this will fix your problem, but it might from my reading > > of the code. Try reversing the order of the filter() and extra() > > method

Re: Support for static content?

2006-10-04 Thread Andy Dustman
On 10/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Django's database-centric approach seems to make certain kinds of > mostly-static sites harder to build. For example, most of what I want > to put on my site is probably going to come from RestructuredText > source, but that source is

Re: Relevance

2006-10-04 Thread Andy Dustman
On 9/15/06, mrstone <[EMAIL PROTECTED]> wrote: > > Hi > > I'm fiddling around with MySQL fulltext search and run into a problem. > > Using the below code works: > > match_expr = "MATCH(name) AGAINST (%s IN BOOLEAN MODE)" > qs = > Place.objects.all().filter(name__search=query).extra(select={'releva

Re: Anal not Analog, Analysis: DB Question

2006-10-04 Thread Andy Dustman
On 10/4/06, Tom Smith <[EMAIL PROTECTED]> wrote: > > If I am looking for titles like "Anal Sex" or "Being Anal" then how > do I construct this, ahem, query... to not return "Analysis" or > "Analog"? Two options: If your database supports it, try a full-text search: object_list = Products.objects

Re: ManyToManyFields are not syncdb'able

2006-10-02 Thread Andy Dustman
On 10/2/06, seemant <[EMAIL PROTECTED]> wrote: > > Andy, > > This certainly gets me past the syncdb, so thanks! However, when I try > to add a service, I get this (note that I have not yet added people or > roles, I wanted to try adding them using the + in the service tab): > > TypeError at /admi

Re: ManyToManyFields are not syncdb'able

2006-10-02 Thread Andy Dustman
On 10/2/06, seemant <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm sorry about that. All the ManyToManyFields have this sorta thing: > > LEM = models.ManyToManyField ( > Person, > related_name = 'LEM', > filter_interface = models.HORIZONTAL, > limit

Re: ManyToManyFields are not syncdb'able

2006-10-02 Thread Andy Dustman
On 10/2/06, Seemant Kulleen <[EMAIL PROTECTED]> wrote: > Dear All, > > I've attached two files: people/models.py and services/models.py. I > have two many-to-many relationships defined: one is between people and > roles (each person can fill many roles, and each role can be filled by > many peopl

Re: Unknown column error when I add a field

2006-09-25 Thread Andy Dustman
On 9/20/06, Tool69 <[EMAIL PROTECTED]> wrote: > > Hi, > I'm totally new to django, I've made a little blog application and my > original template is like this one: > > class News(models.Model): > title = models.CharField(maxlength=255, verbose_name="Titre du > billet") > text = models.TextF

Re: Request for 'transaction' disambiguation

2006-09-13 Thread Andy Dustman
On 9/13/06, Hawkeye <[EMAIL PROTECTED]> wrote: > > Nevermind... > > Looks like Django defaults to the default MySQL table type (MyISAM), > which doesn't support transactions. > > My fault completely. You can change the default table type in your MySQL server configuration (/etc/mysql/my.cnf). You

Re: Uploading Files

2006-09-08 Thread Andy Dustman
On 9/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > how can I upload file to /media/images/1.jpg with Django? Start here: http://www.djangoproject.com/documentation/model_api/#imagefield If the admin interface is sufficient for you, you're done. Note that this requires an object/row per

Crappy filename validator

2006-09-07 Thread Andy Dustman
The model docs strongly suggest validating all filenames of uploaded files for security reasons, so I wrote a validator that could be used for this, but it's not pretty: class filenameEndsWith(object): def __init__(self, choices=[], error_message=None): if not choices: ra

Re: ReferenceError

2006-09-04 Thread Andy Dustman
On 9/3/06, Lorenzo <[EMAIL PROTECTED]> wrote: > > > Andy Dustman wrote: > > > What versions of MySQL and MySQLdb/MySQL-python are you using? > > > mysql Ver 14.12 Distrib 5.0.22 > mysql-python 1.2.1_p2 > > So it could be caused by mysql/mysql-py, not d

Re: ReferenceError

2006-09-02 Thread Andy Dustman
On 9/2/06, Lorenzo <[EMAIL PROTECTED]> wrote: > > Hi, > I'm updating an application created with Django 0.91 a few months ago. > I'm writing an external application that fills the db, using django as > an ORM. > Sometimes I get a strange ReferenceError, I think caused by a > concurrency issue with

Re: Filtering by groups.

2006-09-01 Thread Andy Dustman
On 9/1/06, Gabriel Puliatti <[EMAIL PROTECTED]> wrote: > > Hello. I have an application in which a list should be filtered > depending on what groups a user belongs, since the application is a > homework list, and the list must only contain the classes the user > (student) is enrolled. > > I know

Re: django cannot connect to mysql after upgrade

2006-08-31 Thread Andy Dustman
MySQL-5.0.24 accidentally introduced an ABI-incompatibilty, which caused the "Commands out of sync" error; MySQL-5.0.24a fixes this. -- This message has been scanned for memes and dangerous content by MindScanner, and is believed to be unclean. --~--~-~--~~~---~--~--

MySQL backend patch

2006-08-31 Thread Andy Dustman
I've come up with a patch to the MySQL backend. If you use MySQL, please check it out. http://code.djangoproject.com/ticket/2635 One of the issues to resolve is: What is the minimum version of MySQL which Django should support? I am doing all my development with 5.0, and the early deployment I h

Re: problems with unicode in website

2006-08-27 Thread Andy Dustman
On 8/26/06, Eugene Pyvovarov <[EMAIL PROTECTED]> wrote: > > thanks. when i change collation to utf8_unicode_ci; - all begin to work > fine. MySQLdb-1.2.2b1 is up on Sourceforge, and it should also fix this even for the binary collation case, plus some other bugs. You should also be able to instal

Re: problems with unicode in website

2006-08-26 Thread Andy Dustman
On 8/26/06, Eugene Pyvovarov <[EMAIL PROTECTED]> wrote: > > hello everybody. I'm new in django... just want to create base apps > from tutorial on djangoproject website. > I am using mysql 4.1 and python 2.4, django from svn > When I create database in iso-8859-1 - all stuff working good, but when

question = Q() | -Q()

2006-08-24 Thread Andy Dustman
I had been hunting around for some way to do negation in queries, and found QNot, though it is undocumented and not exported with Q. I though this was a little bit clumsy, so here's a patch to add unary negation to Q objects: Index: django/db/models/query.py ==

Pope Guido blesses Django

2006-08-18 Thread Andy Dustman
http://pyre.third-bit.com/blog/archives/613.html (found via http://del.icio.us/holovarty) """Guido just pronounced: Django is *the* web framework * Won't be part of the core, but will be as "standard" as PIL or NumPy * This was not what I expected the outcome of my talk would be, but hey

Re: search in django

2006-08-18 Thread Andy Dustman
On 8/18/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 8/18/06, Matthew Flanagan <[EMAIL PROTECTED]> wrote: > > Why not use the same suffix syntax (or subset thereof) for other > > django queries ie. __istartswith, __iexact, etc, instead of creating a > > new one? > > This is a valid point.

Re: search in django

2006-08-17 Thread Andy Dustman
On 8/16/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 8/15/06, Andy Dustman <[EMAIL PROTECTED]> wrote: > > In fact, it does LIKE %string%, which is quite expensive. Usually want > > I want out of an admin search is a startswith match, i.e. LIKE >

Re: search in django

2006-08-15 Thread Andy Dustman
On 8/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Data in the database is searched by LIKE (or ILIKE) SQL command which > is wrapped in Django ORM. If you need fulltext search engine you can > use MySQL which has such feature (you need to user raw SQL for it), > postgresql needs some ad

Re: MySQL UnicodeEncodeError

2006-08-08 Thread Andy Dustman
On 8/7/06, Niran Babalola <[EMAIL PROTECTED]> wrote: > > "UnicodeEncodeError: 'latin-1' codec can't encode characters in > position 75-76: ordinal not in range(256)" This indicates your default database connection character set is latin1. You can change this in your server configuration, or you c

Re: Django vs. Rails vs. Symfony: Django is fastest

2006-07-14 Thread Andy Dustman
On 7/14/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > On Jul 14, 2006, at 1:18 PM, Adrian Holovaty wrote: > > Some folks benchmarked Symfony, Ruby on Rails and Django. Django was > > the fastest. > > By over 30% -- hell yeah! > > Now, I've always known in my gut that Django's pretty damn fa

Re: admin connection mysql problem

2006-06-27 Thread Andy Dustman
On 6/26/06, Patrick <[EMAIL PROTECTED]> wrote: > File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 151, > in __init__ > self.converter[types.StringType] = string_literal > > TypeError: object does not support item assignment I don't really know what the actual cause is,

Re: error in your SQL syntax near '(DATE_FORMAT... on adding date_hierarchy = 'pub_date'

2006-06-13 Thread Andy Dustman
On 6/12/06, Matt McClure <[EMAIL PROTECTED]> wrote: > > I received in a private email: > > Hello Matthew, > > > > I'm seeing the exact same "date_hierarchy" problem and was wondering > > if you received a solution offline and/or figured it out. > > > > Seems like the problem is somewhere among my

Re: How to debug MySQLdb issues

2006-06-09 Thread Andy Dustman
On 6/9/06, tomass <[EMAIL PROTECTED]> wrote: > I have been testing on an Ubuntu desktop and my app works fine, but > I've now migrated it to Fedora Core 3 where it will be in production > and I'm having problems. I think the problem is related to the fact > that I have custom RPMs for MySQL (usin

Re: mysqldb error

2006-05-30 Thread Andy Dustman
On 5/28/06, Thn <[EMAIL PROTECTED]> wrote: > > Hi all - I'm using the latest code (rev 2997). > Otherwise it's mod_python 1.10 / apache2 / python2.3 / mysql 5.0.21 / > MySQLdb 2.0 -- all installed from Debian packages. You must be a time-traveller if you have MySQLdb-2.0 installed; 1.2.1 is the l

Re: Time delta problem

2006-05-09 Thread Andy Dustman
On 5/8/06, George Sakkis <[EMAIL PROTECTED]> wrote: > > I posted this in MySQLdb's tracker but it seems it has to do with > Django. I have a view with one field being a time difference, computed > as sec_to_time(unix_timestamp(end)-unix_timestamp(start)). MySQL > specifies that the return type is

Re: [MySQLdb] Could not load database backend: cannot import name ImmutableSet.

2006-05-09 Thread Andy Dustman
On 5/8/06, Paulo <[EMAIL PROTECTED]> wrote: > > Thanks for the tip! I will check it out when I get home this evening. > I'll keep my fingers crossed that this will help me get django > going... I've been wanting to start playing with Django for an > upcoming project but am not a sys admin and can'

Re: [MySQLdb] Could not load database backend: cannot import name ImmutableSet.

2006-05-08 Thread Andy Dustman
On 5/6/06, Paulo <[EMAIL PROTECTED]> wrote: > 4. "python manage.py runserver" and "python manage.py init" start > throwing errors > -- my MYSQL DB is setup > -- settings.py has the correct db info entered > > "python manage.py runserver" gives me quite a few errors: > "bash-3.00$ python manage.py

Re: auto_now_add bug with MySQL

2006-05-08 Thread Andy Dustman
On 5/5/06, Petar Mariæ <[EMAIL PROTECTED]> wrote: > class Paper(models.Model): > # ... > submited_on = models.DateField( > auto_now_add=True, > ) > # ... > > The above will spit out: > Exception Type: ValueError > Exception Value:year is out of range > Except

Re: Install woes: error "python: can't open file 'django-admin.py' "

2006-05-05 Thread Andy Dustman
On 5/4/06, jbrewer <[EMAIL PROTECTED]> wrote: > > I have tried to install the MySQLdb and keep getting this error: > > error: command 'gcc' failed with exit status 1 > > at the end of a bunch of stuff. Yeah, that "bunch of stuff" just might be important. ya know. Keep in mind you also would need

Re: MySQL Query cache hits stay zero

2006-04-20 Thread Andy Dustman
On 4/20/06, Andy Dustman <[EMAIL PROTECTED]> wrote: > I've reopened that bug, but I am very skeptical that anything in > MySQLdb can be causing it. And I'm probably right, since it seems he is using MySQL-4.0 which, while it does have the query cache, it is disabled for

Re: MySQL Query cache hits stay zero

2006-04-20 Thread Andy Dustman
t; > > > using MySQLdb the number of Cache hits do not increase. However, the > > number of Qcache_queries_in_cache also do not increase. Strange. > > > > I did find an issue on the MySQL for Python Sourceforge website that > > seems to be describing the exact same is

Re: Problem with threads accessing MySQL database

2006-04-10 Thread Andy Dustman
On 4/10/06, Eugene Lazutkin <[EMAIL PROTECTED]> wrote: > > kopikopiko wrote: > > Hi, > > > > I have an application set up under: > > Django 0.91 > > Windows 2000 Server > > MySQL 5.0 > > which reads scheduled events from a table then spawns threads (using > > the Thread module) to p

Re: Database views

2006-04-10 Thread Andy Dustman
On 4/10/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 4/10/06, George Sakkis <[EMAIL PROTECTED]> wrote: > > I understand Django doesn't support database views > > (http://en.wikipedia.org/wiki/View_%28database%29) right out of the > > box, but I was wondering if there's a reasonably easy w

Re: Model inheritance

2006-03-30 Thread Andy Dustman
On 3/25/06, James Bennett <[EMAIL PROTECTED]> wrote: > > On 3/25/06, Andy Dustman <[EMAIL PROTECTED]> wrote: > > Surprisingly (a bit, at least), I created an app with the example model: > > ..snip... > > > Which is not what you'd expect based on that

Re: Admin interface using CharField as a primary key

2006-03-30 Thread Andy Dustman
On 3/30/06, Daniel Bimschas <[EMAIL PROTECTED]> wrote: > > Hi there! > > I'm currently trying to convert an old webapp written in PHP into a > django-based app. The PHP-System used VARCHAR-Fields as primary keys > in the MySQL - DB. > > Now, if i convert the data for the new tables created by Djan

Re: admin apache solved? / now mysql problem

2006-03-28 Thread Andy Dustman
On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > > > Andy Dustman wrote: > > On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > > > > > > > > > Andy Dustman wrote: > > > > On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > > >

Re: admin apache solved? / now mysql problem

2006-03-28 Thread Andy Dustman
On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > > > Andy Dustman wrote: > > On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > > > > > OperationalError: (2002, "Can't connect to local MySQL server through > > > socket '/var/lib/mysql

Re: admin apache solved? / now mysql problem

2006-03-28 Thread Andy Dustman
On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > OperationalError: (2002, "Can't connect to local MySQL server through > socket '/var/lib/mysql/mysql.sock' (13)") This indicates your MySQL server isn't running, and you are using DATABASE_HOST="localhost". -- The Pythonic Principle: Python works the

Model inheritance

2006-03-25 Thread Andy Dustman
(Maybe this should go to django-developers, but I'm still a relative noob on Django.) I've been reading (and making some notes on) this page: http://code.djangoproject.com/wiki/ModelInheritance Surprisingly (a bit, at least), I created an app with the example model: {{{ class Place(models.Mode

Re: Need help for query, how could i do this with django ? or a raw SQL.

2006-03-25 Thread Andy Dustman
On 3/25/06, coulix <[EMAIL PROTECTED]> wrote: > > i got it working : > > def _module_get_top_users(limit): > cursor = db.cursor() > cursor.execute(""" > SELECT auth_users.username, COUNT(*) AS count > FROM auth_users,

Re: Need help for query, how could i do this with django ? or a raw SQL.

2006-03-24 Thread Andy Dustman
On 3/24/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > coulix wrote: > > Hello, > > I was trying to play with custom query but i didnt manage to get it > > working, > > I too could not get the custom query from the API reference working: > > polls.get_list( > select={ > 'choice_c

Extreme file uploading

2006-03-24 Thread Andy Dustman
I'm working on a little app to manage a podcast RSS feed (believe it or not, someboody actually edits it by hand now). So my first thought was to use the FileField for uploading the enclosure. This worked fine except for one issue: The podcast in question is for video, and the files are typically