Re: static files

2023-03-12 Thread Sandip Bhattacharya
Static files outside apps are not served by default. Have you added the main directory static directory to settings yet? https://docs.djangoproject.com/en/4.1/ref/settings/#std-setting-STATICFILES_DIRS Something like this is typically done in project settings: STATICFILES_DIRS = [BASE_DIR / "st

Re: static files

2023-03-10 Thread André Hangalo
Show your settings file configuration! On Fri, 10/03/2023 at 22:14 Usra Saeed wrote: > Hi, I am uing django 3.2. My template and static folder are in the main > directory. But my static files are not loading. > I have one app. In this I have one template name "signin.html". I am using > {% ext

Re: Static files is not loading while deploying the project to AWS ec2

2022-11-08 Thread Nishant Sagar
Thank you everyone for the help, it solved the issue On Sun, 6 Nov 2022 at 8:43 AM, Malcolm MacKinnon wrote: > Using elastic beanstalk, I run the command manage.py collectstatic in a > .config file during deployment. The config file is located in the > .ebextensions > folder. > > In settings.p

Re: Static files is not loading while deploying the project to AWS ec2

2022-11-07 Thread James
It sounds like nginx doesn't know where your static files are being served from. If you don't want to bother with NGINX you can use Whitenoise. Django doesn't serve staticfiles in production; something that isn't overly apparent. You still need something like apache or nginx or whitenoise to se

Re: Static files is not loading while deploying the project to AWS ec2

2022-11-05 Thread Malcolm MacKinnon
Using elastic beanstalk, I run the command manage.py collectstatic in a .config file during deployment. The config file is located in the .ebextensions folder. In settings.py STATIC_URL = '/static/' STATIC_ROOT = 'static' https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python

Re: Static files is not loading while deploying the project to AWS ec2

2022-11-05 Thread David Nugent
An article I wrote on this topic last year for fellow developers at work who were similarly confused. HTH! *Django - Statically Confusing* I started learning Django several years ago (and am still doing so today!), and for some time had a real sense of confusion as to how static files worked. S

Re: Static files is not loading while deploying the project to AWS ec2

2022-11-05 Thread led zee
As a recent Django new user I was having a lot of trouble with static files as well. Basically couldn't get Admin CSS to work. We are using whitenoise now. Apparently that is helping solve the problem. On Saturday, November 5, 2022 at 12:35:31 AM UTC-7 nishan...@gmail.com wrote: > Hi all, > >

Re: Static files is not loading while deploying the project to AWS ec2

2022-11-05 Thread Lakshyaraj Dash
You can use sebuckets to store your static files... On Sat, Nov 5, 2022, 13:04 Nishant Sagar wrote: > Hi all, > > I deployed the django project to AWS ec2 instance using nginx and gunicorn > but the static file is not loading at all. > > Can someone suggest where did I do wrong? > > Note - I've

Re: Static files is not loading while deploying the project to AWS ec2

2022-11-05 Thread Ashutosh Mishra
I had faced same problem but collectstatic worked for me,, On Sat, 5 Nov, 2022, 1:15 pm Nishant Sagar, wrote: > Hi Ashutosh, > > Yeah I tried that as well, still not working. > > On Sat, 5 Nov 2022 at 1:10 PM, Ashutosh Mishra < > ashutoshmishra...@gmail.com> wrote: > >> Did you tried, python man

Re: Static files is not loading while deploying the project to AWS ec2

2022-11-05 Thread Nishant Sagar
Hi Ashutosh, Yeah I tried that as well, still not working. On Sat, 5 Nov 2022 at 1:10 PM, Ashutosh Mishra wrote: > Did you tried, python manage.py collectstatic? > > On Sat, 5 Nov, 2022, 1:05 pm Nishant Sagar, > wrote: > >> Hi all, >> >> I deployed the django project to AWS ec2 instance using

Re: Static files is not loading while deploying the project to AWS ec2

2022-11-05 Thread Ashutosh Mishra
Did you tried, python manage.py collectstatic? On Sat, 5 Nov, 2022, 1:05 pm Nishant Sagar, wrote: > Hi all, > > I deployed the django project to AWS ec2 instance using nginx and gunicorn > but the static file is not loading at all. > > Can someone suggest where did I do wrong? > > Note - I've no

RE: Static files not found

2022-02-13 Thread Feroz Ahmed
@googlegroups.com Subject: Re: Static files not found U need to provide ur static Files dir Using os.path.join(BASR_DIR, "staticfiles") Also if u storing ur static file to cloud or any other host present ur STATICFILES_STORAGE="https://domain.com/location/folder"; On Sun,

Re: Static files not found

2022-02-13 Thread Dev femibadmus
U need to provide ur static Files dir Using os.path.join(BASR_DIR, "staticfiles") Also if u storing ur static file to cloud or any other host present ur STATICFILES_STORAGE="https://domain.com/location/folder"; On Sun, Feb 13, 2022, 18:47 Serge Alard wrote: > To Ogunsanya Opeyemi : my Django

Re: Static files not found

2022-02-13 Thread Serge Alard
To Ogunsanya Opeyemi : my Django app folder is bridge, thus it's OK To dashlaksh...@gmail.com : I tried but the static files are not found To mminu...@gmail.com : STATICFILES_DIRS = [BASE_DIR/""] is not necessary because it's given already in static_root. Thank you everybody but it does not work

Re: Static files not found

2022-02-03 Thread Muhammad Muhammad inuwa
At the bottom of your code, you need to include the STATICFILES_DIRS = [BASE_DIR/""]. This tells django where your static files are On Thu, Feb 3, 2022, 18:49 Opeyemi Ogunsanya wrote: > Move the static folder to the Django app folder > > On Thu, Feb 3, 2022, 6:01 PM Serge Alard wrote: > >> Than

Re: Static files not found

2022-02-03 Thread Lakshyaraj Dash X-D 25
Ok! Actually I had not looked properly to your file. The line that I had given was already in STATIC_ROOT. If you have debug=False, then you can run something like this : python manage.py runserver --insecure It will serve your static files while the debug mode is set to false. On Thu, Feb 3, 202

Re: Static files not found

2022-02-03 Thread Opeyemi Ogunsanya
Move the static folder to the Django app folder On Thu, Feb 3, 2022, 6:01 PM Serge Alard wrote: > Thank you for the suggestion but it does not work. > I add 2 things to make easier your helps : > >- the settings and wsgi files are in /www/Web_bridge/ Web_bridge/ >- the static files are i

Re: Static files not found

2022-02-03 Thread Serge Alard
Thank you for the suggestion but it does not work. I add 2 things to make easier your helps : - the settings and wsgi files are in /www/Web_bridge/ Web_bridge/ - the static files are in /www/Web_bridge/static/bridge/ Below an example of connexion.html that calls a static file : {% extends

Re: Static files not found

2022-02-03 Thread Lakshyaraj Dash X-D 25
Please add this line below static_url STATICFILES_DIRS = [ 'static' ] On Thu, Feb 3, 2022, 20:53 Serge Alard wrote: > Hello > > I developped a project in Django python that works fine. Thus, I deployed > my project. Everything works but the static files are not found by the > application. > I g

Re: static files not getting served

2021-12-05 Thread Adriano Machado
Hi, Heroku and SQLite do t match. Read this: From: https://devcenter.heroku.com/articles/sqlite3 SQLite runs in memory, and backs up its data store in files on disk. While this strategy works well for development, Heroku’s Cedar stack has an ephemeral filesystem

Re: static files not getting served

2021-12-05 Thread Jet Ezra
To me, you are not going to serve static files but media files, am sure that the image linked above was as a result of uploading it somewhere, However much you try, heroku does not handle media files, when you upload your image, the next refresh of the running dyno will delete it from your file dir

Re: static files not getting served

2021-12-05 Thread Kasper Laudrup
On 05/12/2021 14.18, Rahul wrote: see brother i am not shouting at all . Writing in ALL CAPITAL LETTERS is considered shouting. Please refrain from doing that. I am also not your brother. Using language like that makes it hard to take you serious. i am using heroku for deployment and i did

Re: static files not getting served

2021-12-05 Thread Lakshyaraj Dash X-D 25
Inside settings.py, Write these two lines of code and your static files will be served import os STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') On Sun, Dec 5, 2021, 18:49 Rahul wrote: > see brother i am not shouting at all . i am using heroku for deployment > and i didnt got any big erro

Re: static files not getting served

2021-12-05 Thread Rahul
see brother i am not shouting at all . i am using heroku for deployment and i didnt got any big error just in websites console ''failed to load resource server responded with the status of 404 '' i had deployed by pushing files to github and then using heroku . i had also used whitenoise but it

Re: static files not getting served

2021-12-04 Thread 'Mr. Aryan Sharma 4-Year B.Tech. Computer Science and Engineering' via Django users
At static files url at urls.py. And make a seperate directory for media root as well. Of your settings are correct project will get pushed . Then you ensure you have migrated from the console at heroku website On Sat, 4 Dec, 2021, 8:55 pm Rahul, wrote: > hey guys am using default database i.e

Re: static files not getting served

2021-12-04 Thread Kasper Laudrup
On 04/12/2021 10.52, Rahul wrote: hey guys  am using default database i.e. SQL Lite3 but when i deploy it on heroku my static files are not getting served . Please suggest what should i do?? You should tell us some relevant details, e.g. how you are deploying your project, any error message

Re: Static files not work

2020-10-11 Thread Dvs Khamele
Hi do you hire contract based python/django freelancer? We can help you in this and related tasks at fair prices. Reply or send email to divy...@pythonmate.com Best Regards, Divyesh Khamele, Pythonmate On Thu, 1 Oct 2020, 5:53 pm kkwaq...@gmail.com, wrote: > *Error* > > *[image: 1.jpg]* > > *Er

Re: Static files not work

2020-10-02 Thread MUGOYA DIHFAHSIH
To become an expert in django is very simple, practice django documentation regularly as you work on real projects On Thu, Oct 1, 2020, 16:10 waqar khan wrote: > Thank you bro. > I am fresher , > How to expert django framework any tips .. > > On Thu, Oct 1, 2020 at 5:58 PM MUGOYA DIHFAHSIH > wr

Re: Static files not work

2020-10-01 Thread waqar khan
Thank you bro. I am fresher , How to expert django framework any tips .. On Thu, Oct 1, 2020 at 5:58 PM MUGOYA DIHFAHSIH wrote: > instead of loading staticfiles you use {{ load static}} > > On Thu, 1 Oct 2020 at 15:23, kkwaq...@gmail.com > wrote: > >> *Error* >> >> *[image: 1.jpg]* >> >> *Error

Re: Static files not work

2020-10-01 Thread MUGOYA DIHFAHSIH
instead of loading staticfiles you use {{ load static}} On Thu, 1 Oct 2020 at 15:23, kkwaq...@gmail.com wrote: > *Error* > > *[image: 1.jpg]* > > *Error line number 2* > > *[image: 2.jpg]* > > > *settingspy* > > *[image: 3.jpg]* > > *html file* > > *[image: 4.jpg]* > > -- > You received this mes

Re: Static files configuration

2019-12-18 Thread Kevin Dublin
Hey, try this: In settings: # If running collectstatic STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') # make sure if you have multiple apps that you want to direct to specific location of static files STATIC_DIRS = ( os.path.join(BASE_DIR, '../apps/core/static'), ) Finally if you're us

Re: Static files won't match the path given

2019-05-12 Thread Joe Reitman
Configuring static files can be a headache. I personally use Whitenoise to serve my static files. It is self contained and can be configured in Django settings after installation. A couple of advantages of Whitenoise: 1. During development you can overri

Re: Static files won't match the path given

2019-05-10 Thread Rookies DJ
Dear Anirudh Jain Thank you for reply Really, apprentice it Yes we run collectstaitc command And we try within setting.py files Set path static_root/url as the same As for web server software we using apache not nigx. I apologize for not including this information Really appreciate if you

Re: Static files won't match the path given

2019-05-10 Thread Mike Dewhirst
Have you used manage.py collectstatic? Connected by Motorola Rookies DJ wrote: >I apologise, I'm a hardware engineer, I'm not very familiar with coding; I'm >only on Django for the past 5 months. (under my boss order) > > >I had managed to develop and establish a Django App, and manage to uplo

Re: Static files won't match the path given

2019-05-10 Thread Anirudh Jain
On server you will have to run - python manage.py collectstatic and this is after you have setup nginx for serving static files on the server. Have you set it up yet? On Sat, 11 May 2019, 10:54 Rookies DJ, wrote: > I apologise, I'm a hardware engineer, I'm not very familiar with coding; > I'm on

Re: Static files in production [Was: How does WSGI work?]

2019-03-08 Thread Tal
Ok - maybe I'll try to get a hold of Grahame Dumpleton when I have some time. Thanks guys PS. Python frameworks like Flask or Django are good at making decisions about what response to return for a given request, and returning it. In most cases, that response is an HTML page, or json, or somet

Re: STATIC FILES not working for admin site, projects and apps on DJANGO

2018-12-31 Thread abel otugeme
How do you explain the admin site too? A missing tag in just one part of the html file shouldn't break the entire site. I'll send you the files so you can review them On Monday, December 31, 2018 at 4:24:14 AM UTC+1, Joel Mathew wrote: > > Your site has more wrong with it than just static css. Y

Re: STATIC FILES not working for admin site, projects and apps on DJANGO

2018-12-30 Thread Joel Mathew
Your site has more wrong with it than just static css. Your html is appearing as html. You need to unescape them in template or check your tags On Mon, 31 Dec, 2018, 1:10 AM abel otugeme I have done all that i used the docs first and it did not work. Then i > tired this video https://www.youtube.

Re: STATIC FILES not working for admin site, projects and apps on DJANGO

2018-12-30 Thread Okware Aldo
I can have a look if you give me access to the code, we could do teamviewer, or repo. Let me know. On Sun, 30 Dec 2018, 22:40 abel otugeme, wrote: > I have done all that i used the docs first and it did not work. Then i > tired this video https://www.youtube.com/watch?v=YH-ipgxlJzs > > On Sun,

Re: STATIC FILES not working for admin site, projects and apps on DJANGO

2018-12-30 Thread abel otugeme
I have done all that i used the docs first and it did not work. Then i tired this video https://www.youtube.com/watch?v=YH-ipgxlJzs On Sun, Dec 30, 2018 at 5:09 PM Lunga Baliwe wrote: > Please have a look at this link > https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/modwsgi/ on > ho

Re: STATIC FILES not working for admin site, projects and apps on DJANGO

2018-12-30 Thread Lunga Baliwe
Please have a look at this link https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/modwsgi/ on how to setup static files. You may also want to run python manage.py collectstatic On Sun, Dec 30, 2018 at 4:31 AM abel otugeme wrote: > This is how a site looks when i open it up in my browse

Re: STATIC FILES not working for admin site, projects and apps on DJANGO

2018-12-29 Thread abel otugeme
This is how a site looks when i open it up in my browser No CSS! i have done the necessary settings for Django to find the static files On Sat, Dec 29, 2018 at 5:14 PM Kasper Laudrup wrote: > Hi Abel, > > On 29/12/2018 08.07, abel otugeme wrote: > > I really need help i have combed through s

Re: STATIC FILES not working for admin site, projects and apps on DJANGO

2018-12-29 Thread Kasper Laudrup
Hi Abel, On 29/12/2018 08.07, abel otugeme wrote: I really need help i have combed through stackover flow and this group but the solutions provided don't work for me.  i use a 32bit windows 7 OS and the latest version of django It would probably be easier for someone to help you if you trie

Re: Static files not rendering in project

2018-07-10 Thread useracct222
Thank you for your response. It seems I needed: from django.contrib.staticfiles.templatetags.staticfiles import static and then from view.py, call static("image.png") and pass this to the context. Not sure why exactly this works, so if you care to elaborate, I'm all for learning. Thanks. On

Re: Static files not rendering in project

2018-07-06 Thread Xarala Academy
Hi friend, Try to change {{STATIC_URL}} to 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 post to thi

Re: static files in production

2017-11-08 Thread Tony King
Ok, I've found a solution here which allows the serving of static files from within the project file folder structure as gathered by collectstatic. I now see that the FastCGI Handler required for

Re: static files in production

2017-11-08 Thread Tony King
> Thanks. The diagram clarified what I'd already thought to a degree, > although I'd gotten confused by the warning in the documentation for > STATIC_ROOT, which says > " This should be an initially empty destination directory for collecting your static files from their permanent locations

Re: static files in production

2017-11-07 Thread Antonis Christofides
Hello, You might find my drawings on how django static files work in production helpful. Unfortunately they are only for nginx and apache, but the same principles apply to IIS. Regards, Antonis Antonis Christo

Re: static files in production

2017-11-07 Thread Dylan Reinhold
In production django does not serve static files. You need to configure iis to serve the files directly from your STATIC_ROOT directory. Then from your project you run manage.py collectstatic . Django will collect up all the staic files and put them in STATIC_ROOT. Dylan On Nov 7, 2017 7:21 AM,

Re: static files not found on development server

2017-07-06 Thread Antonis Christofides
No, the development server recognizes new static files on the fly. However, it can sometimes fail; for example, if you have removed the directory and recreate it. So restarting it is a good idea when you are trying to debug it. Antonis Christofides http://djangodeployment.com On 2017-07-06 19:20

Re: static files not found on development server

2017-07-06 Thread Andreas Schosser
Hi Alex > On development, I run the django-admin runserver, which AFAIK should take > care of the static path. Did you restart the development server. I think the static files are collected at startup and newly added files are not recognized on the fly. Andreas -- Kurs 10 IT-Consulting

Re: static files not found on development server

2017-07-06 Thread Axel Rau
> Am 06.07.2017 um 11:44 schrieb Melvyn Sopacua : > > On development, you're running a webserver that doesn't know the `/static` > url or failed to run `python manage.py collectstatic`. On development, I run the django-admin runserver, which AFAIK should take care of the static path. I have che

Re: static files not found on development server

2017-07-06 Thread Melvyn Sopacua
[Assuming the weird opening quote comma replacement is formatting, not actual code] On Thursday 06 July 2017 11:03:19 Axel Rau wrote: > Why do I get > [06/Jul/2017 09:54:20] "GET /static/css/bootstrap.min.css HTTP/1.1" > 404 1676 on development server, while on production server, it works.

Re: static files suspicious operation, os error, and list of paths

2016-07-13 Thread Michal Petrucha
On Tue, Jul 12, 2016 at 02:36:41PM -0700, Malik Rumi wrote: > Michal, > > > , it looks like somewhere, you're calling ``os.path.join(a, b)``, where > the second argument starts with a slash > > I've tried it both ways. The way I got findstatic to work was by taking off > the leading slash, but so

Re: static files suspicious operation, os error, and list of paths

2016-07-12 Thread Malik Rumi
Michal, > , it looks like somewhere, you're calling ``os.path.join(a, b)``, where the second argument starts with a slash I've tried it both ways. The way I got findstatic to work was by taking off the leading slash, but so far I haven't figured out how to make that work so that the files are cal

Re: static files suspicious operation, os error, and list of paths

2016-07-12 Thread Michal Petrucha
On Tue, Jul 12, 2016 at 12:40:11AM -0700, Malik Rumi wrote: > UPDATE: > > I got it back to where runserver comes up and I get no errors, but the > staticfiles are still not being served. > > > The paths are in the right *format* to satisfy the STATICFILES_DIR in > SETTINGS, and so that they c

Re: static files suspicious operation, os error, and list of paths

2016-07-12 Thread Malik Rumi
UPDATE: I got it back to where runserver comes up and I get no errors, but the staticfiles are still not being served. The paths are in the right *format* to satisfy the STATICFILES_DIR in SETTINGS, and so that they can be *found*, according to debug toolbar, and they *pass* the checks in ru

Re: static files suspicious operation, os error, and list of paths

2016-07-11 Thread Malik Rumi
yes. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) STATIC_URL = '/static/' On Monday, July 11, 2016 at 2:56:06 PM UTC-7, Malik Rumi wrote: > > Well, I'm stuck again. I am still trying to get my dev site to work with > this new bootstrap theme. Debug toolbar is telling

Re: static files suspicious operation, os error, and list of paths

2016-07-11 Thread ludovic coues
Do you define BASE_DIR and STATIC_URL in your settings.py file ? 2016-07-11 23:56 GMT+02:00 Malik Rumi : > Well, I'm stuck again. I am still trying to get my dev site to work with > this new bootstrap theme. Debug toolbar is telling me over 1,000 staticfiles > have been found, but none were used.

Re: static files and DEBUG = False

2015-04-24 Thread Florian Schweikert
On 21/04/15 23:49, egon.frer...@gmx.de wrote: > settings.py contains ALLOWED_HOSTS with the host in the form > ".example.com". With DEBUG = True I get the complete page. But if I set > DEBUG = False the static files are not found so I get only the content. Django does not serve static files if DEB

Re: static files in Django 1.7 ; Anything was change?

2014-09-15 Thread Ricardo Daniel Quiroga
hi in you setings.py add in INSTALLED_APPS add 'django.contrib.staticfiles', STATIC_URL = '/media/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, "media"), #you template path ) 2014-09-15 14:27 GMT-03:00 Fellipe Henrique : > I in development mode, DEBUG = True. using the django serv

Re: static files in Django 1.7 ; Anything was change?

2014-09-15 Thread Fellipe Henrique
I in development mode, DEBUG = True. using the django server. I already run './manage.py collectstatic' they create all my static in my path.. but don't work... T.·.F.·.A.·. S+F *Fellipe Henrique P. Soares* e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ 's/(.)/chr(ord($1)-2*3)/ge' *Blog:

Re: static files in Django 1.7 ; Anything was change?

2014-09-15 Thread Vladimir Chukharev
Yes, there are some changes, see release notes. In particular, you probably need to run 'django-admin collectstatic'. -- 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 ema

Re: static files in Django 1.7 ; Anything was change?

2014-09-14 Thread Mario Gudelj
What are you using to serve static files? You normally setup your server e.g. Nginx to take care of this. Here's an example of Nginx setup file which serves static files from /webapps/hello_django/static/: server { listen 80; server_name example.com; client_max_body_size 4G;

Re: static files

2014-09-04 Thread Dariusz Mysior
Ok I set it :) W dniu środa, 3 września 2014 20:01:26 UTC+2 użytkownik Dariusz Mysior napisał: > > I have my path like below: > > home > darmys > > dom >

