Re: static file serve nothing is load in deployment

2022-06-15 Thread Antonis Christofides
If you are running the server with "manage.py runserver", STATIC_ROOT is 
irrelevant. You should put the "polls" directory in "polls/static", i.e. e.g. 
"polls/static/polls/style.css"; this is relative to the folder where "manage.py" is.



On 15/06/2022 13.54, luca72.b...@gmail.com wrote:

no i'm not in production
i'm running with runserver

Il giorno mercoledì 15 giugno 2022 alle 12:45:54 UTC+2 Antonis Christofides ha 
scritto:


Is this in production? Are you using apache or something? if yes, please
take a look at

https://djangodeployment.readthedocs.io/en/latest/_images/how-static-files-work-apache.png.
Otherwise, please explain in more detail what your deployment environment
looks like.


On 15/06/2022 13.08, luca72.b...@gmail.com wrote:

Hello i have this configuration in settings.py

STATIC_URL = '/static_files/'
STATIC_ROOT =  'D:/prova_nuovo_sito/static_files'

INSTALLED_APPS = [
    'polls.apps.PollsConfig',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
]

The folder where I store the file is 'D:/prova_nuovo_sito/static_files'
in this folder I have a subfolder polls with all the needed file

The template I write as follow:
{% load static %}
    

What is wrong
Thanks

-- 
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, send an
email to django-users...@googlegroups.com.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/8398ea8b-63da-40c1-90e6-fedd08594085n%40googlegroups.com

.


--
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, send an 
email to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/34b6ab11-2892-4d16-a848-ee8b09a09344n%40googlegroups.com 
.


--
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/16abae4f-b0d9-73e2-2e97-fe5abf4f57a3%40antonischristofides.com.


Re: static file serve nothing is load in deployment

2022-06-15 Thread luca72.b...@gmail.com
no i'm not in production
i'm running with runserver 

Il giorno mercoledì 15 giugno 2022 alle 12:45:54 UTC+2 Antonis Christofides 
ha scritto:

> Is this in production? Are you using apache or something? if yes, please 
> take a look at 
> https://djangodeployment.readthedocs.io/en/latest/_images/how-static-files-work-apache.png.
>  
> Otherwise, please explain in more detail what your deployment environment 
> looks like.
>
>
> On 15/06/2022 13.08, luca72.b...@gmail.com wrote:
>
> Hello i have this configuration in settings.py 
>
> STATIC_URL = '/static_files/'
> STATIC_ROOT =  'D:/prova_nuovo_sito/static_files'
>
> INSTALLED_APPS = [
> 'polls.apps.PollsConfig',
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
> ]
>
> The folder where I store the file is  'D:/prova_nuovo_sito/static_files'
> in this folder I have a subfolder polls with all the needed file
>
> The template I write as follow:
> {% load static %}
>  media="screen">
>
> What is wrong
> Thanks
>
> -- 
> 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, send an 
> email to django-users...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/8398ea8b-63da-40c1-90e6-fedd08594085n%40googlegroups.com
>  
> 
> .
>
>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/34b6ab11-2892-4d16-a848-ee8b09a09344n%40googlegroups.com.


Re: static file serve nothing is load in deployment

2022-06-15 Thread Antonis Christofides
Is this in production? Are you using apache or something? if yes, please take a 
look at 
https://djangodeployment.readthedocs.io/en/latest/_images/how-static-files-work-apache.png. 
Otherwise, please explain in more detail what your deployment environment looks 
like.



On 15/06/2022 13.08, luca72.b...@gmail.com wrote:

Hello i have this configuration in settings.py

STATIC_URL = '/static_files/'
STATIC_ROOT =  'D:/prova_nuovo_sito/static_files'

INSTALLED_APPS = [
    'polls.apps.PollsConfig',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
]

The folder where I store the file is 'D:/prova_nuovo_sito/static_files'
in this folder I have a subfolder polls with all the needed file

The template I write as follow:
{% load static %}
    

What is wrong
Thanks

--
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, send an 
email to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8398ea8b-63da-40c1-90e6-fedd08594085n%40googlegroups.com 
.


--
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b094eb89-953c-56fa-4c37-e827b7b76331%40antonischristofides.com.


static file serve nothing is load in deployment

2022-06-15 Thread luca72.b...@gmail.com
Hello i have this configuration in settings.py

STATIC_URL = '/static_files/'
STATIC_ROOT =  'D:/prova_nuovo_sito/static_files'

INSTALLED_APPS = [
'polls.apps.PollsConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]

The folder where I store the file is  'D:/prova_nuovo_sito/static_files'
in this folder I have a subfolder polls with all the needed file

The template I write as follow:
{% load static %}


What is wrong
Thanks

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8398ea8b-63da-40c1-90e6-fedd08594085n%40googlegroups.com.