Posts

Showing posts with the label django

How to style Django Forms with Bootstrap

Image
Though we can use third-party packages like Django-Crispy forms to style forms in django with ease but still it's sometimes required to style django generated forms all by yourself, here we will see how to do that. the form will be able to show errors also. Read more »

How to Install and use Django Crispy Forms

Crispy forms is a third party django app that makes styling forms really simple. It makes your forms look beautiful with almost no effort from your side. It supports different template packs like uni-form, foundation, bootstrap and  bootstrap3  , that's what we will be using. Setting it up is simple as well with these few steps that I have shown below Read more »

Simple Hello World page with django 1.9 in Ubuntu / Linux Mint [Beginners] [Part - 2]

In the First part of this tutorial we created an app named helloworld and added it to the setting.py file. Now let's continue further towads our journey to make a 'Hello World' page with django. Read more »

Simple Hello World page with django 1.9 in Ubuntu / Linux Mint [Beginners] [Part - 1]

Django is a web framework written in python. It is good for fast web application development. In this tutorial we will learn how to make a simple web page showing "Hello World" using django templates. we will also be applying styling to our page with css static files, we won't be dealing with any database or any advanced stuffs here. This tutorial is aimed at beginners, So I 'll try to explain things in simple language without much technical detail. Read more »

How to Install wysiwyg editor in your django project

Image
with django-wysiwyg , you get different rich html text editors, making it easier to write article posts. It supports TinyMCE, CKEditor, Redactor, Froala, yui and more Follow the below steps to setup django-wysiwyg in your django project. Read more »

Code Syntax Highlighting in django with Pygments

Image
Syntax Highlighting is a very much useful if you put code on your website. This can be easily achived with django-pygments . over 300 languages are supported. List of supported Languages:   http://pygments.org/languages/ django-pygments is the implementation of the pygments syntax highlighter for django. usage is quite simple. after setting up everything, you need to put necessary template tags and then place your code in pre tags with a lang attribute specifying the language of the source code in your template. example: <pre lang="python">YOUR CODE</pre> 1. First, Install the following packages. pip install pygments pip install django-pygments Read more »

How to Change your django Project name

Image
It's possible to rename a project in django. you just have to replace your existing project name in the following places with the new one. Your django project structure ProjectName/          manage.py           ProjectName/                   __init__.py                   settings.py                   urls.py                   wsgi.py Rename your project directory  (ProjectName) and the following inside your project directory. settings.py ROOT_URLCONF = 'NewProjectName.urls' WSGI_APPLICATION = 'NewProjectName.wsgi.application' wsgi.py os.environ.setdefault("DJANGO_SETTINGS_MODULE", "NewProjectName.settings") manage.py os.environ.setdefault("DJANGO_SETTINGS_MODULE", "NewProjectName.settings") There is no need to make any changes to a...