Re: static files

2014-09-04 Thread Dariusz Mysior
I dont't understand Now I have like You said and it's not work. I try with app name and without. W dniu środa, 3 września 2014 20:01:26 UTC+2 użytkownik Dariusz Mysior napisał: > > I have my path like below: > > home > darmys >

Re: static files

2014-09-04 Thread Tom Evans
On Wed, Sep 3, 2014 at 10:32 PM, Collin Anderson wrote: > it should be relative do your /static/ directory like so: > > {% static "images/pilka.jpg" %} > Alternatively, it is good to include the app name in the static path, so it might be better to move the file to /home/daymys/dom/player/static/

Re: static files

2014-09-03 Thread Collin Anderson
it should be relative do your /static/ directory like so: {% static "images/pilka.jpg" %} -- 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.

Re: Static Files not Loading

2014-07-30 Thread marc
Hi, STATIC_PATH should be STATIC_ROOT. Cheers Am Mittwoch, 30. Juli 2014 17:10:17 UTC+2 schrieb Steven Williams: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, > > I just asked around on IRC and no one was able to help me. Also the > entries on StackOverflow are not that helpful

Re: Static files in templates with VARIABLES

2014-05-05 Thread Damián Adriel Pérez Valdés
thanks On Mon, May 5, 2014 at 10:29 AM, Charly Román wrote: > {% static LOGO %} > > 2014-05-05 10:27 GMT-05:00 Damián Pérez : > > Hello everyone: > > > > I'm using for the templates {% static 'images/logo.png' %}, but what can > i > > do if I have the logo url on the variable ?, something like

