How to implement code that runs in the background?

2008-12-25 Thread Fluoborate
I have a philosophical question. How should I implement code that runs in the background, automatically, and continuously? What is a safe and kosher way to do that? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Django form HTML is rendered as TEXT

2008-12-25 Thread Eric Abrahamsen
On Dec 26, 2008, at 10:56 AM, s4shre...@gmail.com wrote: > > Hi Guys, > I am new to Django . My Django form HTML is rendered as TEXT . It > does not display the HTML as such. Are you maybe getting autoescaped? http://docs.djangoproject.com/en/dev/topics/templates/#id2 Eric > > > Please

Re: Pseudo OneToOneFields

2008-12-25 Thread Brent Hagany
Happily, my copy of Pro Django by Marty Alchin came a few days ago, and the history app that Marty explains near the end of the book is perfect for what I need. A completely different approach to the problem, but I'm sure it's much better than anything I would have come up with. So, if you read

ImportError

2008-12-25 Thread Vicky
I am having a model in my application. I tried to get the values form shell by typing: from x.models import datasets but its giving an error: Traceback (most recent call last): File "", line 1, in ? ImportError:

Re: Django form HTML is rendered as TEXT

2008-12-25 Thread Steve Phillips
Hi, Is it some html that's generated by Django or do you have something generating it? SP On 12/25/08, s4shre...@gmail.com wrote: > > Hi Guys, > I am new to Django . My Django form HTML is rendered as TEXT . It > does not display the HTML as such. > > Please assist. > >

Re: django static-generator and fastcgi

2008-12-25 Thread Jeff Anderson
CreativeConvergence wrote: > Hello, > > I'm using nginx and I'd like to use the static-generator middleware > but the example is for a proxy to apache and I'm using nginx with > fastcgi. > > Do you have an example setup of static-generator & nginx/fastcgi ? > I've never used this middleware,

Re: Customizing ModelForm fields appearance

2008-12-25 Thread Praveen
You can create your own template and may add extra field and use your style sheet. On Dec 23, 10:48 pm, sergioh wrote: > You can always add your own custom fields, by default they override > the default fields that becomes with the modelform, and there is an >

Django form HTML is rendered as TEXT

2008-12-25 Thread s4shreyas
Hi Guys, I am new to Django . My Django form HTML is rendered as TEXT . It does not display the HTML as such. Please assist. Thanks in Advance Regards Dmitri --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Question on Models: ImageField API

2008-12-25 Thread Stanklees
I've been stuck on this same problem. It doesn't seem like Django likes to save ImageFields nicely. Can someone please show us the right way to save an ImageField? 'Cause I've looked everywhere, and I can't figure it out. --~--~-~--~~~---~--~~ You received this

django static-generator and fastcgi

2008-12-25 Thread CreativeConvergence
Hello, I'm using nginx and I'd like to use the static-generator middleware but the example is for a proxy to apache and I'm using nginx with fastcgi. Do you have an example setup of static-generator & nginx/fastcgi ? Regards, F.Roland --~--~-~--~~~---~--~~ You

Re: Why doesn't syncdb ever modify or drop tables anymore?

2008-12-25 Thread Ramiro Morales
On Thu, Dec 25, 2008 at 8:21 PM, Fluoborate wrote: > > It never modified tables? But in the tutorial, you "accidentally" omit > the __unicode__ method and then you add it in later, and that works. > Was the __unicode__ method simply an attribute of the Python and not > the

Re: Why doesn't syncdb ever modify or drop tables anymore?

2008-12-25 Thread Fluoborate
It never modified tables? But in the tutorial, you "accidentally" omit the __unicode__ method and then you add it in later, and that works. Was the __unicode__ method simply an attribute of the Python and not the database, and that's why it works? Also, shouldn't sqlclear appname drop the

Re: image uploading via admin, and an error...

2008-12-25 Thread Mutaz
How did you work around it garagefan? I'm getting the same error and don't know what is going wrong. I guess I have everything installed very well with PIL. Thanks On Dec 11, 3:41 am, garagefan wrote: > alright, managed to work my way around and get the jpeg uploading

Re: Simple ManyToManyField/Model question

2008-12-25 Thread Chris Czub
Perfect, the "extra fields" and an intermediary relationship model were exactly what I needed. Thanks. On Thu, Dec 25, 2008 at 3:14 PM, Ramiro Morales wrote: > > On Thu, Dec 25, 2008 at 5:13 PM, Chris Czub wrote: >> >> >> I think I need to use a

Re: Is there any possibility that one project connect with more than one databases?

2008-12-25 Thread mdomans
>From what I know(this is about 0.96.3 version) you can use two databases only by rewriting db module. Adding a dispatcher layer over the database connection, probably best with a simple wrapper. Have in ming that it may slow connections eventually.

Re: dynamically instantiate a model at run time

2008-12-25 Thread bruno desthuilliers
On 24 déc, 15:01, Jeff FW wrote: > I think you've got a small typo in the code there, that might be > confusing to the OP--shouldn't the get_model() call have quotes around > "tag"? Like so: > model_class = get_model("test", "tag") Nope. In the OP's code, 'tag' is a variable

Re: Simple ManyToManyField/Model question

2008-12-25 Thread Ramiro Morales
On Thu, Dec 25, 2008 at 5:13 PM, Chris Czub wrote: > > > I think I need to use a ManyToManyField for this but I'm having > trouble finagling it to be the way I want. Here's what I have right > now but I can't figure out where to put the amount and unit for the >

