Bulk add foreign keys in admin interface

2013-10-25 Thread Kristofer Pettijohn
I am using the following type of model setup: class Product(models.Model): name = models.CharField(max_length=40) description = models.TextField(blank=True) active = models.BooleanField(default=True) priority = models.IntegerField(default=100) size_chart = models.ForeignKey(SizeChart)

(3rd party app) How to safely reverse a custom user model admin url?

2013-10-25 Thread Ivan VenOsdel
My project uses a custom user model and I am trying to use a 3rd party app that uses the Reversing Admin URLstechnique to enhance my administration interface. However problems arise when the app tries to make use of

Re: Getting GIS Working - possible kernel32 problem

2013-10-25 Thread Sam Lai
Can you try running 'python.exe manage.py runserver' outside of PyCharm, i.e. in the Command Prompt/PowerShell? I've got a similar setup, although on Windows 7, and it works. Instead of setting environment variables, I added the following parameters into my settings.py to indicate the location of

Haystack - Stopwords

2013-10-25 Thread Ezequiel Bertti
I create a repository with a lot of stopwords of many languages. https://github.com/ebertti/language-resource Please, make your contribution! -- Ezequiel Bertti E-Mail: eber...@gmail.com Cel: (21) 9188-4860 -- You received this message because you are subscribed to the Google Groups "Django

Re: Formatacao

2013-10-25 Thread fabricio mata de castro Mata
even through the code {{form.valor_ultimacompra | floatformat: 2}} does not return anything. my model is valor_ultimacompra = models.DecimalField (u'Vlr. Ult.Compra 'max_digits = 18 , decimal_places = 2, default = 0, blank = True, null = True) when you step this way}}

Re: Formatacao

2013-10-25 Thread Sandro Dutra
First it's recommeded to post in english. Recomendado postar em inglês. Não sei que essa template tag "foundation" faz, você precisa explicar, tendo em vista que ela não é built-in, já a referência de floatformat está aqui: https://docs.djangoproject.com/en/1.5/ref/templates/builtins/#floatformat

formatacao

2013-10-25 Thread fabricio mata de castro Mata
Quando uso no meu html {{ form.valor_ultimacompra|foundation }} funciona mostra o valor mas quando uso {{ form.valor_ultimacompra|foundation|floatformat:2 }} o valor some alguem pode me ajudar -- You received this message because you are subscribed to the Google Groups "Django

Formatacao

2013-10-25 Thread fabricio mata de castro Mata
estou usando no html {{ form.valor_ultimacompra|foundation }} quando tendo colocar {{ form.valor_ultimacompra|foundation|floatformat:2 }} o campo some alguem pode me ajudar? -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Bug in admin models?

2013-10-25 Thread Sandro Dutra
Sorry, I didn't see the django.contrib.admin. You're overrriding the add method for you model? Because it's appear the add method is returning None: Exception Type: TypeError at /admin/myapp/mymodel/add/ Exception Value: 'NoneType' object has no attribute '__getitem__' 2013/10/25 Derek

Re: Django traffic control

2013-10-25 Thread Thomas Orozco
You could use middleware, or a view decorator On Oct 25, 2013 5:33 PM, "Nuno Lopes" wrote: > Hi guys/girls, > > I have a project in Django and I want to control the access to an API. > Basically just know and register who is using it. > I could go to each controller and do

Django traffic control

2013-10-25 Thread Nuno Lopes
Hi guys/girls, I have a project in Django and I want to control the access to an API. Basically just know and register who is using it. I could go to each controller and do this by hand using the api key. But I am hoping that there is a better solution. Do you have some suggestion to give me?

Re: Bug in admin models?

2013-10-25 Thread Derek
Yes, I simplified the names in the installed list and traceback, and as result probably altered the correct grammer slighlty ... but I am hoping that someone who understand the "innards" of the Django admin can point what is _actually_ wrong; given that the error trace is not actually

Getting GIS Working - possible kernel32 problem

2013-10-25 Thread Robin St.Clair
Hi I am working with a project started by somebody else.It uses GIS. I have installed GDAL and OpenGeo4W, plus the C++ runtime. I have the following included in the path -

Re: Sessions memory issue

2013-10-25 Thread François Schiettecatte
John You could certainly use that. I have not used it before. François On Oct 25, 2013, at 5:17 AM, John Carlo wrote: > Hello Francois, > > thank you very much for your reply. Not it's all clear. > > What about using shelve? > > import shelve > > db =

Re: Sessions memory issue

2013-10-25 Thread John Carlo
Hello Francois, thank you very much for your reply. Not it's all clear. What about using shelve? import shelve db = shelve.open("database", "c") db["one"] = 1 db["two"] = 2 db["three"] = 3 db.close() db = shelve.open("database", "r") for key in db.keys(): print repr(key), repr(db[key])