Overview
For resposive web designers: Ads are big trouble.
In the next article I will explain how to edit the JS script to a responsive design for your eBay ads.
Development Specialist, Artist and Activist
Personal Website
For resposive web designers: Ads are big trouble.
In the next article I will explain how to edit the JS script to a responsive design for your eBay ads.
Development Specialist, Artist and Activist
Personal Website
Django, out-of-the-box doesn’t knows how to add rows to your db when the model changed, You have 2 options:
Development Specialist, Artist and Activist
Personal Website
In this tutorial we will explain how to Hide WordPress HomePage Title or All Pages Title.
DevOps/IT Specialist, Musician.
IT Manager – Faculty of Exact Sciences, Bar-Ilan University
Personal Website
In this tutorial we will explain how to implement a Google Adsense Responsive Design without violating Google Adsense Policy.
DevOps/IT Specialist, Musician.
IT Manager – Faculty of Exact Sciences, Bar-Ilan University
Personal Website
I’ll demostrate in this article how to create a simple view to return JSON formatted rows from your model.
Development Specialist, Artist and Activist
Personal Website
Django routing module called URL dispatcher
Normally, When a user requests a page from your Django-powered site Django loads the URLconf module from a file called urls.py at the root of your project, Ordinarily, this is the value of the ROOT_URLCONF setting, The URL dispatcher can be overridden when the incoming HttpRequest object has an attribute called urlconf (set by middleware request processing), its value will be used in place.
First line in your urls.py should be:
1 | from django.conf.urls import patterns |
Django loads that file and looks for the variable urlpatterns. This should be a Python list, in the format returned by the function django.conf.urls.patterns().
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | from django.conf.urls.defaults import patterns urlpatterns = patterns('', # ex: / (r'^$', 'myapp.views.home', {}, 'index'), # ex: /about (r'^about', 'myapp.views.about', {}, 'about'), .... ) # To add more urlpatterns in the same urls.py you can use: urlpatterns += patterns('', .... ) |
You can use the url( convenience wrapper.
The url() function is passed five arguments, two required: regex and view, and three optional: kwargs, name, and prefix.
You can use the url() function, instead of a tuple, as an argument topatterns(). This is convenient if you want to supply a name but not extra_context you’d still have to include an empty optional extra arguments dictionary in the tuple version
Remember you need to include the url, from django.conf.urls.defaults.
1 | from django.conf.urls.defaults import patterns, url |
These are the same:
1 2 | (r'^$', 'views.home', {}, 'index'), url(r'^$', views.index, name='index'), |
You can use either way, as you feel convenient for you. It’s the same code above, but using Import to shorten code:
1 2 3 4 5 6 7 | from django.conf.urls.defaults import patterns from myapp import views urlpatterns = patterns('', (r'^$', 'views.home', {}, 'index'), ..... ) |
1 2 3 4 5 6 | from django.conf.urls.defaults import patterns from myapp.views import home urlpatterns = patterns('', (r'^$', 'home', {}, 'index'), ..... |
1 2 3 4 | urlpatterns = patterns('myapp.views', (r'^$', 'home', {}, 'index'), ..... ) |
You can include from another file, Django app or object. remember to import the include() function.
1 2 3 4 5 6 | from django.conf.urls.defaults import patterns, url, include urlpatterns = patterns('', # ex: /help url(r'^help/', include('help.urls')), ..... ) |
This code will search for url.py file inside help app in your django project. construct the file the same as the url.py file.
1 2 3 4 5 6 7 8 9 10 | from django.conf.urls.defaults import patterns, url, include extra_patterns = patterns('', ....... ) urlpatterns = patterns('', (r'^extra/', include(extra_patterns)), ..... ) |
These are the URL dispatcher basics. Maybe I’ll be post later another post on more advanced aspects of the URL dispatcher include URL grouping, passing extra parameters to view and more…
CYA,
And good luck with Django – It worth it!
Development Specialist, Artist and Activist
Personal Website
Several major companies have been hacked lately. Security advice for web users last week from the US Department of Homeland Security encouraging to disable java on browsers. Disable java in each browser takes time. You will learn how to disable java for all at once. and also for each browser if needed.
Development Specialist, Artist and Activist
Personal Website
If you are a WordPress plugin developer, you may want to use the new build-in WordPress 3.5 Media Manager in your plugin. This tutorial will teach you how to implement the Media-Manager in your plugin.
Development Specialist, Artist and Activist
Personal Website
You will learn how to add necessary META your website as a tile to support windows 8 tile start menu pin using IE 10. Just like windows 8 application do!.
Development Specialist, Artist and Activist
Personal Website
Microsoft announced their new tool called modern.IE. http://www.modern.ie/
Using this tool (website) you can scan for common coding problems.
Development Specialist, Artist and Activist
Personal Website
You may need the EPEL repositories for Centos.
Development Specialist, Artist and Activist
Personal Website
Virtualenv tutorial. In this tutorial I will show you in easy steps how to install and use VirtualEnv & VirtualEnvWrapper on your CentOS 6.x environment.
1 |
yum install python
|
yum install python
Development Specialist, Artist and Activist
Personal Website