You should use staticfiles to include your css, js and image in your page.
You first need to load the module in your template, then you can use
the static tag

{% load staticfiles %}
<link rel=stylesheet href="{% static "css/user.css" %}">

While you are in dev, static will look into each of your app's static
directory for the path you passed as argument.
When you will go in production, you will need to use manage.py
collectstatic and serve your static asset with your server

If the same static file is stored in multiple app, only the first one
will be served. You can use manage.py findstatic css/user.css to find
which file will be served when requesting css/user.css

2017-02-17 11:21 GMT+01:00 Kazi Atik <kazi.at...@gmail.com>:
> what i have to do when i have multiple apps
>
>
> On Friday, February 17, 2017 at 1:28:29 PM UTC+5:30, Jani Tiainen wrote:
>>
>> Hi,
>>
>> You need to put static files under static directory within app. Now you
>> have static resources at your app root. So layout should be:
>>
>> users/
>>     static/
>>         css/
>>             style.css
>>
>>
>> On 17.02.2017 08:15, Kazi Atik wrote:
>>
>> Hi Everyone,
>>
>> I am having multiple app in my project so i want to make globally these
>> css, js,img folder because every time making css,js,img folder very
>> difficult and slowing my development of
>> my project please give me solution
>>
>> myfb
>> users/
>>         __init__.py
>>         models.py
>>         views.py
>>         urls.py
>>         templates/
>> login.html
>> dashboard.html
>> logout.html
>>         css/
>>          style.css
>> -----------------------------------
>> categories/
>>         __init__.py
>>         models.py
>>         views.py
>>         urls.py
>>         templates/
>> post.html
>> friends.html
>> upload.html
>>         css/
>>          user.css
>>     img/
>>          fb.jpg
>>   JS/
>>   boot.min.js
>>
>>
>>
>> --
>> 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 post to this group, send email to django...@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/215f85be-b377-4f44-a3bb-0e9311f31c35%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> Jani Tiainen
>
> --
> 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/18065a52-9952-4c35-b185-7f330ca5af4d%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 

Cordialement, Coues Ludovic
+336 148 743 42

-- 
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/CAEuG%2BTZ8PtuqghrVeeGKHZ%3De6_00embTiKe%2BHjo5FcidD01QOg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to