Change help_text of a field in a derived model

2014-06-03 Thread Vladimir Chukharev
Hi, I a have a question about changing help_text in a model derived from another model. In my case, all of the models use the same form, generated from model. Few classes share the same TextField. But the meaning of the field is different in different models. The following is a simplified versi

Re: InlineFormSet validation

2014-06-03 Thread César García Tapia
Ok, thanks to Russell's help in IRC I managed to solve this. Thank you so much!! El lunes, 2 de junio de 2014 09:47:17 UTC+2, César García Tapia escribió: > > Hi, Russell, thanks for answering :-) > > Your answer helps me, but not completely. I can add the error with this: > > self._errors

Startproject opens django-admin.py

2014-06-03 Thread Guðmundur H . Bjarnason
And something's fishy. No project directory is created. The command I use is django-admin.py startproject mysite Instead, it just opens django-admin.py! Which contains the following: #!C:\Python27\python.exe from django.core import management if __name__ == "__main__": management.execute_fr

Re: Startproject opens django-admin.py

2014-06-03 Thread Guðmundur H . Bjarnason
I should note that Python is not installed as default in C:. It is in the user directory under Anaconda. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-

RE: Startproject opens django-admin.py

2014-06-03 Thread Ilya Kazakevich
Hello, Shebangs are not supported by windows command processor (cmd). Try: C:\Python27\python.exe django-admin.py Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >From: django-users@googlegroup

Re: Startproject opens django-admin.py

2014-06-03 Thread Guðmundur H . Bjarnason
Thanks for the reply Ilya. The problem was that the old, default Python directory was still the default, so django searched there for django-admin.py. Doing this manually by moving django-admin.py into the desired startproject folder and adding "python" in front of django-admin.py startproject

Re: Startproject opens django-admin.py

2014-06-03 Thread Guðmundur H . Bjarnason
I forgot - One also needs to delete the path in django-admin.py, since you automatically provide that when you cd into your desired startproject directory. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

django-loses-currently-logged-in-user

2014-06-03 Thread Juergen Schackmann
Hi all, I have a issue, with users not being able to log into my site anymore (after it worked fine for months). Please find details here: https://stackoverflow.com/questions/24015143/django-loses-currently-logged-in-user Any help is highly appreciated. Regards, Juergen -- You received this

Re: Change help_text of a field in a derived model

2014-06-03 Thread Vladimir Chukharev
Hm... I fought with indentations in Opera in vain. Everything is lost, though at the time of sending it it looked fine. Try again, with FF. #models.py: from django.utils.html import format_html import django.db.models.options as options options.DEFAULT_NAMES = options.DEFAULT_NAMES + ('help_text

Re: Django Macros Url. Routing must be simple!

2014-06-03 Thread Alexandr Shurigin
Hi, thank you for review :) Yes this s just thing to make groups more clean and simple. used :name as pattern from Ruby On Rails naming. Looks simple and avoid errors. You can combine base macro types with your names by underscope. For example /:book_id/:product_id/:id You will have 3 differe

Re: Django Macros Url. Routing must be simple!

2014-06-03 Thread Alexandr Shurigin
Just readed about "POSIX style regular expression named character sets". Good idea too. But for now this is utility application with simple syntax, i hope soon django core team think about implementing this as core part and they will choose best naming style i hope :) I just used ROR naming sta

Re: Django Macros Url. Routing must be simple!

2014-06-03 Thread Alexandr Shurigin
Sorry for my english. Not my primary language :( I trying to learn it :-) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.

Re: Django Macros Url. Routing must be simple!

2014-06-03 Thread Alexandr Shurigin
I make mistake. I have context of course :) Added support for include() in view parameter. Now it build (normalize) right patterns without endng dollar sign if include view was passed. All works automatically and like default django url function. Version bumped to 0.1.1. On Tuesday, June 3, 20

editable models (db schema) for admin (no developer)

2014-06-03 Thread Thomas Güttler
Hi, I am a software developer and like the way django ORM defines the database (via models.py) very much. Unfortunately for a new project, we have the constraint, that the admin must be able to add some columns. The admin is not a developer, and he only uses a web interface. I don't want to