Re: no module named _sqlite3 on Mac OS X

2008-12-25 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-12-25, o godz. 13:50, przez Rick Dooling: > django.core.exceptions.ImproperlyConfigured: Error loading sqlite3 > module: No module named _sqlite3 > > I'm running sqlite3 fine and also using Python to access it from the > command line, but Django is not seeing it

Simple ManyToManyField/Model question

2008-12-25 Thread Chris Czub
I am trying to make an application for recipes using Django. I am starting simple and going from the tutorial but not getting the results I want. In a less strict framework I'd be able to represent what I want to easily but I'm having trouble figuring out how to do it the Django way while keeping

Re: Why doesn't syncdb ever modify or drop tables anymore?

2008-12-25 Thread Chris Czub
syncdb has never been able to modify existing models. In order to get some functionality like that, look into django-evolution: http://code.google.com/p/django-evolution/ -Chris On Thu, Dec 25, 2008 at 1:11 AM, Fluoborate wrote: > > Running the command: > python manage.py

Re: Using Django authentication for phpBB

2008-12-25 Thread Grigory Fateyev
Hello Giles Thomas! On Thu, 11 Dec 2008 18:34:21 + you wrote: > > Hi all, > > All of the code to support Django logins for phpBB is now up > available in a Google code project: > > http://code.google.com/p/django-login-for-phpbb/ > > Drop me a line if you find it useful or have any

Re: Executing logic for each object in object_list

2008-12-25 Thread Roy
There don't seem to be any built-in signals to respond to retrieval of a record from the db? Or you're suggesting I write a custom signal? Where would I fire the event? On Dec 25, 6:22 pm, "Antoni Aloy" wrote: > 2008/12/25 Roy : > > > > > Is it

Template does not exist error

2008-12-25 Thread ramanathan
When i tried the url http://localhost:8000/admin/ i got a error of type Template does not exist... pls help me to overcome it... regards Ramanathan. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Get model name

2008-12-25 Thread Alex Koshelev
Foo._meta.object_name On Thu, Dec 25, 2008 at 2:44 PM, Kless wrote: > > How to know the name of the model? i.e. > > class Foo(models.Model): > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Get model name

2008-12-25 Thread Kless
How to know the name of the model? i.e. class Foo(models.Model): --~--~-~--~~~---~--~~ 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

Re: How should I handle dynamically generated images?

2008-12-25 Thread burcu hamamcıoğlu
You can use this class in your models.py class Category(CommanInfo): name = models.CharField(max_length=30) display_name = models.CharField(max_length=30) list_image = models.FileField(upload_to="uploads/images",null=True, blank=True) to use the image in html you must

list_display - display all fields

2008-12-25 Thread Kless
In the 'list_display' control, is possible display all fields without having to list them? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: no module named _sqlite3 on Mac OS X

2008-12-25 Thread Kenneth Gonsalves
On Thursday 25 Dec 2008 6:20:18 pm Rick Dooling wrote: > and can create projects etc.  Using Holovaty and Kaplan-Moss book, that book deals with django .96 not with latest svn -- regards KG http://lawgon.livejournal.com --~--~-~--~~~---~--~~ You received this

Re: set session expiry time in settings.py

2008-12-25 Thread Christian Joergensen
burcu wrote: > Him Team, > > i want to set session expiry time in settings.py. Could you please > help me regarding this case? http://docs.djangoproject.com/en/dev/topics/http/sessions/#session-cookie-age -- Christian Joergensen http://www.technobabble.dk

Re: Why doesn't syncdb ever modify or drop tables anymore?

2008-12-25 Thread Kenneth Gonsalves
On Thursday 25 Dec 2008 11:41:38 am Fluoborate wrote: > Used to add tables and modify tables if necessary. I don't remember if > it ever dropped tables. It was great, I would modify models.py and > syncdb and it would just work afaik it never modified tables and never will -- regards KG

Re: Executing logic for each object in object_list

2008-12-25 Thread Antoni Aloy
2008/12/25 Roy : > > Is it possible? Or I need to page my queryset in the wrapper function > and do it there? (it seems not DRY to simply copy-paste the pagination > logic from object_list) > > Basically I have several object_list wrappers for a particlar model, > and I want to

set session expiry time in settings.py

2008-12-25 Thread burcu
Him Team, i want to set session expiry time in settings.py. Could you please help me regarding this case? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

How should I handle dynamically generated images?

2008-12-25 Thread Fluoborate
I have a website that generates images (PNG's of graphs), and I want those images to show up on the website, but I don't know how to do this. Is this possible: 1. Store the image file in an ImageField() in the SQLite 3 database. How do I do this? 2. Get the image from the database and easily

Is there any possibility that one project connect with more than one databases?

2008-12-25 Thread David
Dear all, I am a newbie in Django and python, now trying to construct a website with more than one databases on the backend. My question here is, if there any possibility that using 2 different databases inside one project(website)? If yes, how can I do this? If no, why does Django framwork not

Why doesn't syncdb ever modify or drop tables anymore?

2008-12-25 Thread Fluoborate
Running the command: python manage.py syncdb Used to add tables and modify tables if necessary. I don't remember if it ever dropped tables. It was great, I would modify models.py and syncdb and it would just work. Then something changed, and I don't know why. Now, syncdb never modifies or drops