Re: django DB optimization

2013-03-05 Thread Rui Silva
and look for a caching mechanism. Configuring cache in Django is fairly easy. I use Memcached as cache backend with Django. I have a database of about 6 Million users (mysql), and on each of the 3 frontends running Django, I have an instance of memcache running. Rui Silva On 03/04/2013 11:08 PM

ORA-00918: column ambiguously defined.

2012-04-12 Thread Rui Silva
Hi, I was working with django 1.3.1 and oracle and i got this error: ORA-00918: column ambiguously defined. After some digging in django/db/models/sql/compiler.py i discovered the bug/error: My models had a definition according to django sujested naming: class SampleModel(models.Model):

Re: Showing unescaped HTML in Admin pages

2009-10-12 Thread Rui Vieira
Thanks for the suggestions everyone. I went for the "allow_tags = True" solution has it is (possibly?) the simplest and it's enough for what I need. Thanks again. On Oct 12, 5:59 pm, Rui Vieira <ruidevie...@googlemail.com> wrote: > Very good solution, works perfectly! > &

Re: Showing unescaped HTML in Admin pages

2009-10-12 Thread Rui Vieira
Very good solution, works perfectly! Thanks. On Oct 12, 5:53 pm, Brian Neal wrote: > On Oct 12, 11:15 am, "ruidevie...@googlemail.com" > wrote: > > Hi everyone, > > > Is is possible to render unescaped HTML in admin pages? > > Does this help?

Re: worked fine last night, no changes but now get DoesNotExistError

2008-07-14 Thread rui
Thanks, Karen, for pointing out. The admin is yet a secret for me :) -- Rui http://ruivaldo.blogspot.com On Mon, Jul 14, 2008 at 11:46 AM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Mon, Jul 14, 2008 at 6:53 AM, rui <[EMAIL PROTECTED]> wrote: >> >> I meant the c

Re: worked fine last night, no changes but now get DoesNotExistError

2008-07-14 Thread rui
I meant the code that is called when you access: '"admin/amyprot/sequence/add/" :) Cheers. -- Rui http://ruivaldo.blogspot.com On Mon, Jul 14, 2008 at 7:42 AM, allisongardner <[EMAIL PROTECTED]> wrote: > > Okay, that is my gut instinct too, a broken relationship.

Re: worked fine last night, no changes but now get DoesNotExistError

2008-07-14 Thread rui
Hi Allison, Which database are you using ? SQLite ? The Protein.objects.all() return the desired object ? Does it returns something ? Cheers :) -- Rui http://ruivaldo.blogspot.com On Mon, Jul 14, 2008 at 6:04 AM, allisongardner <[EMAIL PROTECTED]> wrote: > > I am stumped. Database

Re: worked fine last night, no changes but now get DoesNotExistError

2008-07-14 Thread rui
Could post your view-code at "admin/amyprot/sequence/add/" ? Looks like that it is a ForeignKey broken relationship or something like this. -- Rui http://ruivaldo.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are

Re: How to display the images in the template page under the django development server

2008-07-14 Thread rui
eone correct me if i´m wrong), this configuration tells Django (on the production mode) which request.path´s are for static files and for performance reasons prevent them of generating full HttpRequests on Django app, as the others, to views. And other things like: they will not pass by middlew

Re: admin doesn't catch IntegrityErrors?

2008-07-14 Thread rui
() Sorry but i don´t have experience with the admin-app to help you on this, but this did the trick for me. Cheers. -- Rui http://ruivaldo.blogspot.com On Mon, Jul 14, 2008 at 6:23 AM, Alex Rades <[EMAIL PROTECTED]> wrote: > > Hi, > I'm using latest newforms-admin and I have a sim

Re: OneToOne and model deletion

2008-07-09 Thread rui
.objects.get(pk=1) >>> r.delete() Cheers. -- Rui On Wed, Jul 9, 2008 at 1:12 PM, alex finn <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm new to django and was trying to play around OneToOne mapping (a > very powerful feature in my mind) and found one possible issue. &g

Re: Too many values to unpack error

2008-07-09 Thread rui
Looks like you are following the djangobook, so check if your view is like: Contact us Contact us {{ form.as_table }} Cheers. -- Rui --~--~-~--~~~---~--~~ You received this message because you

Re: Markup languages vs HTML

2008-07-08 Thread rui
Hi Matic, I really think that html should not be saved on your database. Markup languages are more "human readable" and can be easily converted to HTML, if needed. And really, it just don´t look right :) Cheers and good luck. -- Rui --~--~-~--~~~---~--

Re: Grouping Items In Multiple Categories

2008-07-08 Thread rui
Hi Josh, Have you tried passing a tuple with the two columns to the group_by method ? Cheers. -- Rui On Tue, Jul 8, 2008 at 1:25 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Does anyone know of an elegant way in Django to group database items > under 2 categories. &g

Re: ForeignKey with 0 meaning Null

2008-07-07 Thread rui
) def to_python(self, value): # never gets called fp.write("to_python %r" % value) def __del__(self): fp.close() It´s justa guess. Not sure if it´s going to work. Cheers -- Rui On Mon, Jul 7, 2008 at 4:14 PM, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: &

Re: my form "didn't return an HttpResponse object."

2008-07-07 Thread rui
Remember to always _return_ a HttpResponse from your view. def myview(request): return HttpResponse("Hello World") or def myotherview(request): return render_to_response("mytemplate.html", locals()) Cheers and good luck. -- Rui On Mon, Jul 7, 2008 at 12:14 PM

Re: Foreign Key problem

2008-07-07 Thread rui
blog.id dosen´t do the trick ? Smith, you should look at ManyToMany relationships. These wiil make you models more readable and easy to deal with. Give a look here: http://www.djangoproject.com/documentation/model-api/ Cheers -- Rui On Mon, Jul 7, 2008 at 8:07 AM, smith <[EMAIL PROTEC

Re: Logout when Leaving

2008-07-07 Thread rui
I think the option: SESSION_EXPIRE_AT_BROWSER_CLOSE on settings.py would help you. Give it a try. More information on this here: http://www.djangoproject.com/documentation/sessions/ -- The world is just awesome. Boom De Yada! On Mon, Jul 7, 2008 at 6:17 AM, Christopher <[EMAIL PROTECTED]>

Re: Django, Komodo and Mac OS X

2008-04-29 Thread Rui Pacheco
This is what I had to do: Added the path to my Django uncompressed directory to Preferences -> Languages -> Python -> Additional Python Import Directories On Apr 29, 10:48 pm, Rui Pacheco <[EMAIL PROTECTED]> wrote: > It's now working. Very strange, I had a very h

Re: Django, Komodo and Mac OS X

2008-04-29 Thread Rui Pacheco
It's now working. Very strange, I had a very hard time importing django.db.models but all of a sudden it works. On Apr 29, 10:44 pm, Szaijan <[EMAIL PROTECTED]> wrote: > Hi Rui, > > I'm using Komodo Edit 4 on Mac OSX 10.5 and code completion works for > me in .py files ou

Django, Komodo and Mac OS X

2008-04-29 Thread Rui Pacheco
Hi all I've looked for a solution for this but I couldn't find any. I've installed Django on a MacBook Pro and settled on Komodo as my IDE because Eclipse on the Mac is just too slow. The problem is, I can't get code completion to work because Komodo doesn't find the Django packages. I