Re: ORM, Oracle and UTF-8 encoding problem.

2013-01-10 Thread Jani Tiainen
10.1.2013 8:59, Ian Kelly kirjoitti: On Wed, Jan 9, 2013 at 11:40 PM, Jani Tiainen wrote: If we just force using force_unicode everything works except in older versions of cx_Oracle (our server had 5.0.4 or something) connection strings can't be unicode for some reason. Sure, that's why the c

how can i toggle django boolean field automatically

2013-01-10 Thread Okorie Emmanuel
hi am doing an app in which i intend to toggle the boolean field automatically based on certain requirements. Pls how i achieve this -- 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.c

Re: how can i toggle django boolean field automatically

2013-01-10 Thread Sergiy Khohlov
Model has ability to set default value to the field. https://docs.djangoproject.com/en/dev/ref/models/fields/#editable If you would like to set values on runtime please set those value in to form constructor. Many thanks, Serge +380 636150445 skype: skhohlov 2013/1/10 Okorie Emmanuel : > hi

RE: how can i toggle django boolean field automatically

2013-01-10 Thread Babatunde Akinyanmi
Hi Emma, Your question is kinda vague cos you didn't mention under what situation you want the field to be updated automatically. That said, I have a feeling you are interested in signals. Check the documentation for django's inbuilt signals feature. You can make your app listen for a signal and ma

Re: Star Rating System In Django

2013-01-10 Thread Sergio Zambrano
I don't know what dJango or agon is, but I created a new rating system using just a font, and css to render e.g. "3.5 out of 5" into three and a half stars, while the html says just that. No divs, no images, no Canvas, no SVG, no JavaScript, no Flash, no extra spans. http://socialblogsitewebde

Execution time of a long process results in an Internal Server Error 500

2013-01-10 Thread Mauro Sánchez
Hello, I have a process that takes about 2 or 3 minutes to execute. The problem is that sometimes (not always) it results in an Internal Server Error 500 because of the time it takes. Is there a way to configure Apache or mod_wsgi to prevent this? Let's say, that even if the process takes 10 or 15

Re: Execution time of a long process results in an Internal Server Error 500

2013-01-10 Thread Bill Freeman
Maybe. But it's generally considered a bad idea to tie up a request thread for that long. A more common solution is to arrange for a background task to do the heavy lifting. If the user must know when the task is done, you can poll in JavaScript. Bill On Thu, Jan 10, 2013 at 8:21 AM, Mauro Sán

AW: Execution time of a long process results in an Internal Server Error 500

2013-01-10 Thread Szabo, Patrick (LNG-VIE)
I’ve had the exact same problem a couple of weeks ago. There is a timout that you can define for apache however it somehow didn’t take when i tried it. You really should consider a background task, as Bill suggested. For me it was a query that took forever. I was able to cut the time in half by

Near term disadvantages of Django+Python 3 stack?

2013-01-10 Thread John
I understand that Django 1.5 RC supports Python 3, but for the sake of this question let's assume the 1.5 GA was already out. As a developer, I want to use latest possible stable versions. However, are there other implications for using a Py3 stack here? For example, might I in the near futu

Correct way to specifiy database-level column defaults

2013-01-10 Thread john . woltman
What is the best way to specify a database level default value with Django? If I want a timestamp column to default to the SQL function now(), is there an accepted way to make it happen? Or to default a boolean column to True? I notice that when I call *manage.py sqlall* I don't see any * DEF

Re: Execution time of a long process results in an Internal Server Error 500

2013-01-10 Thread Tom Evans
On Thu, Jan 10, 2013 at 1:21 PM, Mauro Sánchez wrote: > Hello, I have a process that takes about 2 or 3 minutes to execute. The > problem is that sometimes (not always) it results in an Internal Server > Error 500 because of the time it takes. > Is there a way to configure Apache or mod_wsgi to pr

Re: Announcment - django-databrowse

2013-01-10 Thread Derek
I for one hope that django.contrib.auth is never "wiped off" and handed off to some random third party. I think that the framework would be much poorer for its loss and I'm happy to trade off for a "slower and dirtier" Django to be able to keep its presence. On Wednesday, 9 January 2013 01:17

Re: pip search raises "time out"

2013-01-10 Thread j_syk
I just tried it and it returned about 3500 results. Did you really want that many results? running "pip search --help" shows that you can set a --timeout flag, and the default is 15 seconds try: pip search --timeout=30 Django On Wednesday, January 9, 2013 8:34:41 AM UTC-6, Matias Montenegro

