Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-04 Thread Joshua Russo
Wow, that's a cool trick to be able to implement stored procedures in different languages. I might actually use them more if I could do everything in the same language as the application. I only looked quickly through the PostgreSQL docs for subqueries. Thanks for the heads up. As far as the Gis

Re: django fuzzy string translation not showing up

2009-09-04 Thread Karen Tracey
On Fri, Sep 4, 2009 at 7:24 PM, weiwei wrote: > > 1)why sometimes i got 'fuzzy' item in django.po language file . > Actually i have checked in my project the 'fuzzy' string item is > totally unique. > > #: .\users\views.py:81 .\users\views.py:101 > #, fuzzy > msgid

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-04 Thread Siemster
PostgreSQL does support subqueries in the from clause, however iirc, the subquerys require an alias. If you decide to do geo then the PostGis addon to Postgres is very nice. Another nice capability in PostgreSQL is that you can use different languages for writing your stored procedures (should

Re: Users Full Name in model form?

2009-09-04 Thread Anthony Simonelli
Is this within the Admin interface? If so, I'm having a similar problem. I have a model called Request with a FK relationship to an Employee model. Within the Admin interface, when adding a Request, the drop-down of the Employees selection read "Employee Object". This is also the case when

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-04 Thread Joshua Russo
On Fri, Sep 4, 2009 at 11:07 PM, Tim Chase wrote: > > > I personally don't have any experience with PostgreSQL and I'm generally > > working in a mixed MS and Linux environment. I'm interested to hear > peoples > > views on the pluses and minuses of the two

Slash character in {% blocktrans %} ... {% endblocktrans %} tempalte tag: xgettext argument issue

2009-09-04 Thread joymax
I create multilingual application with django and i've found that template tag {% blocktrans %} doesn't accept properly html tags, especially slash character. It's a pity and I've found a solution: add -E argument to makemessage command from django.core.management.commands. In xgettext man page

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-04 Thread Joshua Russo
Nice! thanks for that one. On Fri, Sep 4, 2009 at 10:59 PM, Continuation wrote: > > MySQL has better replication support. > > MySQL has built-in replication based on log shipping. > > Postgresql doesn't have built in replication. You have to use external > tools. From >

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-04 Thread Tim Chase
> I personally don't have any experience with PostgreSQL and I'm generally > working in a mixed MS and Linux environment. I'm interested to hear peoples > views on the pluses and minuses of the two different systems. I'm a bit of a > query geek too. How does that play in? I know in MySQL there

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-04 Thread Continuation
MySQL has better replication support. MySQL has built-in replication based on log shipping. Postgresql doesn't have built in replication. You have to use external tools. From http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL#PostgreSQL_Replication_Weakness: "Slony-I, the most widely used

Django, Blueprintcss and a data array

2009-09-04 Thread adelaide_mike
I (newbie) am looking at using Blueprintcss to display a 7 column array of data. The data is passed to the template in "dataarray". I have tested the code below without the section and the column headings display correctly. Adding the section to the code causes an error at {% for row in

django fuzzy string translation not showing up

2009-09-04 Thread weiwei
1)why sometimes i got 'fuzzy' item in django.po language file . Actually i have checked in my project the 'fuzzy' string item is totally unique. #: .\users\views.py:81 .\users\views.py:101 #, fuzzy msgid "username or email" msgstr "9988" 2) It is ok to be fuzzy but my translation of fuzzy

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-04 Thread Joshua Russo
On Fri, Sep 4, 2009 at 9:01 PM, Léon Dignòn wrote: > > One of many: > PostgreSQL supports naive foreign referential-integrity constraints. > MySQL (default: myISAM) does it only with InnoDB which leads to other > Problems:

Re: Users Full Name in model form?

2009-09-04 Thread Streamweaver
I put a solituion for this in the form of where this is passed a user object. class UserChoiceField(forms.ModelChoiceField): ''' Returns a select field with user names formatted by last and first name where available and ordered by last name. ''' def label_from_instance(self,

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-04 Thread Léon Dignòn
One of many: PostgreSQL supports naive foreign referential-integrity constraints. MySQL (default: myISAM) does it only with InnoDB which leads to other Problems: http://dev.mysql.com/doc/refman/5.0/en/innodb-configuration.html On Sep 4, 10:29 pm, Joshua Russo wrote: > I

Re: Same application with different URLs

2009-09-04 Thread Petr Tuma
One more note, just if somebody else runs into this. Apparently, the problem with this solution is that under certain conditions, SetEnv from one virtual host can be visible inside the Python interpreter associated with another virtual host. Since mod_python suggests not to use SetEnv, one

PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-04 Thread Joshua Russo
I personally don't have any experience with PostgreSQL and I'm generally working in a mixed MS and Linux environment. I'm interested to hear peoples views on the pluses and minuses of the two different systems. I'm a bit of a query geek too. How does that play in? I know in MySQL there are

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

2009-09-04 Thread Joshua Russo
On Fri, Sep 4, 2009 at 6:37 PM, James Bennett wrote: > > On Fri, Sep 4, 2009 at 7:35 AM, Joshua Russo > wrote: > > The reason I was looking at the dump data instead of a MySQL backup is > > because it was more obvious to automate. I'm going to take

User account specific to site

2009-09-04 Thread ringemup
Is it at all possible with Django's contrib Auth system for a single username to correspond to a different user account on each Site, or would I need to write a custom auth app / use a different DB for each site? Thanks! --~--~-~--~~~---~--~~ You received this

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

2009-09-04 Thread James Bennett
On Fri, Sep 4, 2009 at 7:35 AM, Joshua Russo wrote: > The reason I was looking at the dump data instead of a MySQL backup is > because it was more obvious to automate. I'm going to take a closer look at > the MySQL backup though. I run on PostgreSQL rather than MySQL, but

Users Full Name in model form?

2009-09-04 Thread Streamweaver
I had a model that lists an owner with a FK relationship to the Users table. When using model form the dropdown for the owner field defaults to the username. I'd like to override that to use a users name as the choice portion of the dropdown sorted by users last name but I'm having trouble

Re: Same application with different URLs

2009-09-04 Thread Petr Tuma
Hi Andrew, > What is the error 500?  Is it the same error every time? I did not find any details in the logs and with DEBUG = True, the site starts behaving correctly. > Also, you have restarted apache?  Different apache processes could be > out of sync and running different django configs,

Retrieving browser information(javascript enabled)

2009-09-04 Thread skydark
I need a javascript enabled check in my templates and it's not hard to do, but I think I saw on the docs that django already gave that information through one of the frameworks api, but I don't remember which. Where in the docs is it? Or was I just dreaming?

can .values() return the field of child model

2009-09-04 Thread Subramanyam
Hi Can .values() method return fields of child model i.e fields of forward relation across a database --- Subramanyam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: how to deploy an app that gets used by people in multiple time zones

2009-09-04 Thread Brian Neal
On Sep 4, 10:47 am, Margie wrote: > > Can someone clarify what format dates and times are stored in when > using just a standard DateTimeField?  Is my timezone encoded in the > database or is some generic, non-timezone-specific date/time stored? There is no timezone

Re: how to deploy an app that gets used by people in multiple time zones

2009-09-04 Thread Margie
I am using mysql. Can someone clarify what format dates and times are stored in when using just a standard DateTimeField? Is my timezone encoded in the database or is some generic, non-timezone-specific date/time stored? I don't understand why I would want to save my timezone along with my

Re: Zip multiple files into a zipped folder for download?

2009-09-04 Thread Dj Gilcrease
Here is how I do it http://dpaste.com/89530/ I am using a View class that I wrote to make my life easier so it wont directly translate to a standard view function but it should give you enough details to get you started --~--~-~--~~~---~--~~ You received this

Re: Outputing an integer value in a template, but with some calculation done on it

2009-09-04 Thread Matias
If you're using Pagination http://docs.djangoproject.com/en/dev/topics/pagination/ you can get the previous and next pages like this: {{ current_page.previous_page_number }} If not, check it out. It's a simple way to manage pagination issues. HTH, Matias. On Thu, Sep 3, 2009 at 8:25 PM, Tim

Re: Using Psycopg2 on Windows

2009-09-04 Thread Piotr Czapla
Thanks James ! --~--~-~--~~~---~--~~ 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 this group, send email to

Add buttons to change_form

2009-09-04 Thread Sandra Django
Hi friends, I have a problem. I want add buttons to change_form, and I did the same thing of Django, I wrote a templatetags, but I have a doubt in the views. I want do something as: def newdescriptor(request): if request.method == 'POST': form = CustomNewForm(request.POST) if

Re: Is valid {% ifequal model.name "Mymodelname" %}??

2009-09-04 Thread Bill Freeman
I'm going to take a flier and guess that you want this to be conditional on the name of the class of an instance passed in the context. That is, you have a model class Foo, maybe another named Bar that you have an instance of the class, e.g.; x = Foo.objects.get(pk=1), and that you're passing it

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

2009-09-04 Thread Ulf Kronman
Hi Russel, thanks for the tip. > There isn't a simple switch of setting to do this out-of-the-box. > However, it _might_ be possible with some creative subclassing. I might try this, but I'm afraid that it is a fair bit beyond my Django/Python skills. Maybe I have to bite the bullet and write

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

2009-09-04 Thread Joshua Russo
On Fri, Sep 4, 2009 at 10:37 AM, Russell Keith-Magee wrote: > > 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

Re: Zip multiple files into a zipped folder for download?

2009-09-04 Thread Tim Chase
> I've got an advanced question. I'm not sure it's *that* advanced :) > How do i create a zip file that contain multiple files and folders in > the zip file? You can use Python's built-in zipfile[1] module. import cStringIO as cs import zipfile as z f = cs.StringIO() # or a file on

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

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

Re: question about admin.py list_display

2009-09-04 Thread Rob B (uk)
Solved over at http://stackoverflow.com/questions/1378447/question-about-admin-py-listdisplay On Sep 4, 11:28 am, "Rob B (uk)" wrote: > http://dpaste.com/89435/ > > I'm trying to show game.status in GameListAdmin's list_display but not > sure how to do a backwards

question about admin.py list_display

2009-09-04 Thread Rob B (uk)
http://dpaste.com/89435/ I'm trying to show game.status in GameListAdmin's list_display but not sure how to do a backwards lookup using the ForeignKey in Admin.py See link for details. Any ideas? --~--~-~--~~~---~--~~ You received this message because you are

Zip multiple files into a zipped folder for download?

2009-09-04 Thread DjangoRocks
Hi all, I've got an advanced question. How do i create a zip file that contain multiple files and folders in the zip file? For example, within the zip it contains: folder.zip -> file1.php -> file2.php -> file3.html -> folder ---> fileInFolder1.css ---> fileInFolder.html --->

Re: are you using mptt, treebeard or something else?

2009-09-04 Thread Aljosa Mohorovic
On Sep 3, 5:51 pm, Sandra Django wrote: > Sorry, a cuestion because I don't understand. mptt requires v1.1, but not > SVN version? only mptt svn trunk works with django 1.1 but i would like an official release rather then trunk. Aljosa

Problem with content type creation order and data recovery scheme

2009-09-04 Thread Joshua Russo
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 problem for the dump and load data functions when trying

Using Django cache framework for object write-through caching?

2009-09-04 Thread Continuation
Is there any way to get Django to support write-through caching of objects? For example say I have a blog object and I want to retrieve the attribute "body". Normally the ORM would generate a SQL query and get the data from the database. Is it possible to set it up so that the ORM would try the

Re: Same application with different URLs

2009-09-04 Thread Andrew McGregor
> strangely unreliable. When both sites are used, an Error 500: Internal > server error is frequently returned (but mere repeated reloading of > the same page eventually gives a correct page). What is the error 500? Is it the same error every time? Also, you have restarted apache? Different

Re: how to deploy an app that gets used by people in multiple time zones

2009-09-04 Thread Maksymus007
On Thu, Sep 3, 2009 at 11:36 PM, Margie Roginski wrote: > > I've created a django app and I soon am going to have users that are > in multiple timezones.  My app is a task management system and it is > important for users to see dates and times with respect to their own

how to retrieve the message model fields from usr object

2009-09-04 Thread Lokesh
Hi, I am trying to retrieve the few cols from auth_user & auth_message table. Here is the statement that i am using User.objects.filter(username=10).values('username', 'message_user_id', 'message_message') and ended up with the below error >>>

Same application with different URLs

2009-09-04 Thread Petr Tuma
Hello, I have a Django application that I need to appear on multiple Apache virtual hosts with different URLs (e.g. the same view would be accessible under http://one.site/view and under http://another.site/another/path/to/view). So far, I have tried to have multiple interpreter instances under