Friday, September 18, 2020

Re: Admin site's css doesn't work.

Thank you so much for your Amazing, Lovely Answer. I added static  STATIC_ROOT = os.path.join(BASE_DIR, 'static') . But the problem is I didn't register static files on the server. Please can you tell me? how can I register for it? I am using Linux shared hosting with Cpanel. Is there any tutorial or blog to get rid of it? Love From heart
Regards,
Mainul 

On Thu, Sep 17, 2020 at 9:09 PM Ankit Gadewal <ankitgadewal14@gmail.com> wrote:
If you run it on localhost it works fine but when you run site in production static files fails to work. So you have to add static root in Django setting.py file like STATIC_ROOT = os.path.join(BASE_DIR, 'static') and then run python manage.py collectstatic command. It will collect all the server site static files in a folder in base directory named static. And then you have to register static files on the server(for example Apache) depends on server type. After this configuration admin CSS will work. I had the same problem with my project. And the problem solved after I am doing the same as I mentioned above.... If any problem arises please let me know.

On Thu, Sep 17, 2020, 19:16 English Learning <mainulislamfaruqi@gmail.com> wrote:
when I host it, Admin's CSS doesn't show. Also, I am using SQLite database. Screenshot is here: 

Is it a Database problem? Please let me know the answer. I am suffering from it because it is a Client project.  

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3832905f-33cf-484f-bc01-8ee78dbc487dn%40googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/u3JU2XAXz58/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALha6NvqSxYcoALqrON8BQp0O3e%3DKFuLtJKXRBE_fxsXdVCs1Q%40mail.gmail.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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CADR4xT-njgOcMJWEr%2BDTbrsB8GJdR3k%3DR7CZ2WwFwiYGwykmzQ%40mail.gmail.com.

No comments:

Post a Comment