Re: Execution time of a long process results in an Internal Server Error 500

2013-01-10 Thread Brian Schott
+1 http://pypi.python.org/pypi/django-celery is a good solution for this kind of background task. It opens up a lot possibilities like django-celery-email for background email sending, etc. Keep your web contexts as short as possible. For the AJAX server-side integration, check out: http://www

How to use database router, only when using admin and user auth ?

2013-01-10 Thread Fellipe Henrique
Hello, I have a "dbname" field in my user Profile... and I have one database to store all default django data, like users, sessions etc.. when I try to get some ovject in a view, I will get to other database setted in "dbname" profile... I make this code: from django.contrib.auth.models import

Re: Correct way to specifiy database-level column defaults

2013-01-10 Thread Stefano Probst
An example: > from django.db import models > from django.utils.datetime_safe import datetime > class URL(models.Model): > full_URL = models.URLField(max_length=400) > short = models.CharField(max_length=8) > date = models.DateTimeField(default=datetime.now) Django fill in the default

Re: Correct way to specifiy database-level column defaults

2013-01-10 Thread donarb
On Thursday, January 10, 2013 6:04:47 AM UTC-8, john.w...@tpiengineering.com wrote: > > What is the best way to specify a database level default value with > Django? If I want a timestamp column to default to the SQL function now(), > is there an accepted way to make it happen? Or to default a

Re: Near term disadvantages of Django+Python 3 stack?

2013-01-10 Thread Nikolas Stevenson-Molnar
Python 3 support isn't considered ready for production use as of Django 1.5, as it hasn't received much real-world testing. For more info, see this blog post by the dev team: https://www.djangoproject.com/weblog/2012/aug/19/experimental-python-3-support/ _Nik On 1/10/2013 5:47 AM, John wrote: > I

Need help configuring Apache production server on Raspberry PI to work with Django.

2013-01-10 Thread 7equivalents
Hello, I need help configuring the Apache production server to work with Django on a Rapberry pi. I am still new to Linux. Here is what I've done so far. (1) I have successfully installed Apache on my Raspberry pi. I have used it to serve up php webpages. (2) I have successfully installed Djang

Re: Announcment - django-databrowse

2013-01-10 Thread Alireza Savand
Yes, Correct. I agree with `django.contrib.auth` specially since 1.5 when it went pluggable. It's a mistake to say django should be clean as possible. Just imagine ORM, forms or some other core features get split, Django will no longer be Django. But look at some of the apps in `django.contrib.*`,

Re: Need help configuring Apache production server on Raspberry PI to work with Django.

2013-01-10 Thread Nikolas Stevenson-Molnar
>From there, it should just be configuration. What errors are you seeing? _Nik On 1/10/2013 10:59 AM, 7equivale...@gmail.com wrote: > Hello, I need help configuring the Apache production server to work > with Django on a Rapberry pi. I am still new to Linux. Here is what > I've done so far. > > (

Re: Need help configuring Apache production server on Raspberry PI to work with Django.

2013-01-10 Thread Nikolas Stevenson-Molnar
Also, IIRC mod-wsgi has to be compiled against a specific version of Python, so you may have a version mismatch. I ran Apache + Django + Python 2.7 once and I ended up building modwsgi myself against Python 2.7 (I think the pre-built was 2.6). _Nik On 1/10/2013 10:59 AM, 7equivale...@gmail.com wr

Re: Need help configuring Apache production server on Raspberry PI to work with Django.

2013-01-10 Thread 7equivalents
When you say "From there it should just be configuration." Do you mean either (1) Configuring mod-wsgi to work with apache, or (2) Configuring mod_wsgi to work with Django. The errors where involved with my first attempt at installing mod-wsgi according to the Django instructions, However now

Re: Need help configuring Apache production server on Raspberry PI to work with Django.

2013-01-10 Thread Nikolas Stevenson-Molnar
I mean configuring Apache, as described here: https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/modwsgi/ If you're not too attached to Apache, I personally find it easier to use Gunicorn with Nginx: http://gunicorn.org/#deployment _Nik On 1/10/2013 12:27 PM, 7equivale...@gmail.com wrot

Re: Need help configuring Apache production server on Raspberry PI to work with Django.

