Re: django 1.8 and wsgi_mod

2015-04-27 Thread Abhaya Agarwal
This looks fine. Are there any errors in the web server logs? Regards, Abhaya On Mon, Apr 27, 2015 at 10:23 PM, dk wrote: > we decided to test django 1.8, using python manage.py runserver works > great. but now the production wsgi stop working, > I remember there was a change between version

Re: Turn off migrations completely in Django 1.7

2015-04-27 Thread Mike Dewhirst
Jamie Well I agree top-posting is usually a problem - especially for those who hate it. But in this case the top-poster was semi-hijacking the thread and in doing so felt the need to top post to differentiate the subject matter. That difference was in "disabling migrations" versus turning off

Re: Turn off migrations completely in Django 1.7

2015-04-27 Thread Jamie Lawrence
On Apr 27, 2015, at 7:01 PM, Mike Dewhirst wrote: > >> On 27/04/2015 9:54 AM, marcin.j.no...@gmail.com wrote: >> So what about that? I'm also interested in disabling migrations. > > Would it suffice to have all your models specify "managed = False" in the > Meta class? > > https://docs.djangop

Re: Turn off migrations completely in Django 1.7

2015-04-27 Thread Mike Dewhirst
On 27/04/2015 9:54 AM, marcin.j.no...@gmail.com wrote: So what about that? I'm also interested in disabling migrations. I need to upgrade Django in big project (from 1.4 to newer version) because of lack of support for 1.4, but migrations included in v1.7 will complicate this process. Would it

Re: model.FileField

2015-04-27 Thread James Schneider
You can save the file wherever you like, just change the file path where you are writing the file to make use of settings.MEDIA_ROOT rather than a hard-coded URL. Since you aren't using a model, Django is assuming you want to do something fancy with the file, so you are responsible for doing the h

django 1.8 and wsgi_mod

2015-04-27 Thread dk
we decided to test django 1.8, using python manage.py runserver works great. but now the production wsgi stop working, I remember there was a change between version 1.6 and 1.7. this is my code. Did it something change? import os import sys sys.path.append("/code/projects/my_web") sys.path

pyodbc: Works in Plain Python, Django 1.8 Shell Throws Error

2015-04-27 Thread Matt Woodward
Running into a bit of an odd problem I hope someone can help with. Envrionment: * Ubuntu Server 14.04, 64-bit (Vagrant box) * Python 3.4 * Django 1.8 * pyodbc 3.0.8 pyodbc installs fine. When I do python3 and then import pyodbc, that works fine. When I do python3 manage.py shell and then import

Re: form_invalid redirection with CBVs

2015-04-27 Thread David
Got this working. See below: class CreateComment(MultipleObjectMixin, FormView): template_name = 'comment/comment_list.html' form_class = CommentForm model = Comment paginate_by = 5 def post(self, request, *args, **kwargs): if not request.user.is_authenticated(): return HttpResponseForbidden() se

Re: model.FileField

2015-04-27 Thread mangu rajpurohit
> > Hi James, > > Thanks for suggesting me the page at location https://docs.djangoproject.com/en/1.8/topics/http/file-uploads/ .

Re: model.FileField

2015-04-27 Thread James Schneider
Have you seen this? https://docs.djangoproject.com/en/1.8/topics/http/file-uploads/ Has an example showing an example exactly as you asked without any models involved. Also make sure you recognize the difference between models.FileField and forms.FileField: https://docs.djangoproject.com/en/1.8/

Re: Slowness of the resulting squashed migration

2015-04-27 Thread aRkadeFR
Thanks for the answer. Right now, I just know that after squashing some migrations, it created a squashed migrations with CreateModel + AlterField and AddField after that runs on 5seconds, and now that I put all the field in the CreateModel without any AlterField or AddField, it runs on <2seconde

model.FileField

2015-04-27 Thread mangu rajpurohit
Hi, I am new to django. I am looking for examples for uploading/downloading files in django. I found that models.FileField is used in model. So, my question is that, is it possible to upload file in django, without requiring to create a model, which will keep track of filenames in database. --