You need to set your static in settings.py and I am giving you simplest
idea you can implement with no issues.

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static', 'static-only')
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'static', 'media')
STATICFILES_DIRS = [
       os.path.join(BASE_DIR, 'static', 'static'),
]

Now in your project source folder create a new folder named 'static' which
will refer to values in blue.
In your 'static' in blue folder create subfolders with names 'media',
static-only', 'templates' and 'static' again. So hierarchy should look like
this:

static
----static
----media
----static-only
----templates

In your settings.py in "TEMPLATE" section find simalr line like below and
change it as I did.

'DIRS': [os.path.join(BASE_DIR, 'static', 'templates')],

Now go to your terminal (command shell) and run following command.
./manage.py collectstatic

It will ask you are you sure you want to do this. Type "yes" and press
enter.

.manage.py runserver and refresh your page.

You will get all the css loaded.

Furthermore you can create three new folders in your /static/static/.

static
----static
             |
             -------css
             |
             -------js
             |
             -------images
----media
----static-only
----templates

In your static/static folder you can keep the project template related
css/js/images. All your html based code will go to /static/templates
folder. Read the link below thorough and in case of issues you can post
another question or to same thread.

https://docs.djangoproject.com/en/1.10/howto/static-files/

Regards,
Mudassar

On Mon, Aug 8, 2016 at 1:58 AM, Timothy Steele <steeletimothy2...@gmail.com>
wrote:

>
>
> On Monday, August 8, 2016 at 1:16:57 AM UTC+1, Timothy Steele wrote:
>>
>> Please any time i try to load my Django admin panel the default CSS files
>> does not load and even i have to refresh several time before i can  the css
>> file will load, and even if i log in still the interface become different,
>> it does not load the CSS files. I believe this is coming form the static
>> files which i have not loaded but i did what ever i could and it did not
>> work for me so i need  a help please.
>> Please below is an attach file of screen shots i took
>>
>> Any way i am still a beginner
>>
>> THANKS
>>
>
> (any way this is the best group i have join so far thanks to all of you)
>
> PLEASE MY FRIENDS I BEG
> can you give me a step by step process to do this
> thanks very mach
>
>
>
> --
> 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 this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/7f5ae2e5-11f7-429b-b4a3-78a8d36ef787%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/7f5ae2e5-11f7-429b-b4a3-78a8d36ef787%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANoUts6uCR1H5tAZaZ8x%2BfwNiZkh_zSe9qJoL00_ss9reget_Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to