Re: Django Book

2007-05-21 Thread Marc Fargas Esteve

On 3/14/07, Derek Lee-Wo <[EMAIL PROTECTED]> wrote:
>
> Amazon shows that the book on Django will be published on March 26th
> which is 1 1/2 weeks away.  Does anyone know if that date is still
> valid?
>
> I'm anxiously waiting to order it.

Uhm.. I think they will wait until Django 1.0 hits the road to base
the final book on a **really stable** django release. And we can be
sure that Django 1.0 won't be out in 1 1/2 weeks ;)

So, mostly sure you'll have to wait a bit more to get your hands on it!

Another book that is out this summer (maybe) is the jQuery one, dunno
the title now, but I'm waitting for both ;)

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Scheduler proposal

2007-05-20 Thread Marc Fargas Esteve

Hi,

On 5/20/07, Andi Albrecht <[EMAIL PROTECTED]> wrote:
> A patch based on rev. 5297 is attached to this mail.
>
> I've tested this solution in my application a few days now and it
> works pretty well. What do you think about it?

You should fill a ticket in http://code.djangoproject.com/simpleticket
about that,
on the other hand, this does not deal with the case of running more
than one django instance for load-balancing or fail-over.

Another issue is that if you run FastCGI processes that are spawned by
Apache on demand you will:
a) Get the process killed before it does some scheduled task.
b) Get the task done more than once as more processes are created if needed.

Both cases are really really bad depending on what you are trying to achieve.

You could simply run a cronjob that dispatches different signals like:
"hourly_signal", "daily_signal" and listen for them anywhere.

Just my 0.02,
Marc

PS: Maybe that should go to django-developers instead of django-users.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Vote to support dreamhost mod_python

2007-05-04 Thread Marc Fargas Esteve
One module I saw someday on my list of new packages on Debian:

from apt-cache show apache2-mpm-itk
Description: multiuser MPM for Apache 2.2
 The ITK Multi-Processing Module (MPM) works in about the same way as the
 classical "prefork" module (that is, without threads), except that it
allows
 you to constrain each individual vhost to a particular system user. This
 allows you to run several different web sites on a single server without
 worrying that they will be able to read each others' files.
 .
 Please note that this MPM is highly experimental, and is not from the same
 tree as the other MPMs.

The day it becomes "stable" it can be a nice thing, but for now the most
secure way is FastCGI ;)

About:
> Having two options is better than having only one. :)

Sure, but not if one of the two options means that your application is
readable by **any** user on that system (remember: you would need to give
'www-data' privileges to read you application data, which means that **ANY**
user could also read your app. data) which means that on a shared hosting
scenario **THis is not an option**

It can be on a private/dedicated server but **never** on a shared hosting,
on the most simple case the use of mod_python would allow any user on the
system to read your settings.py and you know what's on settings.py...
(database_password, etc ...).

On 5/4/07, Graham Dumpleton <[EMAIL PROTECTED]> wrote:
>
>
> On May 4, 7:31 pm, "Marc Fargas Esteve" <[EMAIL PROTECTED]> wrote:
> > Has far as I know you cannot run mod_python applications as different
> users,
> > everything runs as the web server user except with some experimental
> module
> > around there, if this is the case, I would not go for mod_python.
>
> Which experimental module are you talking about? Do you mean the
> Apache PerChild MPM which was supplied in Apache 2.0 but was removed
> in Apache 2.2? My understanding is that PerChild wasn't viewed as
> being stable enough for mainstream use and why it was removed from
> Apache. Thus, not perhaps a good idea that it be used.
>
> Graham
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Vote to support dreamhost mod_python

2007-05-04 Thread Marc Fargas Esteve
Has far as I know you cannot run mod_python applications as different users,
everything runs as the web server user except with some experimental module
around there, if this is the case, I would not go for mod_python.

Anyway, as far as I know dreamhost supports FastCGI and Django works with
that, why don't you use it? With FastCGI your application would be run with
**your** username which is far better than running everything as the web
server user ;)

On 5/4/07, Alessandro Ronchi <[EMAIL PROTECTED]> wrote:
>
>
> If you are a dreamhost customer, you can vote to ask the support of
> mod_python:
>
> https://panel.dreamhost.com/?tree=home.sugg&category=Software%20Installations&search=mod_python
>
> Please take 5 minutes to do that!
> --
> Alessandro Ronchi
> Skype: aronchi - Wengo: aleronchi
> http://www.alessandroronchi.net - Il mio sito personale
> http://www.soasi.com - Sviluppo Software e Sistemi Open Source
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: django-Postgre bug?

