Re: Reverse foreign key lookup with unknown model

2009-01-31 Thread Antoni Aloy
; a = A() > Just use a property in A class A(models.Model): @property def connected(sefl): try: x = self.b except: # put the real exception here x = self.c return x -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net --~--~-

Re: Template tags question

2009-01-31 Thread Antoni Aloy
your logic to pass the data in a way that could be iterated and presented in the way you want. So just pass to the template the list wicth contains the fnal data. -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net --~--~-~--~~~---~--~~ You received

Re: Change widgets in ModelFormSet

2009-01-30 Thread Antoni Aloy
eset are generated following alwasy the same rules, so you can be sure that id would be always the same. Get the id and add a css acording, for exemple. -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net --~--~-~--~~~---~--~~ You received this m

Re: XML Serialization Speed

2009-01-25 Thread Antoni Aloy
ype and test the performance for each. For one of my applications I found that lxml+mako templates was the best solution for me, but perhaps it's not your case. http://diveintopython.org/performance_tuning/timeit.html -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net

Re: reusing the same block in extends "base.html"

2009-01-02 Thread Antoni Aloy
gt; > You can create a tag, depending on how your application is could make sense. What's clear is that you can't use the same block name twice. Best regards, -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net --~--~-~--~~~---~--~~ You receive

Re: request.user is set to None

2008-12-29 Thread Antoni Aloy
cant access to its properties. So double check that you have SessionMiddleware and AuthenticationMiddleware configured in your settings.py, and if it fails give more information about how you're accessing to the User object. Hope it helps! -- Antoni Aloy López Blog: http://tres

Re: django i18n for google

2008-12-27 Thread Antoni Aloy
? You could create a url that links to your localized site so Google would be able to crawl it, but I suppose that your site depens on changing the language via POST, isn't it? I that case, you could write yourselve the code and allow changing the code using GET. -- Antoni Aloy

Re: Getting value of field from form.

2008-12-27 Thread Antoni Aloy
emplate it's just a matter to write {{form}} Hope it helps! -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Executing logic for each object in object_list

2008-12-25 Thread Antoni Aloy
practice to have database- > insertion logic inside template tags. > --~--~-~--~~~---~--~~ Sounds like a work for signals http://docs.djangoproject.com/en/dev/topics/signals/ -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net --~--~--

Re: PDF to Text Coverter

2008-12-22 Thread Antoni Aloy
ask. > > Is there any python library is available to read a pdf files... ? > > Or any library to convert the pdf into text files? > > If you have any idea about above issues > > please let me know... > > Regards > Harish Bhat M -- Antoni Aloy

Re: MySpace clone using Django? Is it possible?

2008-12-20 Thread Antoni Aloy
users and company needs that getting a pre-built solution and just change the css. -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: How to return a specified column from database

2008-12-13 Thread Antoni Aloy
other querying methods. >> >> -- >> "Bureaucrat Conrad, you are technically correct -- the best kind of correct." > > > -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net --~--~-~--~~~---~--~~ You received t

Re: best practices for SOAP client in Django

2008-12-05 Thread Antoni Aloy
, connection pooling etc For the Django point of view is just another library, in the form of a service we instatiate in the application __init__.py. I don't know if this is the best way to do it, but it works quite well for us. Best regards, -- Antoni Aloy López Blog: http://trespams.com Site: http:

Re: Best IDE for Django and python?

2008-11-25 Thread Antoni Aloy
2008/11/25 Kurczak <[EMAIL PROTECTED]>: > > I wonder why no one mentioned Komodo IDE or Komodo Edit. > They're my personal favorites for bigger projects. Both are well > suited for dynamic languages and really lightweight compared to > Bloatclipse with pydev (or aptana). I have tested Komodo

Re: Caching and I18n

2008-11-25 Thread Antoni Aloy
round for the next > one and will give feedback once that's been done. > It's nice to help! But you have to consider this is my first patch on Django core, and I just be really sure that everything is ok when one of django main developers double check the tests :) -- Antoni Aloy López Blog:

Re: Caching and I18n

2008-11-20 Thread Antoni Aloy
it > should be fairly straightforward as well. So it looks close. > > Regards, > Malcolm Anybody on this thread is going to take the ticket? I could take a look at it and make the tests. Best regards, -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net --~--~-~--~~

