Re: Is it possible to save children before parents?

2017-02-12 Thread Antonis Christofides
Hello Mike, Could you paste (the necessary part of) your models.py? Otherwise it's not easy to understand _exactly_ what you are doing, and the exact details are playing a role here. Regards, Antonis Antonis Christofides http://djangodeployment.com On 02/13/2017 01:46 AM, Mike Dewhirst wrote:

Re: Is it possible to save children before parents?

2017-02-12 Thread Mike Dewhirst
On 13/02/2017 1:12 AM, Derek wrote: Mike Not sure I understand your scenario completely, but can you not just add a post-save trigger that updates the parent field (in which the total is saved) after all the other saves have happened? Derek That does not work and is one of the ways I have

No module named client

2017-02-12 Thread Pravin Kumar
Hi All, I have imported below module in views.py, but i getting error "No module named client". import salt.client i can import this module in ipython but when i import it in Django app view, the app getting error while loading main page itself. *Error in web page:* ImportError at /salt/

django-hotsauce-0.6.5 release

2017-02-12 Thread Etienne Robillard
Hi, I'm glad to announce the release of django-hotsauce 0.6.5. Download location: http://www.isotopesoftware.ca/pub/django-hotsauce/django-hotsauce-0.6.5.tar.gz *Whats new* django-hotsauce: - New ClientStorageProxy class for communication with ZODB databases. libschevo: - Experimental

Pagination is not showing and also not working

2017-02-12 Thread Kazi Atik
here is my views/ from django.contrib.auth.models import User from django.core.paginator import Paginator,EmptyPage, PageNotAnInteger from friends.models import Friendship,UserProfile from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.shortcuts import render def

Re: return Database.Cursor.execute(self, query, params) django.db.utils.IntegrityError: NOT NULL constraint failed: auth_user.last_login when adding a superuser

2017-02-12 Thread Adam
Hi Antonis, this is the full message including the command: :~/udemystuff/test_project# python manage.py createsuperuser /root/udemystuff/test_project/trydjango19/local/lib/python2.7/site-packages/django/template/utils.py:37: RemovedInDjango110Warning: You haven't defined a TEMPLATES setting.

Re: Does anyone know a Django-based website containing Member registration with membership management, Articles and Forum?

2017-02-12 Thread Rahul P
On Saturday, 4 February 2017 20:05:05 UTC+5:30, skyppy wrote: > > I would like to see some Django-based websites with Member registration, > membership management and Membership profiles, Articles and Forum. I've the > idea that all of those things are possible with Django, but up until know I

Re: Is it possible to save children before parents?

2017-02-12 Thread Derek
Mike Not sure I understand your scenario completely, but can you not just add a post-save trigger that updates the parent field (in which the total is saved) after all the other saves have happened? On Sunday, 12 February 2017 00:55:52 UTC+2, Mike Dewhirst wrote: > > A mixture has a number of

Re: return Database.Cursor.execute(self, query, params) django.db.utils.IntegrityError: NOT NULL constraint failed: auth_user.last_login when adding a superuser

2017-02-12 Thread Antonis Christofides
Hello, please show the full traceback. Antonis Christofides http://djangodeployment.com On 02/12/2017 06:58 AM, Adam wrote: > Hi everyone, > > I'm super new to django, I tried to add a superuser and this is the error I > got: > > > File >

return Database.Cursor.execute(self, query, params) django.db.utils.IntegrityError: NOT NULL constraint failed: auth_user.last_login when adding a superuser

2017-02-12 Thread Adam
Hi everyone, I'm super new to django, I tried to add a superuser and this is the error I got: File "/root/udemystuff/test_project/trydjango19/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 323, in execute return Database.Cursor.execute(self, query, params)

Re: class bade view

2017-02-12 Thread ludovic coues
We call it function based view. Method are function attached to an object. As far as I know, there is no plan to remove function based view. But in my opinion, you should definitely have a look at class based view. They really shine in common task. An example, a view to create an object will

Re: Django doesn't load CSS

2017-02-12 Thread ludovic coues
Have you tried to run manage.py collectstatic ? The devserver with debug serve static file from each app, but it doesn't do it without debug. The idea is that static files should be served directly by your server or with a CDN and not requiring any CPU time from django. 2017-02-11 22:37 GMT+01:00

Re: file fields

2017-02-12 Thread ludovic coues
Ok, sorry for the delayed response, I was a bit busy the last few days The error is the location argument for your FileSystemStorage. It should be a string and you are passing a tuple. That's why you get a TypeError with illegal type for parameter. Have you tried to entirely remove the storage

Re: Django doesn't load CSS file using static constant

2017-02-12 Thread Mike Dewhirst
On 02/12/2017 12:40 AM, RafaƂ eM wrote: Guys, I'm following one of the Django tutorials but currently stuck with a problem. When running django webserver on my local machine everything works fine, but when upload the project to the server it doesn't read css file anymore. settings.ps: |

Re: No installed app with label 'province'.

2017-02-12 Thread Derek
Not preaching (as I often fall into this trap myself) but just copy from others' examples, without understanding what is the intent of the code, can lead to problems. In this case, the docs are useful (for understanding how to construct the `app_label`, for example):

Re: Django doesn't load CSS file using static constant

2017-02-12 Thread Antonis Christofides
Hello, While it's not easy to know exactly what the problem is in your case without more information (such as the web server's configuration), a general understanding of Django's static files in production can help, and to this end I've made a schematic that you may find useful, at