2007-04-15 Thread Marc Fargas Esteve
Hi,
2007-04-15 11:23:06 CEST ERROR:  no se puede truncar una tabla
referida en una llave foránea
2007-04-15 11:23:06 CEST DETALLE:  La tabla «galeria_galeria» hace
referencia a «galeria_album».
2007-04-15 11:23:06 CEST HINT:  Trunque la tabla «galeria_galeria» al
mismo tiempo, o utilice TRUNCATE ... CASCADE.

PostgreSQL is telling you that the table galeria_album which you are trying
to TRUNCATE is being referred by some row/s on the table galeria_galeria. In
your MySQL setup that could mean that those rows did not exist or that MySQL
simply did not care about the foreign key (which is possible).

As the error message says you should truncate both tables at once or specify
the keyword CASCADE at the end of the TRUNCATE sequence which would make
postgresql delete the refered galeria_galeria objects that would end with
broken foreign relations.

If you plan to use MySQL again you should take special care on data
integrity. PostgreSQL does not have a bug on this it simply throws an error
before allowing you data to be corrupted ;)

Cheers,
Marc

On 4/15/07, aaloy <[EMAIL PROTECTED]> wrote:
>
>
> 2007/4/15, Grupo Django <[EMAIL PROTECTED]>:
> >
> > This is the postgrelog:
> > 2007-04-15 11:23:06 CEST ERROR:  no se puede truncar una tabla
> > referida en una llave foránea
> > 2007-04-15 11:23:06 CEST DETALLE:  La tabla «galeria_galeria» hace
> > referencia a «galeria_album».
> > 2007-04-15 11:23:06 CEST HINT:  Trunque la tabla «galeria_galeria» al
> > mismo tiempo, o utilice TRUNCATE ... CASCADE.
> > 2007-04-15 11:23:06 CEST SENTENCIA:  TRUNCATE TABLE galeria_album
> > 2007-04-15 11:23:06 CEST ERROR:  transacción abortada, las consultas
> > serán ignoradas hasta el fin de bloque de transacción
> > 2007-04-15 11:23:06 CEST SENTENCIA:  INSERT INTO
> > galeria_album(nombre,path) VALUES('Galeria','media/fotos/')
> > 2007-04-15 11:23:06 CEST ERROR:  inserción o actualización en la tabla
> > «galeria_album» viola la llave foránea «padre_id_refs_id_8fc3037»
> > 2007-04-15 11:23:06 CEST DETALLE:  La llave (padre_id)=(0) no está
> > presente en la tabla «galeria_album».
> > 2007-04-15 11:23:06 CEST SENTENCIA:  END
> > 2007-04-15 11:23:38 CEST ERROR:  no se puede truncar una tabla
> > referida en una llave foránea
> > 2007-04-15 11:23:38 CEST DETALLE:  La tabla «galeria_galeria» hace
> > referencia a «galeria_album».
> > 2007-04-15 11:23:38 CEST HINT:  Trunque la tabla «galeria_galeria» al
> > mismo tiempo, o utilice TRUNCATE ... CASCADE.
> > 2007-04-15 11:23:38 CEST SENTENCIA:  TRUNCATE TABLE galeria_album
> > 2007-04-15 11:23:38 CEST ERROR:  transacción abortada, las consultas
> > serán ignoradas hasta el fin de bloque de transacción
> > 2007-04-15 11:23:38 CEST SENTENCIA:  INSERT INTO
> > galeria_album(nombre,path) VALUES('Galeria','media/fotos/')
> >
> > I'm gonna check what you said about referential integrity. I'll post
> > again if I solve it and if I don't.
> >
> >
>
> Hello!
>
> I would start looking at:
>
> > 2007-04-15 11:23:06 CEST ERROR:  no se puede truncar una tabla
> > referida en una llave foránea
> > 2007-04-15 11:23:06 CEST DETALLE:  La tabla «galeria_galeria» hace
> > referencia a «galeria_album».
>
> As the previous posts said the problem is not Django related but
> database related. Perhaps different length in the keys?
>
> Best regards,
>
> --
> Antoni Aloy López
> Binissalem - Mallorca
> http://apsl.net
> Soci de Bulma - http://www.bulma.cat
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Which ajax framework django will support in the upcoming 1.0, prototype/dojo/jquery?

