Django doesn't load CSS file using static constant

2017-02-11 Thread Rafał eM
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: STATIC_URL = '/static/' base.html: {% load s

Django doesn't load CSS

2017-02-11 Thread Rafał eM
Guys, Following tutorial from djangoproject.com I stuck with loading CSS to the site. Django 1.10 settings.py: STATIC_URL = '/static/' base.html: the path to blog.css in my project is: blog/static/blog/css/blog.css it works perfectly fine when running django webserver on my local machine

class bade view

2017-02-11 Thread shahab . emami95
hello i have learned some django and but i write my views in method base views. i dont now how to use class base views and i am not interested to learn class base views because i think it's redundant . do i have to learn it ? i that possible method base views will remove in next version of djan

Is it possible to save children before parents?

2017-02-11 Thread Mike Dewhirst
A mixture has a number of ingredients and the proportions should (eventually) sum to 100% Ingredients are substances connected to the mixture - also a substance - via m2m relationships. Each m2m record carries an ingredient proportion value. If a proportion changes the sum total changes aft

Re: Upload multiple files at once

2017-02-11 Thread Tim Graham
What does your code look like and what error do you encounter? Have you followed the documentation https://docs.djangoproject.com/en/stable/topics/http/file-uploads/#uploading-multiple-files ? On Saturday, February 11, 2017 at 9:55:06 AM UTC-5, Will Treston wrote: > > Hey, > > im trying to upl

Serializer for Postgis Array field in Django

2017-02-11 Thread Stefan Milutinovic
Hi, I have a class BPS: class BPS(models.Model): """ This is representation of UK BPS applications. """ ... questions = ArrayField(models.IntegerField()) This field questions is ArrayField od integers. And I also have Serializer for BPS. When I want to create BPS objec

Upload multiple files at once

2017-02-11 Thread Will Treston
Hey, im trying to upload multiple files in one go and I just cant get it to work. Any help would be appreciated. Thanks, -Will -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, se

Re: No installed app with label 'province'.

2017-02-11 Thread Gerald Brown
Finally solved the problem!!! At the end of each Model definition I had added: class Meta: managed = True db_table = 'refer' app_label = 'Refer' I then commented those lines out and then the program worked like it should. I saw another post where they had put those var