Re: editable models (db schema) for admin (no developer)

2014-06-03 Thread Thomas Güttler
Am 03.06.2014 16:27, schrieb Erik Cederstrand: Den 03/06/2014 kl. 15.57 skrev Thomas Güttler : I am a software developer and like the way django ORM defines the database (via models.py) very much. Unfortunately for a new project, we have the constraint, that the admin must be able to add s

Re: editable models (db schema) for admin (no developer)

2014-06-03 Thread Erik Cederstrand
Den 03/06/2014 kl. 15.57 skrev Thomas Güttler : > I am a software developer and like the way django ORM defines the database > (via models.py) very much. > > Unfortunately for a new project, we have the constraint, that the admin must > be able > to add some columns. The admin is not a develope

Re: django-loses-currently-logged-in-user

2014-06-03 Thread Alexandr Shurigin
Check stackoverflow. Answered there for your question. On Tuesday, June 3, 2014 7:28:52 PM UTC+7, Juergen Schackmann wrote: > > Hi all, > > I have a issue, with users not being able to log into my site anymore > (after it worked fine for months). > > Please find details here: > https://stackover

Re: DB Router not working on production machine, works on dev.

2014-06-03 Thread Doug Ballance
The problem turned out to be an bug with an custom manager class based on djorm_pgfulltext search mixin. I'd found an issue with it last week, and patched in the development environment but forgotten to patch the other machine. -- You received this message because you are subscribed to the

Re: How to install psycopg2 using Pip?

2014-06-03 Thread Adrian Miguel
Where can I find the setup.cfg file on a mac? On Monday, July 23, 2012 3:18:02 PM UTC-4, Mehrdad Majzoobi wrote: > > Ok, I realized what the issue was. In the setup.cfg file, the pg_config > path had to include the pg_config executable name as well: > > pg_config = /usr/pgsql-9.1/bin/pg_config >

newbie with models - user-defined function raised exception

2014-06-03 Thread Sami Razi
hi, i'm using djangobook to learn django, when i go to localhost:8000/admin there's no problem, also no problem with these two: http://localhost:8000/admin/books/ http://localhost:8000/admin/books/publisher/ but going to: http://localhost:8000/admin/books/book give

RE: newbie with models - user-defined function raised exception

2014-06-03 Thread Ilya Kazakevich
You probably should not use this book for Django 1.5. It says: " While the book mentions Django version 1.4 in places, the vast majority of the book is for Django version 1.0" And " we ask that, at this time, djangobook.com not be used for educational purposes. " Actually, you should start wit

safari ios 7 and django app - function not being called to serve video

2014-06-03 Thread Adam Teale
Hi Guys, I am in the process of building a web app with django. The app is running on apache and files/videos are served with the xsendfile apache module. The app is working fine on iphones, ipads and macs on the local network - when I access the site via a url like https://myapp.local When I v

Instagram + Heroku + Django + HTTP headers

2014-06-03 Thread Dr Shauny
Hi, I have a Django/Python app that is hosted on Heroku. The app uses the Instagram API. I am trying to secure the app by enforcing signed HTTP headers using X-Insta-Forwarded-For. The actual header value is constructed as - "The expected value is a combination of the client's IP address and

Reference to form cleaned data field throws TypeError: 'exceptions.AttributeError' object is not callable

2014-06-03 Thread Gloria W
This is the strangest bug I've seen in Django. (1.6.4 on Ubuntu 14.04, Python 2.7.6) It is sporadic, but once it starts happening, it is consistent until I restart the process. To try and debug it, I print the value of self.cleaned_data just before it occurs. The value prints fine. The code

Re: Reference to form cleaned data field throws TypeError: 'exceptions.AttributeError' object is not callable

2014-06-03 Thread Andromeda Yelton
clean_email needs to return the cleaned email regardless of whatever else it does. This clean_email returns email when it's valid but not when it isn't. This means that whatever Django internals are expecting, and trying to operate upon, its return value are throwing exceptions instead. This is

Re: ModelForm changing default field for ForeingKey

2014-06-03 Thread Ymir Camilo Acosta Rodriguez
Thank you Daniel, it works for me. ;) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send emai