2007-04-10 Thread Marc Fargas Esteve
Hi Erdong,
If you do a simple search for "AJAX" on this group you'll find the answer
you're looking for, in brief: Django **will not** advocate for a specific
ajax framework/library it provides useful tools to ease your development i.e.
Serializers but as jacob sais a few days ago: "why should you trust *our*
choices when it comes to JavaScript?" you can read the full text of that
in
http://www.pythonthreads.com/articles/interviews/django-shines-when-it-comes-to-developing-content-oriented-web-sites.htmlwhich
also has an answer to your question.

Cheers,
Marc

On 4/10/07, erdong ma <[EMAIL PROTECTED]> wrote:
>
> I do not know if a decision has been made on the ajax framework in 1.0.
> Anyone knows some message about this.
> By the way, how about the Eclipse + pydev comparing with the Wing IDE?
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Announcing Django 0.96!

2007-03-24 Thread Marc Fargas Esteve
Hi James,
Maybe the release notes should say that newforms do not yet support File
uploads in an easy way (see #3297) just to warn people moving from oldforms
to newforms ;)

Cheers,
Marc.

On 3/23/07, James Bennett <[EMAIL PROTECTED]> wrote:
>
>
> We're pleased to announce the release of Django 0.96 today; this
> release involves cleanup and stabilization of features from the 0.95
> release, along with some nice new features: an integrated testing
> framework, the first release of the newforms library, and a ton of
> useful improvements.
>
> There are also a few backwards-incompatible changes, documented in the
> release notes[1], but for most users this should be a simple and
> painless upgrade. One particular change, however, bears mentioning
> explicitly: users of MySQL who are relying on older versions of the
> MySQLdb adapter will need to upgrade their copy of MySQLdb to at least
> version 1.2.1p2 or switch to the new "mysql_old" backend until they
> can upgrade. Check out the release notes for details on this and all
> other backwards-incompatible changes.
>
> The full release, as always, is available from the "download page on
> djangoproject.com:
> http://www.djangoproject.com/download/
>
> A huge round of thanks is due to everyone who's reported bugs,
> submitted patches, triaged tickets and helped out in countless other
> ways; we'd never be able to do this without you :)
>
> [1] http://www.djangoproject.com/documentation/release_notes_0.96/
>
> --
> "Bureaucrat Conrad, you are technically correct -- the best kind of
> correct."
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Can I write standalone Python app that uses Django auth, DB and models?

2007-03-22 Thread Marc Fargas Esteve
Sure you can, as long as you define the DJANGO_SETTINGS environment variable
and import the models!

Then its up to you how you interface the models from another app ;)

On 3/23/07, Mike Stoddart <[EMAIL PROTECTED]> wrote:
>
>
> Hi folks,
>
> I was hoping someone could let me know if it's possible for Django
> models, authentication and database access (among others) can be used by
> a standalone application (i.e. not a web app)?
>
> For example, I have a web app that defines a number of models. People
> use the web interface but I also want to write some Python utils that
> access the same database and data using the same models as standalone
> applications.
>
> Is this possible?
>
> Thanks
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: database table prefix

2007-02-27 Thread Marc Fargas Esteve

Prefixes have been discussed sometimes, you can look at ticket #891
i.e. Or search this group about that...

One "hackish" option you could go on is use different SITE_ID's in
your sites, and either make your applications take care of SITE_ID (a
foreignkey to Sites could help) or set the db_table Meta option
something like:

from django.conf import settings
   db_tabe = 'this_app_table_site_%d' % settings.SITE_ID

but I'd rather make the applications understand SITE_ID and work accordingly.

Cheers,
Marc

On 2/28/07, Jason  Sidabras <[EMAIL PROTECTED]> wrote:
>
> Sorry, mis-typed before. But I'm trying to see how this might work for
> my case.
>
> My mistake was that I am not trying to create multiple databases. Just
> multiple tables.
>
> So app named foo typically creates a table:
> foo_news
>
> and I would like it to be:
> site_one_foo_news
>
> Jason
>
> On Feb 27, 5:03 pm, "Rubic" <[EMAIL PROTECTED]> wrote:
> > You could assign DATABASE_PREFIX as an
> > environment variable, then have settings.py
> > get the value (untested):
> >
> >   # settings.py
> >   import os
> >   DATABASE_PREFIX = os.environ['DATABASE_PREFIX']
> >   DATABASE_NAME = "site_%s_foo" % DATABASE_PREFIX
> >
> > Then run manage.py from the command line:
> >
> >   $ DATABASE_PREFIX="one" ./manage.py ...
> >   $ DATABASE_PREFIX="two" ./manage.py ...
> >
> > --
> > Jeff Bauer
> > Rubicon, Inc.
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Upcoming Django release, and the future

