Re: django 1.3 timing out on empty POST request

2011-06-27 Thread Roberto De Ioris
Il giorno 27/giu/2011, alle ore 22.07, mehdi ait oufkir ha scritto: > Roberto, I'm actually using uWSGI 0.9.6.5. > > Can you tell me what is the issue with the previous version. I can > stop by on uwsgi IRC if you want to take the conversation off google's > groups. > > -mehdi Versions <

giving download links

2011-06-27 Thread raj
I allow a user to upload a file, how do I now allow them to download this file? I looked at the "serving static files" thing in the djangoproject, but they said it causes security flaws or something. Can someone help me? I couldn't find good information on google. Thank you. -- You received this

Re: upload file isn't working

2011-06-27 Thread raj
How do you view the debugger? I am using webfaction hosting. Otherwise, does the code look fine? On Jun 27, 5:48 am, Malcolm Box wrote: > On 24 June 2011 17:36, raj wrote: > > > > > > > > > > > > > def upload_view(request): > >    user =

Re: How to add CSRF to context when using test client???

2011-06-27 Thread andres ledesma
Hi Matteius, I stumbled across the same problem. I wanted to carry out a test case using CSRF, and I failed. I managed to add the csrf_token to my post request, but apparently this is not enough. Here I will show you the code, perhaps you will have better luck then... c =

Call SQL function within Model

2011-06-27 Thread Naoko Reeves
Dear Experts, I am using postgresql and have field type bytea. This is an encrypted field I normally decrypt value with sql function. I would like to use this function to return value from Django model. Is this possible? If so could you guide me how could I accomplish this? Thank you very much

Re: Question about Displaying a Table

2011-06-27 Thread bruno desthuilliers
On Jun 27, 8:18 pm, Kyle Latham wrote: > Hello, > > I am pretty new to Django and Python. Then I strongly suggest you take some time learning Python. I mean, pure Python, without Django. > I'm wanting to create a Django app that displays different tables in > my MySQL

ModelAdmin, custom field: default value?

2011-06-27 Thread momo2k
Hello, Is there a way to set dynamic default values for custom fields in the admin? Description of the problem: # models.py # there are two models class Meal(models.Model): name = ... def check_new_price(self, price): # checks if the price is new and creates a new price if

Re: REMOTE_USER authentication to 'Admin'?

2011-06-27 Thread Jeff Blaine
Sorry, I have no knowledge of Oracle SSO, what it allows, how it works, etc. -- 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/-/kFeKEvDSqZYJ. To post to this

Re: django 1.3 timing out on empty POST request

2011-06-27 Thread mehdi ait oufkir
(not sure if my previous message went through). Roberto, I'm using uWSGI 0.9.6.5. Can you tell me a bit more about the issue? and why this is happening only with 1.3. We can take the conversation of google group if you want. I can join the #uwsgi irc. Please let me know, -mehdi On Jun 26,

Re: django 1.3 timing out on empty POST request

2011-06-27 Thread mehdi ait oufkir
Roberto, I'm actually using uWSGI 0.9.6.5. Can you tell me what is the issue with the previous version. I can stop by on uwsgi IRC if you want to take the conversation off google's groups. -mehdi On Jun 26, 9:47 pm, "Roberto De Ioris" wrote: > > Roberto, > > > it is uWSGI,

Re: REMOTE_USER authentication to 'Admin'?

2011-06-27 Thread thiru
Hi I have a problem in my application, we are implementing oracle single sign on to our existing django application, I managed to implement SSO for the application, but I can able use the same information to login into Django admin. I like to know how to use the SSO login User information to log

SSO User Login to Django Admin Page

2011-06-27 Thread thiru
Hi Friends I have a problem in my application, we are implementing oracle single sign on to our existing django application, I managed to implement SSO for the application, but I can able use the same information to login into Django admin. I like to know how to use the SSO login User

Re: Django Model Designer - UML