Re: Static files in templates with VARIABLES

2014-05-05 Thread Charly Román
{% static LOGO %} 2014-05-05 10:27 GMT-05:00 Damián Pérez : > Hello everyone: > > I'm using for the templates {% static 'images/logo.png' %}, but what can i > do if I have the logo url on the variable ?, something like static LOGO > > thanks. > > best regards, > > -- > You received this message b

Re: Static files configuration

2013-09-28 Thread Jason S
Thanks Tom, I ran the command python manage.py collectstatic and it copied across new static content i've added to [project]/static/ which is my STATIC_ROOT. But still no css for the admin pages. Also thanks, I do have to set those up and figure them out, I've seen a few tuts for them so will

Re: Static files configuration

2013-09-28 Thread Tom Lockhart
On 2013-09-28, at 4:58 PM, Tom Lockhart wrote: > > On 2013-09-28, at 4:21 PM, Jason S wrote: > >> Thanks Tom, >> I had a pretty painful install experience over a few weeks and had sudo'd a >> command I shouldn't have when doing the GAE install. >> After that experience i'd thought it'd be a

Re: Static files configuration

2013-09-28 Thread Tom Lockhart
On 2013-09-28, at 4:21 PM, Jason S wrote: > Thanks Tom, > I had a pretty painful install experience over a few weeks and had sudo'd a > command I shouldn't have when doing the GAE install. > After that experience i'd thought it'd be a pain to sort it out but i've just > chown'd the project di