2013-01-10 Thread Bill Freeman
The apache configuration files must have, at a minimum, a WSGIScriptAlias directive. There is also a list of the apache modules which get loaded, and mod_wsgi must be included. mod_wsgi must be linked against the particular apache, but the distribution, if you're using the OS's package manager, s

Django and Heroku Static Image Files Disappearing

2013-01-10 Thread That guy
Hi there :) On heroku, do static images expire after some point and automatically get deleted? My situation is that I retrieve images from my PostgreSQL database through a model's ImageField by setting its upload_to equal to static/images. Then, I access the images through mysitesurl.com/sta

Re: show an image in django

2013-01-10 Thread Mario Gudelj
Have you tried removing {{ STATIC_URL }} and replacing it with a slash (/)? Or try appending the slash to the end of "E:/code/python/djangoBook/django-testapp-develop/static" in STATICFILES_DIRS. You can also add DJANGO_ROOT = dirname(dirname(abspath(__file__))) to the top of your settings.py and

Re: Near term disadvantages of Django+Python 3 stack?

2013-01-10 Thread Russell Keith-Magee
On Thu, Jan 10, 2013 at 9:47 PM, John wrote: > I understand that Django 1.5 RC supports Python 3, but for the sake of > this question let's assume the 1.5 GA was already out. As a developer, I > want to use latest possible stable versions. However, are there other > implications for using a Py3

Re: Announcment - django-databrowse

2013-01-10 Thread Russell Keith-Magee
On Fri, Jan 11, 2013 at 3:00 AM, Alireza Savand wrote: > Yes, Correct. > I agree with `django.contrib.auth` specially since 1.5 when it went > pluggable. > It's a mistake to say django should be clean as possible. > Just imagine ORM, forms or some other core features get split, Django will > no lo

Re: Django and Heroku Static Image Files Disappearing

2013-01-10 Thread Filip Wasilewski
Hi, On Thursday, January 10, 2013 10:14:19 PM UTC+1, That guy wrote: > > Hi there :) > > On heroku, do static images expire after some point and automatically get > deleted? > Heroku dyno file system is not persistent between restarts and you have to store your media files outside of Heroku - h

Re: show an image in django

2013-01-10 Thread @jeffblack360
I think your configuration should allow you to hit your image from your browser via the following link: http://localhost:8000/static/images/gauge_example.jpg If that works change your replace {{STATIC_URL}} with '/static/'... On Tuesday, January 8, 2013 8:41:55 AM UTC-6, jianhui chen wrote: >

Re: Pluggable Q&A Django App

2013-01-10 Thread ian
Hi Natasha, I'm looking for the same thing you are, that's how I found your post! Did you find anything that can be plugged or wrote your own? On Tuesday, August 7, 2012 1:53:03 PM UTC-4, natash...@utoronto.ca wrote: > > Hi All, > > I'm looking to implement a Stack Overflow style Q&A feed on my

Django realtime output to browser

2013-01-10 Thread ximin chen
I 'm trying to output something to browser in real-time. I started a subprocess.Popen() by django in server side, and I want to redirect these output from Popen to browser in real-time way. How to do that? Thanks! -- You received this message because you are subscribed to the Google Groups "Dj

Re: Django realtime output to browser

2013-01-10 Thread Nikolas Stevenson-Molnar
It would help to know a little more about what you're trying to accomplish. What sort of content are you wanting to deliver back to the browser? If you're trying to stream content (video, audio, etc.) then Django isn't the best solution for that... you'll want to look for a server designed to stre

Re: Correct way to specifiy database-level column defaults

2013-01-10 Thread Mike S
> > For `DateField`s and `DateTimeField`s specifically, also take a look at > the `auto_now` and `auto_now_add` keyword arguments, documented > here: > https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.DateField -- You received this message because you are subscribed t

storing large amounts of text in the DB

2013-01-10 Thread Mike
My users will upload text documents ranging from hundreds to thousands of words. At the moment I store the text in a TextField. Is this going to cause a performance problem in the future or would it be better to store the text on the file system and put a file path in the data model? The tex

Form validation

2013-01-10 Thread Kristofer
Hello, I am using FormWizard with a 12-step form. On step 6, I want to perform verification on a field but it depends on fields that were entered in steps 2-5. I cannot figure out how to get data from the previous steps in the form validation for step 6. Where is a point in the FormWizard

Re: Correct way to specifiy database-level column defaults

2013-01-10 Thread donarb
auto_now and auto_now_add don't work at the database level for raw SQL inserts or updates. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/noYf3kz3qMYJ. To