list_display - display all fields

2008-12-25 Thread Kless
In the 'list_display' control, is possible display all fields without having to list them? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Get model name

2008-12-25 Thread Kless
How to know the name of the model? i.e. class Foo(models.Model): --~--~-~--~~~---~--~~ 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

Changing data format in admin

2009-01-17 Thread Kless
I would show a numeric field with 3 digits into the admin interface list_display = ("%03d" % numeric,) But it fails because is required an int argument. Any idea to solve it? if there is solution. --~--~-~--~~~---~--~~ You received this message because you

Re: Changing data format in admin

2009-01-17 Thread Kless
Since admin interface isn't possible. On 17 ene, 17:19, Kless <jonas@googlemail.com> wrote: > I would show a numeric field with 3 digits into the admin interface > >    list_display = ("%03d" % numeric,) > > But it fails because is required an int

Re: Changing data format in admin

2009-01-18 Thread Kless
I answer myself. It's created a function that returns the desired way, and it's added to the list_display. def id_fixed(self): return "%03d" % self.id On 17 ene, 17:19, Kless <jonas@googlemail.com> wrote: > I would show a numeric

Choosing over a table

2009-01-23 Thread Kless
I need show a table with several rows, where the user can search any data (as admin interface). But when the user clicks about the data chosen I chosen store that option to show another table according that first election. Any idea or advise about how to get it?

Re: Choosing over a table

2009-01-23 Thread Kless
I think that django-tables is the solution https://launchpad.net/django-tables On 23 ene, 09:41, Kless <jonas@googlemail.com> wrote: > I need show a table with several rows, where the user can search any > data (as admin interface). > > But when the user clicks about

Adding a slug

2009-01-24 Thread Kless
I want to add a new field --slug-- to tables where any data is being used in the URL I dumped all data, added that new field -- slug = models.SlugField(_('slug')) -- And I created a hook to save it. -- def save(self): #if not self.slug: self.slug =

Re: Adding a slug

2009-01-24 Thread Kless
On 24 ene, 15:51, Daniel Roseman wrote: > Are you saying that the slug is not being created when you reload your > previously dumped data via ./manage.py loaddata? This is expected > behaviour. Yes, that's it. The slug is succesfully created when a new objects

Re: Need help with models

2009-01-24 Thread Kless
I also was looking for a solution for it and I found that the most optimal is the first approach --at least for me--. You have a normal table with data entered into a language by default, and then it's used another one to translating the text fields from that main table. The difference with

Re: django-smtpd allows you to handle email messages just like Django processes HTTP requests

2009-01-25 Thread Kless
The integration with the SMTP server already is solved with this project: Sos (Son Of Sam Email Server) http://www.zedshaw.com/projects/sos/ Good luck! On 24 ene, 16:29, nside wrote: > Hello, > > I just started a new project that basically allows you to write email >

Re: Optimal translation of tables

2009-01-25 Thread Kless
Not, by now. I have created the models and I'm working now on views and templates, but I haven't started to profiling SQL. On 24 ene, 20:20, Adrián Ribao wrote: > Do you use a custom Model Manager or something similar to make it > optimal? I'm using this approach now but it

Re: Using hashing for password checking in auth module

2009-01-31 Thread Kless
I recommend you to use bcrypt, the password-hashing algorithm used in OpenBSD. The advantages are that it creates and manages auto. the salt for each password entered; And the most important is that it is adaptable to future processor performance improvements.

Re: Using hashing for password checking in auth module

2009-01-31 Thread Kless
-code), so he will know what are you making with the password that is sent from a form. The best options are https or using HMAC-SHA1/RIPEMD160 On 31 ene, 12:24, Guy Rutenberg <guyrutenb...@gmail.com> wrote: > Hi Kless, > > Correct me if I'm wrong but bcrypt can be used as a solutio

Re: Using hashing for password checking in auth module

2009-02-01 Thread Kless
Hi Rutenberg, I just find anything that can be of interest for you. It's a "secure" method to login without https. Althought it isn't realy secure in comparison to https. http://www.pylucid.org/about/features/JS-SHA-Login/ On 1 feb, 09:07, Guy Rutenberg wrote: > I

Modify label from field.label_tag

2009-02-06 Thread Kless
Is possible to modify the label value got from *{{ field.label_tag }} * ? By example, if it's got: e-mail I would to modify that label to (as example): E-MAIL And *{{ field.label_tag|upper }}* is not valid because it modifies all: USERNAME Any idea?

Re: Modify label from field.label_tag

2009-02-07 Thread Kless
Does anybody could help me with this? Thanks in advance. On 6 feb, 13:53, Kless <jonas@googlemail.com> wrote: > Is possible to modify the label value got from *{{ field.label_tag }} > * ? > > By example, if it's got: > >    e-mail > > I would to modify that l

Re: Modify label from field.label_tag

2009-02-07 Thread Kless
Thanks Russel for your fast reply. My answer is down On 7 feb, 10:05, Russell Keith-Magee <freakboy3...@gmail.com> wrote: > On Sat, Feb 7, 2009 at 6:03 PM, Kless <jonas@googlemail.com> wrote: > > > Does anybody could help me with this? > > First off - please

