Re: Django migrations taking all the memory on Django 1.9

2016-08-06 Thread andrea crotti
Ok great thanks for the answer Markus. And yes I can try to help, it's quite a big issue for us.. Anything else we can do to improve the situation in the meanwhile? In general I was wondering why do we need to handle all the "baggage" of supporting backward migrations and doing things 100% prope

Updating kwargs['data'] in get_form_kwargs (sometimes) raises AttributeError

2016-08-06 Thread Petar Aleksic
Hi, Basically in two different UpdateViews I update the form kwargs dinamically (on the same way): def get_form_kwargs(self): kwargs = super(MyView, self).get_form_kwargs() print("KWARGS", kwargs) kwargs['data'].update({ "something": "somevalue" })

deprecated urls as strings: problem adding second + urls to main urls.py file

2016-08-06 Thread Andrew Emory
I am having trouble with how I would intuitively get my url patterns to work, by listing the actual path to the view function. So it needs to be a callable, ok. But I don't like having 15+ from appname import views as appname_view. I can add a url.py file in each app and use include(). But t

Re: Updating kwargs['data'] in get_form_kwargs (sometimes) raises AttributeError

2016-08-06 Thread Todor Velichkov
Show some code how you create these forms. Django creates QueryDict objects for request.POST and request.GET which are *immutable*, so mu guess is that some times you are instancing the form with either request.POST

Re: Django migrations taking all the memory on Django 1.9

2016-08-06 Thread Tim Graham
As long as your tests don't rely on any data migrations, you can set MIGRATIONS_MODULES['app'] = None for all apps in a test settings file as described in https://docs.djangoproject.com/en/stable/ref/settings/#std:setting-MIGRATION_MODULES to disable migrations while testing. There's a ticket

Re: deprecated urls as strings: problem adding second + urls to main urls.py file

2016-08-06 Thread Tim Graham
You're not missing something. You should imports. Sorry you don't like the look of it, but that's Python. On Saturday, August 6, 2016 at 8:42:29 AM UTC-4, Andrew Emory wrote: > > I am having trouble with how I would intuitively get my url patterns to > work, by listing the actual path to the vie

Re: null=True and blank=False within model fields

2016-08-06 Thread Alex Heyden
The obvious use case there is something that can't be initialized with a reasonable default value. Null is valid because you just plain need it, but blank is false because you never want it to be null ever again except if the back end explicitly demands it. On Thu, Aug 4, 2016 at 1:35 AM, James Sc

Trying to set up a website using Django but something went wrong

2016-08-06 Thread owen
I downloaded Django recently and I have all the necessary files (Or at least I think I do ) However when I try to set up a project through this line of code: $ django-admin startproject mysite In the command prompt it returns the following message. 'django-admin' is not recognized as a

Downloaded Django but the command prompt wont recognize commands

2016-08-06 Thread owen
I went through a tutorial for downloading python, pip and Django. All seemed to be going well until I attempted to put command lines through the command window So when I try to create a project via these instructions below $ django-admin startproject mysite It gives an error 'django-admin

Re: Trying to set up a website using Django but something went wrong

2016-08-06 Thread Huy T
Is it in your path? > On Aug 6, 2016, at 11:42 AM, owen wrote: > > I downloaded Django recently and I have all the necessary files (Or at least > I think I do ) > > However when I try to set up a project through this line of code: > > $ django-admin startproject mysite > > In the command p

Re: Trying to set up a website using Django but something went wrong

2016-08-06 Thread M Hashmi
1. Type "python" in your terminal and if it open ups Python interpreter that means path is setup for Python. 2. If confirmed that Python is installed you might want to install setuptools. 3. With setuptools a small app "pip" which is programmed to bring packages upon request from pypi or Djangopr

Re: deprecated urls as strings: problem adding second + urls to main urls.py file

2016-08-06 Thread Andrew Emory
Is there convention on import view as vs a separate URL file in every app? Is there separate URL in each app only used if you need to use include() ?? On Saturday, August 6, 2016 at 10:05:25 AM UTC-5, Tim Graham wrote: > > You're not missing something. You should imports. Sorry you don't like

Re: Trying to set up a website using Django but something went wrong

2016-08-06 Thread Andrew Emory
Do you have Python installed? On Saturday, August 6, 2016 at 11:03:06 AM UTC-5, owen wrote: > > I downloaded Django recently and I have all the necessary files (Or at least > I think I do ) > > > However when I try to set up a project through this line of code: > > > $ django-admin startproject m

Re: How to start Django app with apache server

2016-08-06 Thread Terry Sankar
I am. Apache is running ,Postgresql is connected the app runs on the test server. I can run it on linux with gunicorn and nginx but do not understand what the equivalent of python manage.py runserver would be to use apache server instead ( on windows ). Thanks for your response. On Friday, Augu

{% include {% static "css/some.css" %} %} Idea

2016-08-06 Thread Roberth Solis Martínez
Hello guys, some time ago I read that 90% of the time, the CPU waits for an I / O HDD, but django recommends using static files on another server, but if you include the styles and JavaScript in the