Re: Stackoverflow kind of Answer/commenting app in Django

2011-04-11 Thread Anoop Thomas Mathew
http://osqa.net/ regards, atm ___ Life is short, Live it hard. On 12 April 2011 07:04, AJ wrote: > I was wondering if there is a pluggable application in Django that I > can use which is a replica of Stackoverflow kind Answer and > commenting. > > Each post on my web

Re: Is it possible to output a graph from Matplotlib into Django like this?

2011-04-11 Thread nai
You have to bear with me but where does background come from? So I can use the save() method from the PIL library is that right? And I can do something like this: return render_to_response('template.html', {'graph':response}) Where graph is just a variable in my django template (and not ) Is

Re: Is it possible to output a graph from Matplotlib into Django like this?

2011-04-11 Thread nai
Actually, could you illustrate how you would go about using 2 views as well? Thanks! On Apr 11, 6:39 pm, Xavier Ordoquy wrote: > Le 11 avr. 2011 à 12:21, nai a écrit : > > > > > > > > > > > This is the give example from Matplotlib for Django: > > > def simple(request): > >  

Re: Is it possible to output a graph from Matplotlib into Django like this?

2011-04-11 Thread Sam Walters
Use python imaging: http://www.pythonware.com/products/pil/ You can return a response with an image of the graph. response = HttpResponse(status=200, mimetype="image/gif") background.save(response, "GIF") return response There is no 'best practice for this' Some people i know use flash. However

Re: Is it possible to output a graph from Matplotlib into Django like this?

2011-04-11 Thread nai
One reason why I don't quite like the idea is because I am writing a reporting webapp and there are many different graphs that can generated. Needing to write 2 views for 1 type of graph can get pretty tedious! On Apr 11, 6:39 pm, Xavier Ordoquy wrote: > Le 11 avr. 2011 à

Re: Is it possible to output a graph from Matplotlib into Django like this?

2011-04-11 Thread nai
I will try to the 2 views method and see how I get on but in it would be great if you could answer my questions too! Why does it go against best practices? How would one go about doing it anyway? On Apr 11, 6:39 pm, Xavier Ordoquy wrote: > Le 11 avr. 2011 à 12:21, nai a

Re: can not download file from my site ( django + uwsgi )

2011-04-11 Thread Lei Zhang
the static file is returned by nginx, and it is works well. But the file returned by dynamic pages does't works very well. On Mon, Apr 11, 2011 at 7:23 PM, Roberto De Ioris wrote: > > > Hi all, > > > > If the site is started by './manager runserver', I can download file from >

Stackoverflow kind of Answer/commenting app in Django

2011-04-11 Thread AJ
I was wondering if there is a pluggable application in Django that I can use which is a replica of Stackoverflow kind Answer and commenting. Each post on my web app will have answers and all answers can have comments discussing that answer, just like SO. Does anyone know such an app or has

Re: Best practice for using Redis in Django?

2011-04-11 Thread λq
Thanks guys, How to use single connection for worker? And what's the advantage of cleanup in middleware? On Mon, Apr 11, 2011 at 9:58 PM, Alexander Schepanovski wrote: > On 11 апр, 17:45, λq wrote: > > Hi list, > > > > I am building a Django website, but

Re: Please find it in your hearts to expose filter_or_exclude at a global level.

2011-04-11 Thread sh...@bogomip.com
Strange, I must have replied to the author only. It seems as though I was a goof and after looking through the source I discovered how the model manager handles functions for the queryset. xyz.objects.get_query_set()._filter_or_exclude(...) does the trick. I assumed it wasn't available without

[JOB] Python/Django Developer, NYC

2011-04-11 Thread OSS
POSITION: Python/Django Developer/Consultant LOCATION: New York City, but mostly telecommute DURATION: 6-12 months COMPENSATION: 40-60/hour (dep on exp) HOURS: 20 +/- hours per week My New York City client is looking for a well-seasoned Python/Django Developer for a 6-12 month contract job. The

Re: FeinCMS 1.3.0 final has been released!

2011-04-11 Thread Shige Abe
Congratulations! I can't wait for what's to come! On Sun, Apr 10, 2011 at 11:44 PM, Matthias Kestenholz wrote: > Hello everyone > > FeinCMS 1.3.0 has just been released and is available at the usual places. > > > > What is FeinCMS anyway? > === > > >

Urgent Requirement: - Python Developer // 9 months // San Jose, CA

2011-04-11 Thread Amit Reks
Hello, Greetings!!! We have an opening for a *Python Developer* in San Jose, CA. We would highly appreciate it if you could recommend someone for it, in case you are not interested... Please find the job description below. *Job Title: Python Developer* *Job Location: San Jose, CA*

