Re: Easy way to add tables to existing database?

2005-09-22 Thread Kenneth Gonsalves
On Thursday 22 Sep 2005 10:55 pm, jocknerd wrote: > Make the change to the model and then run django-admin.py sql > myproject.  I'm using PostgreSQL so I type psql databasename and then > create the new table with the sql code for the new table that was > generated previously.  Then I restart the

NEW: render_to_response and render_to_string

2005-09-22 Thread Adrian Holovaty
I've added two new helper functions that help you use less code: django.core.extensions.render_to_response() django.core.template_loader.render_to_string() Here's an example. OLD: from django.core import template, template_loader from django.utils.httpwrappers import HttpRespon

Re: Easy way to add tables to existing database?

2005-09-22 Thread Adrian Holovaty
On 9/22/05, jocknerd <[EMAIL PROTECTED]> wrote: > What's the easiest way to add a table to an existing database. I'm > currently destroying the database and recreating it but this will be a > problem once I've got real data. I was thinking about doing this: > > Make the change to the model and th

Easy way to add tables to existing database?

2005-09-22 Thread jocknerd
What's the easiest way to add a table to an existing database. I'm currently destroying the database and recreating it but this will be a problem once I've got real data. I was thinking about doing this: Make the change to the model and then run django-admin.py sql myproject. I'm using PostgreS

Re: Duplicate objects

2005-09-22 Thread paolo
[EMAIL PROTECTED] ha scritto: > Hi > > I'm bing a bit slow I think. All i want to do is get an object and > create a new entry that is a duplicate of it. > The parameter save_as should do what your need. Model reference document offers more details.

Duplicate objects

2005-09-22 Thread [EMAIL PROTECTED]
Hi I'm bing a bit slow I think. All i want to do is get an object and create a new entry that is a duplicate of it. Does anyone have any idea? Thanks Charlie