2011-06-27 Thread Sushirod
I'll try the SQLeditor, thanks for the input. But I like navicat very much. http://www.navicat.com/ And the free heidiSQL for windows platform. http://www.heidisql.com/ On 26 jun, 09:24, Mateusz Harasymczuk wrote: > I found perfect tool for mac > SQLeditor + Django

Re: Question about Displaying a Table

2011-06-27 Thread Steven Elliott Jr
Django has about the best documentation out there foe getting started. Walk through the tutorial and see how it goes. Sent from my iPhone On Jun 27, 2011, at 2:25 PM, "Cal Leeming [Simplicity Media Ltd]" wrote: > Forgive me but, the tone of this email

Re: Question about Displaying a Table

2011-06-27 Thread Cal Leeming [Simplicity Media Ltd]
Forgive me but, the tone of this email sounds like you are asking us to do this research for you :X On Mon, Jun 27, 2011 at 7:18 PM, Kyle Latham wrote: > Hello, > > I am pretty new to Django and Python. > > I'm wanting to create a Django app that displays different tables

Re: questionnaire

2011-06-27 Thread Cal Leeming [Simplicity Media Ltd]
+1 on this, Bruno explained it better than my first email. On Mon, Jun 27, 2011 at 7:22 PM, bruno desthuilliers < bruno.desthuilli...@gmail.com> wrote: > On Jun 27, 12:30 pm, Coulson Thabo Kgathi wrote: > > ok > > > > #models.py file > > > > from django.db import models > >

Re: questionnaire

2011-06-27 Thread bruno desthuilliers
On Jun 27, 12:30 pm, Coulson Thabo Kgathi wrote: > ok > > #models.py file > > from django.db import models > from django.forms import ModelForm > from django import forms > from choices import YESNO, AGE, OPTIONS1, OPTIONS2, OPTIONS3, OPTIONS4, > OPTIONS5, OPTIONS6, OPTIONS7,

Re: Question about Displaying a Table

2011-06-27 Thread Ovnicraft
On Mon, Jun 27, 2011 at 1:18 PM, Kyle Latham wrote: > Hello, > > I am pretty new to Django and Python. > > I'm wanting to create a Django app that displays different tables in > my MySQL database, and the user can search through the tables for info > they want. > > I

Question about Displaying a Table

2011-06-27 Thread Kyle Latham
Hello, I am pretty new to Django and Python. I'm wanting to create a Django app that displays different tables in my MySQL database, and the user can search through the tables for info they want. I haven't written any code yet, I'm doing research on the approach I have to take. Is the only way

Re: Serving static/dynamic files under same suburl

2011-06-27 Thread Jani Tiainen
And I think pretty much any webserver can do that. But now, how to do that in development when using built-in runserver command? On Jun 27, 5:33 pm, Mick wrote: > Nginx can test to see if a file is available, and if it exist load that > instead of proxying the request to

Re: Serving static/dynamic files under same suburl

