Re: Django deployment on production gives error SuspiciousFileOperation

2018-12-18 Thread mohit basantani
Hello pradeep I found the my mistake I was giving the hard coded path of the static root which is wrong I have attached my settings.py file above now it's working fine ...Thanks for your concern really appreciated! On Wed 19 Dec, 2018, 11:49 Pradeep Sukhwani, wrote: > Hi Mohit, > Can you pleas

Django deployment on production gives error SuspiciousFileOperation

2018-12-18 Thread Pradeep Sukhwani
Hi Mohit, Can you please share the settings.py file which is being used for production? Specially that part where you have defined the static_url and static_root -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

Multiple file uploading in django admin

2018-12-18 Thread Muhammad Dilshad Khaliq
I have *File* model for uploading file. class File(models.Model): files = models.FileField(upload_to='sampleorder/%y/%m/%d', null=True, blank=True) order_detail = models.ForeignKey(OrderDetail, on_delete=models.SET_NULL, null=True) and for multiple file upload i have *form.py* class

Re: Django on IIS

2018-12-18 Thread Roger Gammans
Larry, Hmm, you may have reached the end of how I can help, but two things come to mind:- 1 It might be worth trying a reboot, to ensure IIS and dependent services are all reloaded. 2 I'm not sure the icon was created; I think I had to manually add the handler which created the

Re: Django on IIS

2018-12-18 Thread Roger Gammans
On 18 December 2018 17:28:41 GMT, Larry Martell wrote: >Get-WindowsFeature shows that web-cgi is installed but not iis-cgi. >Are these the same? > Maybe. I think they Microsoft renamed on to the other. My script was for the most recent iteration of windows server. -- Sent from my Android devic

Re: Django on IIS

2018-12-18 Thread Larry Martell
Get-WindowsFeature shows that web-cgi is installed but not iis-cgi. Are these the same? On Tue, Dec 18, 2018 at 12:07 PM Larry Martell wrote: > > Thanks. I ran that command, and I checked the settings and CGi is > installed and enabled. I have the CGI icon in the IIS config page, but > I do not h

Re: Django on IIS

2018-12-18 Thread Larry Martell
Thanks. I ran that command, and I checked the settings and CGi is installed and enabled. I have the CGI icon in the IIS config page, but I do not have the FAST-CGI which is what all the docs seem to refer to. On Tue, Dec 18, 2018 at 10:49 AM Roger Gammans wrote: > > Larry, > > > My script draws f

Re: No query results on heroku, but working on local development server

2018-12-18 Thread Joel Mathew
Hi, thank you for responding. My issue was because there was an autogenerated database, and another that I had created. When I ran the local dev server, for some reason, it used the one I created. However on Heroku, ir was using the autogenerated database. Once I deleted the auto generated database

dynamic form and model instances - what is the best method?

2018-12-18 Thread Danny Blaker
Hi! I hope the following will help future django developers. Scenario: We need a form that allows the user to *add *and *remove* referees from a resume: see (rough) snippet below: (using materializecss) Reference Name

Re: Django on IIS

2018-12-18 Thread Roger Gammans
Larry, My script draws from the following urls all of which I found useful. https://docs.microsoft.com/en-us/iis/configuration/system.webserver/fa stcgi/ http://blog.mattwoodward.com/2016/07/running-django-application-on-win dows.html http://mrtn.me/blog/2012/06/27/running-django-under-window

Re: Django on IIS

2018-12-18 Thread vishal sharma
Can someone send me the code of upload multiple files from admin Django? On Tue, 18 Dec 2018 at 4:49 AM, Larry Martell wrote: > Anyone have any experience setting up a Django app to work with IIS? I > have inherited what I was told is a working system, but it's not > working. Before I post detai

Re: Django on IIS

2018-12-18 Thread Larry Martell
I am following the instructions I found here: https://www.toptal.com/django/installing-django-on-iis-a-step-by-step-tutorial I am up to this point: 'Configuring IIS to run a FastCGI application' It says 'Click OK on the handler information dialog. IIS will then ask you to confirm the creation of

Re: admin.TabularInline has_change_permission bug?

2018-12-18 Thread Andrea
I found the reason: https://github.com/django/django/commit/27f5b0aff3442e5c25e84972dff4f5fe1edd4e68 at this line (1962): if not inline.has_change_permission(request, obj): an empty ParentModel is given as `obj` instead of None. Is this a new behavior or a bug? Thanks! Andrea Angelini *Zap

admin.TabularInline has_change_permission bug?

2018-12-18 Thread Andrea
Hi everyone, could anyone confirm the following situation? I have a problem with the method "has_change_permission" of the "admin.TabularInline" class for a Model, which has a fk to ParentModel. If I override that method with the following code: def has_change_permission(self, request, obj=None

Re: Enterprise web application with admin interface

2018-12-18 Thread Sidnei Pereira
It's very flexible indeed. But depending on the requirements of it you could end fighting the framework. For instance, the permissions check are model based (not instance based neither fields based), the list view has a lot of responsibilities and it'is not so easily extensible. Again it will d

Re: Django on IIS

2018-12-18 Thread Roger Gammans
On Tue, 2018-12-18 at 11:22 +0200, Avraham Serour wrote: > I feel your pain, once I had to deploy a django project on windows, > after trying many different options I installed cygwin and form there > nginx+uwsgi like any other normal person. > Today microsoft have WSL, I think you may use that to

Re: Django on IIS

2018-12-18 Thread Avraham Serour
I feel your pain, once I had to deploy a django project on windows, after trying many different options I installed cygwin and form there nginx+uwsgi like any other normal person. Today microsoft have WSL, I think you may use that too, you can still use IIS to route traffic and forward the http co