Re: ValueError: save() prohibited to prevent data loss due to unsaved related object

2015-10-19 Thread Mike Dewhirst
On 18/10/2015 5:18 PM, Mike Dewhirst wrote: On 18/10/2015 6:28 AM, Tim Graham wrote: Do you have code that worked before (didn't result in data loss) but doesn't work now? If so, it could be a bug in Django. Yes indeed. It is all in my repo. I'll go back to 1.7.x and rerun the tests and report

[ANNOUNCE] Django 1.9 beta 1 released

2015-10-19 Thread Tim Graham
We've made the second release on the way to Django's next major release, Django 1.9! With a month and a half until the scheduled final release, we'll need timely testing from the community to ensure an on-time and stable release. Check out the blog post: https://www.djangoproject.com/weblog/201

Re: Why django (when using inlineformset) run 20 times the same SQL for each record (form)?

2015-10-19 Thread Fellipe Henrique
It's a simple HTML with these code: {{ formset helper }} T.·.F.·.A.·. S+F *Fellipe Henrique P. Soares* e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ 's/(.)/chr(ord($1)-2*3)/ge' *Fedora Ambassador: https://fedoraproject.org/wiki/User:Fellipeh

Re: Why django (when using inlineformset) run 20 times the same SQL for each record (form)?

2015-10-19 Thread Mark Steadman
Can you provide the HTML you're using to render the formset view? On Thursday, 15 October 2015 21:43:29 UTC+1, Fellipe Henrique wrote: > > Hello, > > I try to use "inlineformset", but for each record (each form) django > create and run 20 selects (same select), I take the one snapshot [1]. > > C

Re: Problem to upload image

2015-10-19 Thread Mark Steadman
This is a JavaScript question more than it is a Django one, as your problem is client-side. What browser are you running this in? I've just tried it in Safari, Chrome and Firefox on a Mac and haven't come up against the same issue. What you're doing is slightly odd, as I'd normally recommend us

Re: How can I get current user in my ModelForm, using inlineformset?

2015-10-19 Thread Mark Steadman
I think the answer you need is available through the docs, at https://docs.djangoproject.com/en/1.8/topics/forms/modelforms/#changing-the-queryset (I point to that because it does a much better job of explaining the answer than I can). You're passing in an object - an instantiated form - into

Complex form in modelform

2015-10-19 Thread Arnab Banerji
Hi - I am trying to create a form from a model, say M with the following: (1) a certain field FOO is a text field which would be constructed in views.py by concatenating a dynamic set of rows (so I need a jQuery plugin for that). (2) multiple images can be tied to the model M, and I have a Fore

Re: syncdb problem with mongodb engine

2015-10-19 Thread Lianghong Xu
Hi, I was able to fix the problem by applying the patch here: https://bitbucket.org/andrewgodwin/south/pull-requests/86/fixing-the-keyerror-default-when-managerpy/diff Thanks, Lianghong On Monday, October 19, 2015 at 12:44:33 PM UTC-4, James Schneider wrote: > > The version of Django you are r

Re: syncdb problem with mongodb engine

2015-10-19 Thread James Schneider
The version of Django you are running has not been supported for quite a while, you should update your Django installation to 1.7 or 1.8. There may be a compatibility issue if you have a new version of the plugin but an old Django installation. You should also look to see if there is a support tic

syncdb problem with mongodb engine

2015-10-19 Thread Lianghong Xu
Hi, I'm new to django. I'd like to use MongoDB as my backend engine and have installed all the required packages for a MongoDB django setup. However, when I run "python manage.py syncdb", I get this error: Traceback (most recent call last): File "./manage.py", line 10, in execute_from_

syncdb problem with mongodb engine

2015-10-19 Thread Lianghong Xu
Hi, I'm new to django. I would like to use MongoDB as my backend engine and installed all required packages for a MongoDB setup. However, when I run "python manage.py syncdb", I get the following error message: (mywiki)lianghon@172-19-151-114:~/repo/mywiki/testwiki$ python manage.py syncdb Tr

Re: Starting a .py file from a Button in my Template

2015-10-19 Thread CooliusCaesar
Thank you very much! I will take a look at celeryproject.org I should have mentioned, that the project will run on the same computer that is going to display the Servers, so it would work with my refresh.py stored locally. But I will use celery anyways, so I can use this project for future re

Re: Starting a .py file from a Button in my Template

2015-10-19 Thread Andreas Kuhne
Hi, You can't do it that way. If you want to run a python file on the server, you can do it in several ways: 1. Create a view that runs all the code inside the refresh.py file. This could take an amount of time, so I wouldn't do it that way. 2. Create a view that calls a celery task to run the re

Starting a .py file from a Button in my Template

2015-10-19 Thread CooliusCaesar
Hello, I need to launch a python file (refresh.py) from my template. I have created a .bat wich starts refresh.py, but I can't get it to work: Launch refresh MyObject = new ActiveXObject("WScript.Shell"); function Runbat() { MyObject.Run("\"C:\\..path...\\refresh.bat

duplicated selenium test fails

2015-10-19 Thread Ulrich Laube
Hi! It boils down to this: I have a selenium test in a django project against the admin page. All green. If I duplicate the test class via copy and paste + renaming, then one is green and one is red, despite containing the same code. I expected both to be green. I have removed the tests from

Re: How to develop a frontend web app for using REST services

2015-10-19 Thread Xavier Ordoquy
There isn't much to say. ViewSet exposes the CRUD part, while serializer maps an object to native Python types. Regards, Xavier, Linovia. On Saturday, October 17, 2015 at 4:28:33 PM UTC+2, krmane wrote: > > Hi again, > Xavier, I have gone through the main DRF documentation and also seen your >