2011-06-27 Thread Mick
Nginx can test to see if a file is available, and if it exist load that instead of proxying the request to django. location / { alias /var/www/static/; if (!-f $request_filename) { proxy_pass http://127.0.0.1:8000; } } Now if /var/www/static/foo.js exists, but /var/www/static/bar.js does not

Re: Serving static/dynamic files under same suburl

2011-06-27 Thread Jani Tiainen
Apparently I didn't made myself clear enough. So let me clarify: I have two files that must be accessed using following urls: /myapp/views/foo.js /myapp/views/bar.js foo.js is a static file and can (and should) be served by using static serving, like webserver. bar.js instead is a file that

Re: Serving static/dynamic files under same suburl

2011-06-27 Thread Shawn Milochik
This can (and probably should) be handled by your Web server. For example, in nginx you may be serving the Django app with something like this: location / { proxy_pass http://127.0.0.1:8400; } And for static content nginx may direct the request elsewhere. This example

Re: loading a typical image to Django 1.3

2011-06-27 Thread vahidR
Here it is : "... importing other libs" from django.contrib.staticfiles.urls import staticfiles_urlpatterns ".URLs " urlpatterns += staticfiles_urlpatterns() On Jun 26, 8:38 pm, Kenny Meyer wrote: > What about your urls.py? > > Kenny > > > > > > > > On Sun, Jun

Django-utils @async decorator and gunicorn

2011-06-27 Thread Anton Pirker
Hello! I use djutils [1] @async decorator for calling a function asynchronous. This works well when i start my server with the standard ./manage.py runserver command. But when i run my django app under gunicorn and i call the function with the @async decorator nothing happens at all... Do i

Serving static/dynamic files under same suburl

2011-06-27 Thread Jani Tiainen
For example ExtJS 4 introduced new MVC app model. One of the features and slight drawback is quite strict directory structure. Now in most cases I can put files as static but there are occassions when I would like to leverage power of Django templates, namely some translations and urls So for

Re: Django-utils @async decorator and gunicorn

2011-06-27 Thread Javier Guerra Giraldez
On Mon, Jun 27, 2011 at 4:50 AM, Anton Pirker wrote: > But when i run my django app under gunicorn and i call the function with the > @async decorator nothing happens at all... are you running the queue consumer daemon? -- Javier -- You received this message because you are

Re: Importing file to Models - Temporary store to allow confirming?

2011-06-27 Thread Victor Hooi
Shawn, Thanks for the quick reply =). If we go with the third approach, what advantages are there to persisting the models in MongoDB (or something similar like Redid.or Cassandra), as opposed to a traditional RDBMS? (I just want to get a good handle on the issues). Furthermore, is there a

Info and warning messages in admin

2011-06-27 Thread Daniele Procida
I need to be able to distinguish between info and warning messages that get passed to the user in admin. I do this, and it works: # import the admin messages framework from django.contrib import admin, messages class SomeForm(forms.ModelForm): ... def clean(self): # create a

Re: Django won't send 500 or 404 emails, but django.core.mail.EmailMessage and django.utils.log.AdminEmailHandler work

2011-06-27 Thread Russell Keith-Magee
On Mon, Jun 27, 2011 at 8:02 PM, Russell Keith-Magee wrote: > On Mon, Jun 27, 2011 at 7:02 AM, Kyle Gong wrote: >> I was trying to avoid setting up a mail server by just sending through >> gmail's SMTP server. It is sending correctly through >>

Re: Django widget popup

2011-06-27 Thread Cal Leeming [Simplicity Media Ltd]
Github is absolutely amazing. Google :) On Mon, Jun 27, 2011 at 9:37 AM, Coulson Thabo Kgathi wrote: > no i did not. waht's github > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email

Re: questionnaire

2011-06-27 Thread Peter Murphy
On Jun 27, 8:30 pm, Coulson Thabo Kgathi wrote: > ok > Coulsen, This is a far better response. [Code snipped, but it gave me an idea of where you are coming from. ;-] > urlpatterns = patterns('', >     # Example: >     # (r'^questionSite/',

Re: Django won't send 500 or 404 emails, but django.core.mail.EmailMessage and django.utils.log.AdminEmailHandler work

2011-06-27 Thread Russell Keith-Magee
On Mon, Jun 27, 2011 at 7:02 AM, Kyle Gong wrote: > I was trying to avoid setting up a mail server by just sending through > gmail's SMTP server. It is sending correctly through > django.utils.log.AdminEmailHandler and it was my understanding that they > worked through

Re: questionnaire

2011-06-27 Thread Cal Leeming [Simplicity Media Ltd]
Hi Coulson, Okay, I'll give you some feedback as to the code you have written below: - The design below means that the actual questions are assigned to a fixed column in the database, this is *NOT* good. You want to be using a 'normalized' approach, by having the questions for the poll

Re: Sidebars

2011-06-27 Thread Cal Leeming [Simplicity Media Ltd]
Can I just clarify what you mean by sidebar? I assume you are talking about a html element with some options inside it, to allow you to navigate through the site? This is (personally) how I'd do it, although others may prefer a different style (you could probably go as far to make this whole

Re: Social Networking basics? -Raj

2011-06-27 Thread Cal Leeming [Simplicity Media Ltd]
I've made a few modifications, feel free to revert/modify to your hearts content. On Mon, Jun 27, 2011 at 5:32 AM, Kenneth Gonsalves wrote: > On Sun, 2011-06-26 at 14:43 -0400, ApogeeGMail wrote: > > I am also a newbie on this list. I have been reading the list for > >

Re: questionnaire

2011-06-27 Thread Coulson Thabo Kgathi
ok #models.py file from django.db import models from django.forms import ModelForm from django import forms from choices import YESNO, AGE, OPTIONS1, OPTIONS2, OPTIONS3, OPTIONS4, OPTIONS5, OPTIONS6, OPTIONS7, OPTIONS8, OPTIONS9, OPTIONS10, OPTIONS11, OPTIONS14, OPTIONS15, OPTIONS16, OPTIONS17,

Django-utils @async decorator and gunicorn

2011-06-27 Thread Anton Pirker
Hello! I use djutils [1] @async decorator for calling a function asynchronous. This works well when i start my server with the standard ./manage.py runserver command. But when i run my django app under gunicorn and i call the function with the @async decorator nothing happens at all... Do i

Re: Django widget popup

2011-06-27 Thread Coulson Thabo Kgathi
no i did not. waht's github -- 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 django-users+unsubscr...@googlegroups.com. For more

questionnaire and answers help

2011-06-27 Thread Coulson Thabo Kgathi
want to create a questionnaire and answers such that one question appears on the screen at a time and once the answers is selected then the it's saved then the next question is shown the answers to the questions are strictly radio butoons or drop down menu this will be used for a survey on

parametric class-based form views

2011-06-27 Thread omat
Hi all, I am trying to use generic CreateView class to handle forms for a set of models inherited from the same base class. class BaseContent(models.Model): ... class XContent(BaseContent): ... class YContent(BaseContent): ... To keep things DRY, I want to

Re: questionnaire

2011-06-27 Thread Peter Murphy
On Jun 27, 5:52 pm, Venkatraman S wrote: > On Mon, Jun 27, 2011 at 12:19 PM, Coulson Thabo Kgathi > wrote: > > > want to create a questionnaire and answers such that one question > > appears on the screen at a time and once the answers is selected then > >

Re: upload file isn't working

2011-06-27 Thread Malcolm Box
On 24 June 2011 17:36, raj wrote: > > def upload_view(request): >user = request.user >if user.is_authenticated(): >if request.method == 'POST': >form =upload_form(request.POST, request.FILES, user) >if form.is_valid(): >

How to link custom search with a view in a different app ?

2011-06-27 Thread Satyajit Sarangi
# Create your views here. from shapes.models import * from openmaps.models import * from django.shortcuts import render_to_response from django.contrib.gis.shortcuts import render_to_kml from openmaps.models import Open_Layers from django import forms from openmaps.forms import GeoForm from

Custom Admin Login Page

2011-06-27 Thread Thomas Guettler
Hi, settings.LOGIN_URL get's ignored by the admin app. I don't want two login forms, but only one. But I couldn't find a way to redirect to my custom login form from the admin pages. The only solution I found was a HTML redirect like this http://redirect-url;> Anyone else who has this

Re: Django widget popup

2011-06-27 Thread Venkatraman S
On Sat, Jun 25, 2011 at 6:51 AM, GKR wrote: > Please help > Did you try contacting the author on github? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: questionnaire

2011-06-27 Thread Venkatraman S
On Mon, Jun 27, 2011 at 12:19 PM, Coulson Thabo Kgathi wrote: > want to create a questionnaire and answers such that one question > appears on the screen at a time and once the answers is selected then > the it's saved then the next question is shown the answers to the >

questionnaire

2011-06-27 Thread Coulson Thabo Kgathi
want to create a questionnaire and answers such that one question appears on the screen at a time and once the answers is selected then the it's saved then the next question is shown the answers to the questions are strictly radio butoons or drop down menu this will be used for a survey on