2007-02-27 Thread Marc Fargas Esteve

Hi Andrew,
There's a ticket for that openned: http://code.djangoproject.com/ticket/3589
And it's closed as fixed :)

On 2/27/07, Andrew Diederich <[EMAIL PROTECTED]> wrote:
>
> On Monday, February 26, 2007, 4:39:29 PM, James Bennett wrote:
>
> > On 2/26/07, Andrew Diederich <[EMAIL PROTECTED]> wrote:
> >> On Monday, February 26, 2007, 3:00:30 PM, Jacob Kaplan-Moss wrote:
> >> > For the other bit, though, see [4624].
> >>
> >> This ticket doesn't exist. I looked for similarly numbered ones, but
> >> didn't find it.
>
> > That's changeset 4624, not ticket 4624:
> > http://code.djangoproject.com/changeset/4624
>
> Whoops -- I knew about the #ticketnumber searching in trac, but not
> the [changeset] shortcut.  Thanks.
>
> This changeset just applies to the install.txt file.  Is there one
> that changes the generated settings.py file?  By default it's
> something like:
>
> DATABASE_ENGINE = ''   # 'postgresql', 'mysql', 'sqlite3' or 
> 'ado_mssql'.
>
> and it'd be better if it also specified postgresql_psycopg2 as well.
> I'm happy to log a ticket if that's the best way to get it recorded
> and included.
>
> --
> Best regards,
>  Andrew Diederich
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: postgresql views and django

2007-02-22 Thread Marc Fargas Esteve
If the views are already there you can use ./manage.py inspectdb to get
"guessed" models for those views (django will simply treat them as normal
tables), you'll get in trouble if you try to create or update entries of
this model unless you have written INSERT/UPDATE/DELETE rules on the view.

>From django's POV the view is a table, if you have a model that represents
it you're done. There's a "db_table" attribute on the Meta class which you
can use to make the model refer to the view.

The issue comes if the view **is not** there when you run ./manage.py syncdb
as Django will create the table for the model.

You have a few options in this case:
* Create the view before "syncdb"
* Hook on a pre-syncdb signal to create the view or a fake table
* Hook on a post-syncdb signal to drop the (fake)table or create the
view
* There's a ticket on code.djangoproject.com with a patch to get an
optional attribute on Meta "create_table = False" to avoid this issue.

... You should have no trouble to work with views ;)

Hope this Helps!

On 2/22/07, Johannes Wolter <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I'm new to django and eager to give it a try.
> Now I have a task, where I have data in a postgresql db and i want to
> visualize this data using django. My question now is if it is possible to
> connect the django models with postgresql views which are accessing the
> postgresql tables with the real data.
>
> So my question is
> a) if django really cares if it is operating on views or real tables (I
> only
> need to read the data, no writing)
> b) how complicated it is to create views in postgresql which are fitting
> the
> needs of djangos models
> (c) How about the indices django creates?)
>
> I don't want to get detailed instructions how to do this, just a guess if
> it
> will work and/or if this sounds like a reasonable thing to do.
>
> I tried "django-admin instpectdb", but the problem is, that I don't need
> most
> of the tables in the db, so I get lots of models I don't need and even the
> models I need have many attributes which are useless for the
> visualization.
> But if "inspectdb" is the easier and safer approach, it would be fine too.
>
> I'm glad for any hint!
>
> Cheers,
> Johannes
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django Cheat Sheet

2007-02-13 Thread Marc Fargas Esteve

wow!

On 2/13/07, Lars Stavholm <[EMAIL PROTECTED]> wrote:
>
> John Sutherland wrote:
> > Hi all,
> >
> > Firstly, sorry for the cross-post.
> >
> > My employer, Mercurytide [1], as some of you may have seen in the
> > past, publishes white-papers on a monthly basis. This month it's
> > another Django themed one: a Django cheat sheet:
> >
> > 
> >
> > We've spent a fair bit of time on it and would really appreciate the 
> > following:
> >
> > 1. That you download it; try it out and enjoy it!
> > 2. Give us feedback, we know it's not going to be perfect first time,
> > so let us know: [EMAIL PROTECTED]
> > 3. You publicise it: it would be awesome to get it on the digg front
> > page [2]; but put it on your blog, your del.icio.us or where ever...

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---