Re: Use values of Site module on templates [SOLVED]

2008-06-22 Thread Kless
At the end, I'll get these variables directly from the Site module. And to access to them, can be made using templatetags or context processors -that is better for this case-. * Templatetags --- from django import template from django.contrib.sites.models import Site register

Add new context processors [Trick]

2008-06-22 Thread Kless
To add any new context processor, write this on your settings file: --- from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS TEMPLATE_CONTEXT_PROCESSORS = TEMPLATE_CONTEXT_PROCESSORS + \ ('project.app.context_processors.name',) --- So, neither

Serving media from Django only in development [Trick]

2008-06-22 Thread Kless
urls.py - from django.conf import settings # Serves media content. WARNING!! Only for development uses. # On production use lighthttpd for media content. if settings.DEBUG: # Delete the first trailing slash, if any. if settings.MEDIA_URL.startswith('/'):

Cryha - Toolkit for crypto on database

2008-08-20 Thread Kless
of the schema has been taken of Linux systems that store the hashed passwords so, using a ``$`` as separator. Here you can see how it is so easy to hash and encrypt/decrypt on the fly: http://github.com/kless/tw.registra/tree/master/tw/Registra/model/identity.py#L263 http://github.com/kless/tw.registra

Template - Deleting last character in loop

2009-03-26 Thread Kless
I'm building a dinamic list of links, and I want that been separated by '|' character. Note that 'foo' is a list --- {% for i in foo %} {{ i }}| {% endfor %} --- The problem is that I wantn't that last separator (because there isn't another field). I tried the

Re: Template - Deleting last character in loop [Solved]

2009-03-26 Thread Kless
I just to solve it :) --- {% ifnotequal i foo|last %}|{% endifnotequal %} --- On 26 mar, 13:46, Kless <jonas@googlemail.com> wrote: > I'm building a dinamic list of links, and I want that been separated > by '|' character. > > Note th

Alternative to AppEngine database

2009-04-03 Thread Kless
MongoDB has added a connector [1] that lets you use it as the persistent store in your Python AppEngine applications. This is very important to avoid the use of a propietary database. It would be great if there would more connectors using another key/ value databases as Tokyo Cabinet [2]. [1]

[ANN] Falcon - powering innovation

2009-04-11 Thread Kless
If anybody is interesed in new technologies, you'll love this new language called Falcon [1], which has been open sourced ago little time. Falcon is a scripting engine ready to empower mission-critical multithreaded applications. It provides six integrated programming paradigms: procedural,

Template filter with plural tag

2009-04-11 Thread Kless
I would to pluralize into a translation block [1] but I also want to apply the 'apnumber' template filter [2] --- {% load humanize %} {% load i18n %} {% blocktrans count list|apnumber as number %} There is {{ number }} object. {% plural %} There are {{ number }} objects. {% endblocktrans

Re: Template filter with plural tag [Solved]

2009-04-11 Thread Kless
Thanks! It works as charm. On 11 abr, 22:54, Malcolm Tredinnick wrote: > Indeed, this is possible. You need to use a number for the counting > portion of the blocktrans-plural combination, so that gettext can use > the number to determine the plural form. The trick is

Debug middleware

2009-05-02 Thread Kless
How to debug a middleware? I would print any variables for a middleware that I'm building Is there any way to make it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Change the model name

2008-05-31 Thread Kless
Is possible to change the model name? >From a class as *class FooBar* it's got a model called *foobar*, but I would to get a model called 'foo_bar', without change the class name to 'Foo_Bar'. --~--~-~--~~~---~--~~ You received this message because you are

Display only some tables

2008-05-31 Thread Kless
How to show only any tables to any users -as to the visitors-? --~--~-~--~~~---~--~~ 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

Re: Display only some tables

2008-05-31 Thread Kless
1) I want to display any tables to whatever person -public--, but I want not to display tables of both Auth and Sites models 2) And that only can be added more data only by registered users. On 31 mayo, 21:04, "Joseph Heck" <[EMAIL PROTECTED]> wrote: > Hey Kless, > > I t

Re: Change the model name

2008-05-31 Thread Kless
angoproject.com/documentation/model-api/#table-names > for more information. You can also change the database table name > associated with the model object if you feel you must. More details > are in that same documentation page. > > -joe > > On Sat, May 31, 2008 at 11:45 AM, Kl

Re: Change the model name

2008-06-01 Thread Kless
letter in uppercase- : foo_bar On 1 jun, 04:40, Eric Abrahamsen <[EMAIL PROTECTED]> wrote: > Are you maybe talking about changing the underlying database table name? > > http://www.djangoproject.com/documentation/model-api/#table-names > > On Jun 1, 2008, at

Re: Display only some tables

2008-06-01 Thread Kless
Well, I've been playing with the admin interface, and simply choosing the permissions is enought to display any tables to the users. The bad is that it's necessary that the users are registered to that can see she tables. On 1 jun, 17:09, Tim <[EMAIL PROTECTED]> wrote: >