working with static css file in django which is given by django

login.html
======
<html>
<head>
{% load staticfiles %}
<link rel="stylesheet" type="text/css" href="{% static 'css/base.css' %}" />


</head>

<body>


{% load staticfiles %}
<img src="/static/img/e-com.jpg" width="100%" height="130">

<h1>
haiaiiiaiai
</h1>

<a>
haiaiiiaiai
</a>


<p>
haiaiiiaiai

</p>
       


</body>

</html>




settings.py
=======



STATIC_URL = '/static/'
STATIC_ROOT = BASE_DIR + '/static'
STATICFILES_DIRS = (
    BASE_DIR + '/static/admin/',
)






o/p

===




haiaiiiaiai

haiaiiiaiai haiaiiiaiai






Note:(static files given by django)
====



erp@erp-OptiPlex-330:~/ecommerce/static$ tree
.
`-- admin
    |-- css
    |   |-- base.css
    |   |-- base.css~
    |   |-- changelists.css
    |   |-- dashboard.css
    |   |-- forms.css
    |   |-- ie.css
    |   |-- login.css
    |   |-- rtl.css
    |   `-- widgets.css
    |-- img
    |   |-- changelist-bg.gif
    |   |-- changelist-bg_rtl.gif
    |   |-- default-bg.gif
    |   |-- default-bg-reverse.gif
    |   |-- deleted-overlay.gif
    |   |-- e-com.jpg
    |   |-- gis
    |   |   |-- move_vertex_off.png
    |   |   `-- move_vertex_on.png
    |   |-- icon_addlink.gif
    |   |-- icon_alert.gif
    |   |-- icon_calendar.gif
    |   |-- icon_changelink.gif
    |   |-- icon_clock.gif
    |   |-- icon_deletelink.gif
    |   |-- icon_error.gif
    |   |-- icon-no.gif
    |   |-- icon_searchbox.png
    |   |-- icon_success.gif
    |   |-- icon-unknown.gif
    |   |-- icon-yes.gif
    |   |-- inline-delete-8bit.png
    |   |-- inline-delete.png
    |   |-- inline-restore-8bit.png
    |   |-- inline-restore.png
    |   |-- inline-splitter-bg.gif
    |   |-- nav-bg.gif
    |   |-- nav-bg-grabber.gif
    |   |-- nav-bg-reverse.gif
    |   |-- nav-bg-selected.gif
    |   |-- selector-icons.gif
    |   |-- selector-search.gif
    |   |-- sorting-icons.gif
    |   |-- tooltag-add.png
    |   `-- tooltag-arrowright.png
    `-- js
        |-- actions.js
        |-- actions.min.js
        |-- admin
        |   |-- DateTimeShortcuts.js
        |   `-- RelatedObjectLookups.js
        |-- calendar.js
        |-- collapse.js
        |-- collapse.min.js
        |-- core.js
        |-- inlines.js
        |-- inlines.min.js
        |-- jquery.init.js
        |-- jquery.js
        |-- jquery.min.js
        |-- LICENSE-JQUERY.txt
        |-- prepopulate.js
        |-- prepopulate.min.js
        |-- related-widget-wrapper.js
        |-- SelectBox.js
        |-- SelectFilter2.js
        |-- timeparse.js
        `-- urlify.js

6 directories, 64 files
erp@erp-OptiPlex-330:~/ecommerce/static$ 
 

No comments:

Post a Comment