Re: Please find it in your hearts to expose filter_or_exclude at a global level.

2011-04-11 Thread Jacob Kaplan-Moss
On Mon, Apr 11, 2011 at 11:23 AM, sh...@bogomip.com wrote: > IMHO (which is very H) _filter_or_exclude should be public.  I can't > find a compelling reason for it not to be other than it has never > been. Just go ahead and use it if you find it useful! The Python philosophy

Password Auto-reset and Expiry Policy (every X Months)

2011-04-11 Thread Harish Tejwani
What would be the best module or app that can support a) User's Password expiring every 6 months, so they are forced to change it b) For new user's that get system generated passwords, and are forced to change at FIRST login Any ideas/suggestions would help how to go about implementing this

Please find it in your hearts to expose filter_or_exclude at a global level.

2011-04-11 Thread sh...@bogomip.com
I often have to filter or exclude based on a search boolean. Writing duplicate code for both queries or selecting which of the two functions using my own function feels horribly repetitive since a function doing exactly that exists in the base model query manager. IMHO (which is very H)

Re: What do you use to build facebook applications with django?

2011-04-11 Thread Mengu
facebook api is all about asking for it to do something and getting the response of it. what are you stuck with? On Mar 16, 5:46 pm, mongoose wrote: > Hi, > > I've been struggling so much trying to get a Facebook app to work on > the Django framework. Mostly battling with

Re: Best Practice for Raw SQL

2011-04-11 Thread Jacob Kaplan-Moss
On Mon, Apr 11, 2011 at 7:53 AM, Dan Gentry wrote: > Where I run into trouble is that the query returns data in columns, > but not objects. That means that I can’t reference an object attribute > using dot notation in my templates or views. Instead, I have to > include each

Re: how to Generate a 5 character unique alpha-numeric string

2011-04-11 Thread werefr0g
Well, I don't think it is safe but you can first retrive Max('pk') then, you can increment its base 36 related number then use the result's string equivalent. Le 11/04/2011 08:48, GKR a écrit : I meant to say not random. serial eg: .. .. 2A00A 2A00B .. .. .. 2A00Z 2A010 2A011 .. ...

Re: What do you use to build facebook applications with django?

2011-04-11 Thread mongoose
I'm still lost with all of this. Haha.. Thanks for the advice, I will try out some of the javascript stuff. On Mar 16, 4:58 pm, "OrazioPirataDelloSpazio (Lorenzo)" wrote: > Hello, > I was in your same situation some weeks ago. > I checked almost all the django-facebook

ie6 redirect problem

2011-04-11 Thread kimia
my django project works fine with firefox4 and ie7 , but login fails in ie6 and shows: MultiValueDictKeyError at /accounts/login/ "Key 'username' not found in " In fact the html form sends nothing .I've googled before and found that ie6 changes "post" to "get" when redirects.but I tried "get"

Re: Best practice for using Redis in Django?

2011-04-11 Thread Artur Wdowiarski
I'd rather do the cleanup in a middleware class. 2011/4/11 Alexander Schepanovski > On 11 апр, 17:45, λq wrote: > > Hi list, > > > > I am building a Django website, but some part of the code is slow so I > > migrated data and view functions to Redis. This

Best Practice for Raw SQL

2011-04-11 Thread Dan Gentry
My application includes some existing tables from another, non-Django application. One of them does not have an atomic primary key, and I’m not in a position to change that. Therefore, I’m using one raw SQL to access the data. Where I run into trouble is that the query returns data in columns, but

Re: problems with redirect function

2011-04-11 Thread Daniel Roseman
On Monday, April 11, 2011 3:42:26 PM UTC+1, Antonio Sánchez wrote: > > http://docs.djangoproject.com/en/dev/topics/http/shortcuts/#redirect > > "You can use the redirect() function in a number of ways. > 2. By passing the name of a view and optionally some positional or > keyword arguments; the

Re: problems with redirect function

2011-04-11 Thread Antonio Sánchez
http://docs.djangoproject.com/en/dev/topics/http/shortcuts/#redirect "You can use the redirect() function in a number of ways. 2. By passing the name of a view and optionally some positional or keyword arguments; the URL will be reverse resolved using the reverse() method" I think it's possible,

Re: NameError at / global name 'volatility' is not defined

2011-04-11 Thread Tongas
Thanks man! "filter(volatility_lte = var)" it's the solution On Apr 11, 11:16 am, Daniel Roseman wrote: > On Monday, April 11, 2011 2:36:21 PM UTC+1, Tongas wrote: > > > Hi! > > views.py > > context_processors.py > > from django.db.models import Avg > > from