Re: Static files configuration

2013-09-28 Thread Jason S
Thanks Tom, I had a pretty painful install experience over a few weeks and had sudo'd a command I shouldn't have when doing the GAE install. After that experience i'd thought it'd be a pain to sort it out but i've just chown'd the project directory and the /tmp/dev_appserver.searchindexes (afte

Re: Static files configuration

2013-09-28 Thread Tom Lockhart
On 2013-09-28, at 3:27 PM, Jason S wrote: > I can now access my CSS file and i've confirmed it's location by changing its > name and confirming the dev server can't see it any more.after I change the > file name. > > The directory its finding it is under [project]/templates/static/css > Sorry

Re: Static files configuration

2013-09-28 Thread Jason S
I can now access my CSS file and i've confirmed it's location by changing its name and confirming the dev server can't see it any more.after I change the file name. The directory its finding it is under [project]/templates/static/css Sorry, no idea why its working but I suspect its permissions b

Re: static files are not working

2013-09-13 Thread Kelvin Wong
Are you saying that your settings are like this? STATIC_ROOT = '/usr/local/lib/python2.7/dist-packages/django/contrib/admin/static' STATIC_URL='/static/' # < Trailing slash required! check it If so that is asking for trouble when you do a collectstatic. You'll prob get permission error un

Re: Static files not served

2013-06-28 Thread der_fenix
Is DEBUG is set to True or False? And can you open static files by paths that are present in page source? I.e. by path which generated from (for exampe) {% static "js/jquery.min.js" %}? > Hi @der_fenix, > > My STATIC_URL setting is as follows: STATIC_URL = '/static/' > > I suspect that Django's

Re: Static files not served

2013-06-27 Thread Sithembewena Lloyd Dube
Hi @der_fenix, My STATIC_URL setting is as follows: STATIC_URL = '/static/' I suspect that Django's development server's static serving does not like noscript tags? I have no idea. I might poke around later ... starting from Django's 'django.contrib.staticfiles.views.serve()' call. On Thu, Jun

Re: Static files not served

2013-06-27 Thread der_fenix
Is there you main static dir in STATIC_URL in settings.py? > Update: removing the noscript tags around the css tags in the template > solves the issue. I am no clientside scripting expert, but it is my > understanding that noscript tags accommodate browsers with scripting turned > off, or legacy b

Re: Static files not served

2013-06-27 Thread Sithembewena Lloyd Dube
Update: removing the noscript tags around the css tags in the template solves the issue. I am no clientside scripting expert, but it is my understanding that noscript tags accommodate browsers with scripting turned off, or legacy browsers? Surely the css should work by default? I know this is not

Re: Static Files on IIS install

2013-04-12 Thread Mike Dewhirst
You need to make IIS serve the static files from a given location. 1. Run collectstatic and note where it puts the files (STATIC_ROOT). 2. Tweak IIS so it connects STATIC_URL to STATIC_ROOT. I can't help there because I have never used it. I could help if it was Apache. Good luck Mike Con

Re: Static Files on IIS install

2013-04-11 Thread Mark Lybrand
I will read those links as soon as I get a chance. As for the particulars: Errors: "NetworkError: 404 NOT FOUND - http://localhost:8001/static/admin/css/base.css"; "NetworkError: 404 NOT FOUND - http://localhost:8001/static/admin/css/dashboard.css"; OS: Windows 7 Web server: IIS 7 with FastCGI

Re: Static Files on IIS install

2013-04-11 Thread Mike Dewhirst
On 12/04/2013 12:56pm, Mark Lybrand wrote: I have managed to get a Django app installed on IIS7. It is not finding the static files for the admin section. Can someone give me some pointers on the steps I need to take to get static files to work in general, https://docs.djangoproject.com/en/1.

Re: static files, runserver debug=True

2013-01-17 Thread Tom Evans
On Wed, Jan 16, 2013 at 11:31 PM, Fred Kingham wrote: > perfect thanks Javier. > > I guess my question should have been phrased, if debug = False, does the > runserver serve static files from the STATIC_ROOT. Clearly that's no. > > Thanks again. > > Fred Even with debug=True, runserver does not

Re: static files, runserver debug=True

2013-01-16 Thread Fred Kingham
perfect thanks Javier. I guess my question should have been phrased, if debug = False, does the runserver serve static files from the STATIC_ROOT. Clearly that's no. Thanks again. Fred On Wednesday, January 16, 2013 7:19:01 PM UTC, Javier Guerra wrote: > > On Wed, Jan 16, 2013 at 6:54 AM

Re: static files, runserver debug=True

2013-01-16 Thread Javier Guerra Giraldez
On Wed, Jan 16, 2013 at 6:54 AM, Fred Kingham wrote: > Can you serve static files like you would in production from the django > runserver? it depends on what you mean by "like you would in production": if you mean "separate processes for static files and web app" then no, it can't since it's a

Re: Static Files

2012-12-25 Thread chdong xu
sorry, should set STATICFILES_DIRS not STATIC_DIR. thanks! 2012/12/26 chdong xu > 1. if you save the white.png in the directory "/tmp/", and you set > STATIC_DIR=("/tmp/",) > 2. get http://localhost:8000/static/white.png > good luck! > > > 2012/12/26 syed tariq > >> I am not getting static fil

Re: Static Files

2012-12-25 Thread chdong xu
1. if you save the white.png in the directory "/tmp/", and you set STATIC_DIR=("/tmp/",) 2. get http://localhost:8000/static/white.png good luck! 2012/12/26 syed tariq > I am not getting static files served. I get messages: > GET http://localhost:8000/white.png 404 (Not Found) > > (1) which dir

Re: static files

2012-10-12 Thread acellam guy
Make sure that all your static settings are okay on your app. Since you mentioned that you are using apache; install *mod_wsgi* be sure to add some stuff to your httpd.conf file eg; #added by guy LoadModule wsgi_module modules/mod_wsgi.so SSLRandomSeed startup builtin SSLRandomSeed conn

Re: static files

2012-10-11 Thread luca72
Thanks i have try but with no result, i have set as follow: MEDIA_ROOT = '/home/luca72/Scrivania/Quintas_Disegno_definitivo/quintas/quintas/static/' MEDIA_URL = '/static/' STATIC_URL = '' STATIC_ROOT = '' STATICFILES_DIRS = ('/home/luca72/Scrivania/Quintas_Disegno_definitivo/quintas/quintas/sta

Re: static files

2012-10-11 Thread Brad Pitcher
I believe the best way of doing this is to have your image(s) in static/images and your css in static/css. Then you can use a relative URL to set the background image like so: background-image : url("../images/PAE.jpg") It's better not to have any CSS mixed in with your HTML anyway. On Oct 11, 2

Re: Static files not loading when debug is false

2012-09-10 Thread Jani Tiainen
As I put in my second post. Static serving is not working (by default) when you turn debugging off unless you provide --insecure option on manage.py runserver command. That is by design. Though with you should see improperly configured exception raised if you try to use forcefully static serving vi

Re: Static files not loading when debug is false

2012-09-10 Thread Karambir Singh Nain
Yeah. during, debug=true, it is serving fine from static_root. But not when debug is false. On Monday, September 10, 2012 2:01:03 AM UTC+5:30, Jani Tiainen wrote: > > I suppose that your frontend webserver is serving files from url /static/ > from path that STATIC_ROOT points to? > > On Sun, Sep

Re: Static files not loading when debug is false

2012-09-10 Thread e.generalov
There is another case - tests. The TestCase forces DEBUG=False, therefore staticfiles application, included to the project in accordance with the documentation, works in the development server, but unexpectedly does't serve static in test scenarios. Why the serving static files in the developme

Re: Static files not loading when debug is false

2012-09-09 Thread Stephen Anto
Hi Singh, I have configured static file for my projects as follows. In settings.py import os PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media') MEDIA_URL = '/site_media/' STATIC_ROOT = '' # URL prefix for static files. # Example: "http://m

Re: Static files not loading when debug is false

2012-09-09 Thread Jani Tiainen
Also just a note, if you're using manage.py runserver without debug = TRUE setting, static file serving is not taking place. you can use --insecure option to mark that you really want to do staticfile serving still from django. https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#django-

Re: Static files not loading when debug is false

2012-09-09 Thread Jani Tiainen
I suppose that your frontend webserver is serving files from url /static/ from path that STATIC_ROOT points to? On Sun, Sep 9, 2012 at 10:23 PM, Karambir Singh Nain wrote: > I have a fairly simple django project having some views, templates and > static files like css and images. My settings fil

Re: Static files management

2012-05-22 Thread Kurtis Mullins
Can you give us some more detail on what's not working? Thanks. On Tue, May 22, 2012 at 9:34 AM, Xavier Ordoquy wrote: > Hi, > > If you follow what the doc says, there shouldn't be any issue > (https://docs.djangoproject.com/en/1.4/howto/static-files/#basic-usage) > > Regards, > Xavier Ordoquy,

  1   2   >