Re: Template translation

2008-11-11 Thread Antoni Aloy
e using the right language in your browser, that is the language on which you want the pages or you have managed yourself to change the languaje. -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net --~--~-~--~~~---~--~~ You received this messag

Re: How can I print all of received variables in template ?

2008-11-11 Thread Antoni Aloy
2008/11/11 K*K <[EMAIL PROTECTED]>: > > Hi, all. > > I want to write a page template for test my program. > > How can I print all of variables posted to the template? > > Just like Django's error page. well, just check the Django code ;) -- Antoni Aloy López

Re: How to use post_save signal

2008-11-05 Thread Antoni Aloy
instancia = kwargs['instance'] # Creates the object who's going to store the username usuari = Eliminat(user=instancia.username) # and the save it usuari.save() pre_delete.connect(registra, sender=User) }}} Hope it helps! Best r

Re: PostgreSQL with Psycopg2

2008-10-13 Thread Antoni Aloy
sql-client-8.3 >postgresql-contrib-8.3 > 5. Psycopyg2-2.0.8.tar.gz - Downloaded & Installed. > > Have you tried to import Psycopyg directly from the Python interpreter? Double check that you really have psycopg2 installed. On ubunto to th /usr/lib/python2.5/site-pacakges and type

Re: Introducing django-cms

2008-09-09 Thread Antoni Aloy
2008/9/8 Thomas Steinacher <[EMAIL PROTECTED]> Hi Thomas! > > @Antoni Aloy: > What do you mean by integration? Like integrating other applications > (e.g. a gallery) into the CMS? We're still looking for a good solution > to do that (e.g. by providing an API which allows to

Re: Introducing django-cms

2008-09-08 Thread Antoni Aloy
opment and we would appreciate any > feedback and contributions. > > I also like very much http://code.google.com/p/django-page-cms/ . Your project seems more oriented to a end user cms, and django-page-cms is more oriented towards integration. Anyway I like the idea of have a multi-language Django-based c

Re: changing code = restarting django??

2008-09-05 Thread Antoni Aloy
t; In php when you change the code there is no need to restart the > server, but in j2ee its necessary to recompile everything. how does > that work in django? > > > > -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net --~--~-~--~~~--

Re: URLs rewrite

2008-07-09 Thread Antoni Aloy
gt; > http://www.mysite.com/widgets/purplewidget.php > > needs to redirect to > > http://www.mysite.com/widgets/purplewidget/ It seems a task for apache mod_rewrite http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html Hope it helps! -- Antoni Aloy López Blog:

Re: Basic CRUD form with navigation layout

2008-06-25 Thread Antoni Aloy
Hi Leandro, I have updated the appfusedjango to show an example of grid with search and pagination using jqGrid with a minor patch to use it with Django. Hope it helps! -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net

Re: Development environment

2008-06-25 Thread Antoni Aloy
e mode. Best regards, -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net --~--~-~--~~~---~--~~ 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@

Re: Basic CRUD form with navigation layout

2008-06-25 Thread Antoni Aloy
my free time. Best regrads, -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: Basic CRUD form with navigation layout

2008-06-25 Thread Antoni Aloy
ion. Best regards, -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net --~--~-~--~~~---~--~~ 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@goo

Re: Basic CRUD form with navigation layout

2008-06-24 Thread Antoni Aloy
hould read about django newforms, on the second one you should read about your RIA (Dojo, jQuery, extjs, etc) and the documentation about Django serialization. Best regards, -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net --~--~-~--~~~---~--~~ Yo

Re: Cache problem with language

2008-02-02 Thread Antoni Aloy
age() for header in headerlist: value = request.META.get(header, None) if value is not None: ctx.update(value) return 'views.decorators.cache.cache_page.%s.%s.%s.%s' % ( key_prefix, iri_to_uri(request.path), ctx.hexdigest(),lang) cache._generate_cac

Re: Making a front end administration

2007-12-23 Thread Antoni Aloy
uce data to the application, and lest you to administer the data in a friendly way. Users usually want's more and more and you will find yourself hacking the Django admin code to fit the user needs. -- Antoni Aloy López Binissalem - Mallorca http:

Re: i18n/setlang no longer support GET