Re: How pass custom data to login template? (Seems only some like 'next' param are allowed!?)

2011-04-11 Thread Chris Seberino
Perhaps can wrap the default login view by calling it in my own view? I really just need to add a few elements to dict I assume gets emitted by it. cs On Apr 11, 5:00 am, bruno desthuilliers wrote: > On 11 avr, 01:20, ChrisSeberino wrote: > >

Re: NameError at / global name 'volatility' is not defined

2011-04-11 Thread Tongas
Thanks man! How to use ORM to "where volatility <= 30" ? On Apr 11, 11:16 am, Daniel Roseman wrote: > On Monday, April 11, 2011 2:36:21 PM UTC+1, Tongas wrote: > > > Hi! > > views.py > > context_processors.py > > from django.db.models import Avg > > from

Re: NameError at / global name 'volatility' is not defined

2011-04-11 Thread Daniel Roseman
On Monday, April 11, 2011 2:36:21 PM UTC+1, Tongas wrote: > > Hi! > views.py > context_processors.py > from django.db.models import Avg > from orama_financial.models import TargetFund > > def fund_context(request): > avg_all = TargetFund.objects.all().aggregate(Avg('volatility')) >

Re: Best practice for using Redis in Django?

2011-04-11 Thread Alexander Schepanovski
On 11 апр, 17:45, λq wrote: > Hi list, > > I am building a Django website, but some part of the code is slow so I > migrated data and view functions to Redis. This is how I integrate it: > > In views.py > > redis_db = redis.Redis(host='', db='') > > def _redis_cleanup(sender,

Re: syncdb just hangs/tutorial

2011-04-11 Thread L Corbani
Shawn, In fact, it was an issue with my database settings. I changed the host and now it is working. Thanks for helping me shift my brain a bit this morning :) Lori On Apr 11, 9:31 am, Shawn Milochik wrote: > Try it with sqlite3. If that works, then the problem is

Re: syncdb just hangs/tutorial

2011-04-11 Thread jsierra
Can you provide information on what OS you are using? It may just be a configuration issue. I had to edit the postgresql pg_hba.conf file on my ubuntu setup to make it less strict (for development purposes). https://help.ubuntu.com/community/PostgreSQL read on 'managing the server' section to get

NameError at / global name 'volatility' is not defined

