CSS Button Generator will create beautiful css buttons for you to use on your web pages without the need for any images. When you have styled your button to your liking, simply click on the generated button to get your css style code. Share our site using a button below!
[ add comment ] ( 7 views ) | [ 0 trackbacks ] | permalink | related link
Functional CSS menu generator for Free.
CSSMenuMaker.com is here to provide the average webmaster with tools to create custom, cross browser compatible website menus. Our menu generator makes it easy to create custom CSS menus without having to know all the complicated HTML and CSS. If you are a more experienced web developer we provide the sources code for all our CSS menus so that you can download, tweak, and integrate as much as you want. Feel free to use our CSS menu generator an unlimited amount of times. The only thing that we ask is if you find this site useful, help us spread the word by linking to us or bookmarking us with digg.com or del.icio.us.
[ add comment ] ( 7 views ) | [ 0 trackbacks ] | permalink | related link
<html>
<head>
<style>
* {
margin: 0em;
}
.lang {
background: blue;
text-align: right;
height: 1.57;
}
.container {
background: grey;
margin: 1.57em 4.71em;
height: 90%;
text-align: center;
}
.menu {
background: yellow;
}
.content {
background: orange;
margin: 12.56%;
height: 29.1%;
}
</style>
</head>
<body>
<div class="lang">
<p>This is lang box.</p>
</div>
<div class="container">
<div class="menu">
<span>asdasd | asdasd | asdasd | asdasd</span>
</div>
<div class="content">
<div class="">
<span>This is box three, which is also inside box two.</span>
</div>
</div>
</body>
</html>
[ add comment ] ( 7 views ) | [ 0 trackbacks ] | permalink
* {margin: 0px;}
.top {
background: blue;
padding: 10px;
}
.m15 {
margin: 15px;}
.master {
background: gray;
margin-top: 0px;
padding: 50px;
text-align: center;
}
.menu {
background: red;
padding: 15px;
margin-bottom: 0px;
}
.menu:hover {
background: orange;
}
.odkaz {
text-decoration: undeline;
}
.odkaz:hover {
text-decoration: none;
font-weight: bold;
}
.content {
background: yellow;
width: 100px;
margin: auto;
padding: 10px;
text-align: left;
}
<html>
<head>
<link href="css2.css" rel="stylesheet">
</head>
<body>
<div class="top">text
</div>
<div class="m15 menu">menu
</div>
<div class="m15 master">
<div class="content"><a href="/" class="odkaz">odkaz</a>
</div>
</div>
</body>
</html>
[ add comment ] ( 7 views ) | [ 0 trackbacks ] | permalink | related link
* {margin: 0px;}
.top {
background: blue;
padding: 10px;
}
.master {
background: gray;
margin: 15px;
margin-top: 0px;
padding: 50px;
text-align: center;
}
.menu {
background: red;
padding: 15px;
margin: 15px;
margin-bottom: 0px;
}
.content {
background: yellow;
width: 100px;
margin: auto;
padding: 10px;
text-align: left;
}
<html>
<head>
<link href="css1.css" rel="stylesheet">
</head>
<body>
<div class="top">text
</div>
<div class="menu">menu
</div>
<div class="master">
<div class="content">content
</div>
</div>
</body>
</html>
[ add comment ] ( 7 views ) | [ 0 trackbacks ] | permalink | related link
[ add comment ] ( 7 views ) | [ 0 trackbacks ] | permalink
---------
urls.py
---------
from django.conf.urls import patterns, include, url
from django.conf.urls.i18n import i18n_patterns
from page.views import hello
urlpatterns = patterns('',
url(r'^hello/', hello, name="hello" ),
url(r'^i18n/', include('django.conf.urls.i18n')),
)
---------
settings.py
---------
# set LOCALE_PATH
LOCALE_PATHS = (
'/home/123058999/django/language/locale/',
)
# append middleware: django.middleware.locale.LocaleMiddleware
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.locale.LocaleMiddleware',
)
# limits languages
LANGUAGES = (
('en', ('Englicky')),
('cs', ('Ceskyy')),
)
---------
index.html
---------
{% load i18n %}
<html>
<head>
<title>
{{ hello_text }}
</title>
</head>
<div class="text">
{{ hello_text }}
{% trans "This is the title text from template." %}
</div>
<div class="footer">
<a href="{% url page.views.hello %}">CLICK HERE FOR OTHER LANGUAGE</a>
</div>
<div class="langselection">
<form action="/i18n/setlang/" method="post">
{% csrf_token %}
<input name="next" type="hidden" value="{{ redirect_to }}" />
<select name="language">
{% get_language_info_list for LANGUAGES as languages %}
{% for language in languages %}
<option value="{{ language.code }}">{{ language.name_local }} ({{ language.code }})</option>
{% endfor %}
</select>
<input type="submit" value="Go" />
</form>
</div>
</html>
---------
views.py
---------
from django.http import HttpResponse
from django.shortcuts import render
from django.utils import translation
from django.utils.translation import ugettext
from django.core.urlresolvers import reverse
from django.utils.translation import activate
def hello( request ):
#activate('cs')
cur_language = translation.get_language()
translation.activate(cur_language)
page_title = ugettext( "BBC is broadcasting..." )
return render( request, "index.html", { 'hello_text': page_title } )
----------------------------------------------------
localisation with POST but with links as in GET href
----------------------------------------------------
{% load i18n %}
<!--- <p>{{ LANGUAGE_CODE|language_name }}</p> --->
{% get_language_info_list for LANGUAGES as languages %}
<div id="langs">
<table >
<tr>
{% for language in languages %}
<td>
<form action="{% url django.views.i18n.set_language %}" method="post">
{% csrf_token %}
<input name="next" type="hidden" value="{{ redirect_to }}" />
<input type="hidden" name="language" value="{{ language.code }}"/>
<input id="lang_{{language.code}}" type="image" src="/static/img/internet/langicon-{{language.code}}.gif" alt="{{language.name_local}}"/>
</form>
</td>
{% endfor %}
</tr>
</table>
</div>
----------------------------
direct setlang from urls.py
----------------------------
# i18n
url(r'^setlang', 'django.views.i18n.set_language'),
url(r'^i18n/', include('django.conf.urls.i18n')),
---------
shell
---------
mkdir locale # in project folder
./manage.py makemessages -l en
./manage.py makemessages -l cz
./manage.py compilemessages
---------
links
---------
LOCALE_PATHS: https://docs.djangoproject.com/en/1.4/ref/settings/#std:setting-LOCALE_PATHS
translation: https://docs.djangoproject.com/en/1.4/topics/i18n/translation/
[ add comment ] ( 9 views ) | [ 0 trackbacks ] | permalink
internationalization
Preparing the software for localization. Usually done by developers.
localization
Writing the translations and local formats. Usually done by translators.
https://docs.djangoproject.com/en/1.4/topics/i18n/translation/
[ add comment ] ( 6 views ) | [ 0 trackbacks ] | permalink | related link
$ python
>>>
>>> import os
>>> os.environ['DJANGO_SETTINGS_MODULE'] = "projectname.settings"
>>>
>>> import sys
>>> sys.path.append("/home/user/projectname/")
>>> from appname.views import *
[ add comment ] ( 6 views ) | [ 0 trackbacks ] | permalink | related link
netaddr is a Python library for representing and manipulating network addresses.
It support the ability to work and interact with the following:
IPv4 and IPv6 addresses and subnets
MAC addresses, OUI and IAB identifiers, IEEE EUI-64 identifiers
arbitrary (non-aligned) IP address ranges and IP address sets
various non-CIDR IP range formats such as nmap and glob-style formats
from netaddr import IPNetwork
ipnetwork = '192.168.0.0/24'
print list(IPNetwork(ipnetwork).iter_hosts())
[ add comment ] ( 5 views ) | [ 0 trackbacks ] | permalink | related link