2007-12-19 Thread Antoni Aloy
he > developer. It would be better if the view supported both ways and the > developer could choose whether they wanted functionality or spec > compliance. This isn't a simple change, and it shouldn't be decided > just like that... Same as I. It's easy to solve, but it's quite annoying th

Re: Model advice, i18n and content

2007-12-12 Thread Antoni Aloy
Just an issue, I've lots of problems with Django i18n and cachés. So if you decide not to use different urls for the language and just take the page language from the browser or let the user to change it manually, be careful with per-view-cache as far as I know is not i18n friendly. -- Antoni

Re: Understanding per view cache

2007-12-09 Thread Antoni Aloy
I have one solution (patching the cache) so the cache key is generated using the current language. What I can't see is that the key generation takes into account the vary headers to generate the cache, so perhaps I have not undesrtood the documentation. -- Antoni Aloy López Binissalem

Understanding per view cache

2007-12-09 Thread Antoni Aloy
, but I not able to make it work. Any ideas? I have a test project in http://code.google.com/p/appfusedjango/source if somebody want's to play with it. -- Antoni Aloy López Binissalem - Mallorca http://www.trespams.com Soci de Bulma - http://www.bulma.cat

Re: Time estimation for a Django project

2007-11-16 Thread Antoni Aloy
n is more undertandable than function points and in my oppinion gives better estimation results for web projects. Hope it helps! -- Antoni Aloy López Binissalem - Mallorca http://www.trespams.com Soci de Bulma - http://www.bulma.cat --~--~-~--~~~---~--~~ You received

Error in the http module in trunk

2007-11-11 Thread Antoni Aloy
versions as in 6473. Anybody has a similar problem? -- Antoni Aloy López Binissalem - Mallorca http://www.trespams.com Soci de Bulma - http://www.bulma.cat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: CSS problem

2007-11-01 Thread Antoni Aloy
('', (r'^media/(?P.*)$', 'django.views.static.serve', {'document_root':'./media/'}), ) -- Antoni Aloy López Binissalem - Mallorca http://www.trespams.com Soci de Bulma - http://www.bulma.cat --~--~-~--~~~---~--~~ You received this message because you

Re: CSS problem

2007-11-01 Thread Antoni Aloy
l see how it deals with the media. On the other hand, it just uses the ideas of http://www.djangoproject.com/documentation/0.96/static_files/ but splitting the configuration . The trunk version is rock solid and has lot of improvements. -- Antoni Aloy López Binissalem - Mallorca http://www.trespams

Re: CSS problem

2007-11-01 Thread Antoni Aloy
mod_python also i prefer using the development > server for sometime) > > Goutham > I have created an small start project with django, that will show you how to load css and image files from the development server http://appfusedjango.googlecode.com/svn/ Hope it helps! -- Antoni A

Stub django project

2007-10-19 Thread Antoni Aloy
Hello! I have just created a project at http://code.google.com/p/appfusedjango/, the idea is to have a simple application to start with which shows and solves some of the common questions one can have when starts a project. Hope it helps! -- Antoni Aloy López Binissalem - Mallorca http

Re: Templates

2007-10-18 Thread Antoni Aloy
s the language, or perhaps I'm missing something... -- Antoni Aloy López Binissalem - Mallorca http://www.trespams.com Soci de Bulma - http://www.bulma.cat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Consuming a SOAP services from Django

2007-10-17 Thread Antoni Aloy
ce module and the model module. Hope it helps! -- Antoni Aloy López Binissalem - Mallorca http://www.trespams.com Soci de Bulma - http://www.bulma.cat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&

Problem with sessions

2007-10-02 Thread Antoni Aloy
but it would be nice to know it somebody has the same problem or "is only on my machine". Regards, -- Antoni Aloy López Binissalem - Mallorca http://www.trespams.com Soci de Bulma - http://www.bulma.cat --~--~-~--~~~---~--~~ You received this message b

Re: i18n/setlang no longer support GET

2007-09-26 Thread Antoni Aloy
lowed. That's true, but this makes i18n/setlang unworth for usual applications, so I would prefer to have the option to be a bad boy and use the GET request. -- Antoni Aloy López Binissalem - Mallorca http://www.trespams.com Soci de Bulma - http://www.bulma.cat --~--~-~--~~~--

<    1   2