2011-04-11 Thread Tongas
Hi! views.py from django.http import HttpResponse from django.template import Context, RequestContext from django.shortcuts import render_to_response from context_processors import fund_context from orama_financial.models import TargetFund def home(request): c = RequestContext( request, {

Re: Advice: project hosting apps

2011-04-11 Thread Peter Herndon
Thanks very much for the advice, all! I greatly appreciate it. ---Peter On Apr 4, 2011, at 9:25 AM, Peter Herndon wrote: > Hi all, > > I'm tasked to build an internal project hosting site similar to Github > or Bitbucket for my employer, and I'm wondering what the current > state-of-the-art is

Re: Is it possible to output a graph from Matplotlib into Django like this?

2011-04-11 Thread Derek
On Apr 11, 12:39 pm, Xavier Ordoquy wrote: > Le 11 avr. 2011 à 12:21, nai a écrit :> > > > This is the give example from Matplotlib for Django: > > > def simple(request): > >    import random > > >    from matplotlib.backends.backend_agg import FigureCanvasAgg as > >

Re: syncdb just hangs/tutorial

2011-04-11 Thread Shawn Milochik
Try it with sqlite3. If that works, then the problem is probably with your Postgres setup. Try interacting with Postgres using the psql command. It's likely that you have some problem in the configuration. -- You received this message because you are subscribed to the Google Groups "Django

syncdb just hangs/tutorial

2011-04-11 Thread L Corbani
I am new to django, and am running the tutorial. I have edited 'settings.py' and am running "python manage.py runserver". When I run the server and then call "python manage.py syncdb" against my Postgres database, everything just hangs. If I kill 'runserver', then I get this message from

Re: can not download file from my site ( django + uwsgi )

2011-04-11 Thread Roberto De Ioris
> Hi all, > > If the site is started by './manager runserver', I can download file from > the site successfully. But the strange is that I can not download file > from > it when it deployed using nginx and uwsgi. It just return part (25KB) of > the whole file(1MB). > does anyone know how to fix

Re: need some help with my first project

2011-04-11 Thread Luterien
Thanks for the replies! I guess i should start reading the docs on templates now. -- 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

Re: need some help with my first project

2011-04-11 Thread bruno desthuilliers
On 11 avr, 11:35, Luterien wrote: > Hello. I'm a newbie web developer and i'm trying to learn Django. > > I'm working on a blog project,i've almost completed the index page > which shows 10 latest posts. Now i want to add Categories to the > sidebar,but i dont know how to

Re: problems with redirect function

2011-04-11 Thread Daniel Roseman
On Monday, April 11, 2011 12:00:37 AM UTC+1, Antonio Sánchez wrote: > > hi, im trying to use redirect shortcut, but im having problems passing > arguments to the view i want to reverse. > > view definition is this: > > def profile(request, activation_key=None, new=None): > if new is None: >

Re: Is it possible to output a graph from Matplotlib into Django like this?

2011-04-11 Thread Xavier Ordoquy
Le 11 avr. 2011 à 12:21, nai a écrit : > This is the give example from Matplotlib for Django: > > def simple(request): >import random > >from matplotlib.backends.backend_agg import FigureCanvasAgg as > FigureCanvas >from matplotlib.figure import Figure >from matplotlib.dates

Re: need some help with my first project

2011-04-11 Thread Kenneth Gonsalves
On Mon, 2011-04-11 at 02:35 -0700, Luterien wrote: > Hello. I'm a newbie web developer and i'm trying to learn Django. > > I'm working on a blog project,i've almost completed the index page > which shows 10 latest posts. Now i want to add Categories to the > sidebar,but i dont know how to do

Best practice for using Redis in Django?

2011-04-11 Thread λq
Hi list, I am building a Django website, but some part of the code is slow so I migrated data and view functions to Redis. This is how I integrate it: In views.py redis_db = redis.Redis(host='', db='') def _redis_cleanup(sender, **kwargs): try: redis_db.connection.disconnect()

Re: can not download file from my site ( django + uwsgi )

2011-04-11 Thread Jeffrey4l
I am sorry for paste wrong code. here is the uwsgi_param config {{{ uwsgi_param QUERY_STRING $query_string; uwsgi_param REQUEST_METHOD $request_method; uwsgi_param CONTENT_TYPE $content_type; uwsgi_param CONTENT_LENGTH $content_length; uwsgi_param REQUEST_URI

can not download file from my site ( django + uwsgi )

2011-04-11 Thread Jeffrey4l
Hi all, If the site is started by './manager runserver', I can download file from the site successfully. But the strange is that I can not download file from it when it deployed using nginx and uwsgi. It just return part (25KB) of the whole file(1MB). does anyone know how to fix this? here

need some help with my first project

2011-04-11 Thread Luterien
Hello. I'm a newbie web developer and i'm trying to learn Django. I'm working on a blog project,i've almost completed the index page which shows 10 latest posts. Now i want to add Categories to the sidebar,but i dont know how to do that. Do i need to create a get_categories view or use another

Is it possible to output a graph from Matplotlib into Django like this?

2011-04-11 Thread nai
This is the give example from Matplotlib for Django: def simple(request): import random from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure from matplotlib.dates import DateFormatter fig=Figure()

Re: How pass custom data to login template? (Seems only some like 'next' param are allowed!?)

2011-04-11 Thread bruno desthuilliers
On 11 avr, 01:20, Chris Seberino wrote: > How pass custom data to login template?  (Seems only some like 'next' > param are allowed!?) > > The reason for this problem is the Django auth system doesn't ask user > to write the view for login page. django_auth provides a

Re: Creating this query with django Models

2011-04-11 Thread Thomas M
hm, I'm not quiet sure what you mean by this. Could you write an example please? Thanks,Thomas On 9 Apr., 16:03, "Martin J. Laubach" wrote: >   Let's see... > >   Since there is no aggregate on your outer select, the GROUP BY is > basically reduced to a DISTINCT, so we

Re: how to Generate a 5 character unique alpha-numeric string

2011-04-11 Thread GKR
I meant to say not random. serial eg: .. .. 2A00A 2A00B .. .. .. 2A00Z 2A010 2A011 .. ... 2A019 2A01A 2A01B -- 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

FeinCMS 1.3.0 final has been released!

2011-04-11 Thread Matthias Kestenholz
Hello everyone FeinCMS 1.3.0 has just been released and is available at the usual places. What is FeinCMS anyway? === FeinCMS is one of the most advanced Content Management Systems built on top of Django. FeinCMS not only includes a page module with many bundled content

Re: processing POST data from jquery

2011-04-11 Thread het.oosten
That was exactly what i needed. I didn't think of changing the javascript data. Thank you. -- 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