Hi
If this is a sequence then why not use python list comprehensions,
nest them together and concatenate the different parts into a string.
http://docs.python.org/tutorial/datastructures.html#nested-list-comprehensions
you could even do it with recursive method calls.
Point is. If its not 'random+
Postgres uses a unix style user model. Its intuitive once you understand it:
I would seriously advise you to read the tutorial for this:
http://www.postgresql.org/docs/manuals/
FInd out the version you are using too.
Specifically:
1.2. Architectural Fundamentals
onwards.
That error just means
I mis-read this... basically you have one view and in the template you
are rendering you put HTML:
so that path will call your other views which return content as
content_type='image/png' or whatever specific format you're using.
what i was suggesting is you could have:
So in your urls.p
Hi
How about one view that takes arguments as either POST or GET params?
> 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?
Ok so you can load a canvas.
Just to illustrate here is a view that puts dots on a map *m
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 app will have answers an
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 th
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):
> > import random
>
> >
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
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 à 12:21, nai a écrit :
>
>
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 écrit :
>
>
>
>
>
>
>
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
> > the site success
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 anyone
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 some part of the code is slow so I
> >
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 u
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 m
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?
> ===
>
>
> FeinCMS is one of the mo
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*
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
is that we're all "co
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
Fol
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) _filter_o
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 pyFacebook. For some
> p
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 attribute that will be
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
..
...
2
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 integration projects and ea
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"
for
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 is how I integrate it:
> >
> > In views
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
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
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,
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 orama_financial.models import TargetFu
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:
>
> > How pass custom data to login template? (Seems onl
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 orama_financial.models import TargetFund
>
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'))
> top_1
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, **kwargs):
> try:
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 probably with
> your Postg
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 a
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, {
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
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
> > FigureCanvas
> > from matp
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 user
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 syncdb:
> 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 t
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
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 do that. Do i need to c
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
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 imp
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 that.
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()
e
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$requ
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 is
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 met
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()
ax=fig.add_subp
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 default "login" view, but yo
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 can just do a distinct() o
54 matches
Mail list logo