-
-
Save nandooliveira/2bb11a69a629158defdb2a7ac0c1ed6e to your computer and use it in GitHub Desktop.
Revisions
-
rg3915 revised this gist
Nov 21, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # wget --output-document=Makefile https://goo.gl/UMTpZ1 # make setup # Colors -
rg3915 revised this gist
Nov 21, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,7 +34,7 @@ migrate: @./manage.py migrate createuser: @echo "${green}>>> Creating a 'admin' user ...${reset}" @./manage.py createsuperuser --username='admin' --email='' magic: @@ -48,7 +48,7 @@ magic: backup: @./manage.py dumpdata core --format=json --indent=2 > fixtures.json @echo "${green}>>> backup created successfully: fixtures.json${reset}" load: @./manage.py loaddata fixtures.json -
rg3915 revised this gist
Nov 21, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # wget https://gist.github.com/rg3915/a26a2daef369b729e2ed/raw/414368989a7656d0f7072ffa17a051d75142f250/Makefile # make setup # Colors -
rg3915 revised this gist
Nov 21, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ # wget https://goo.gl/mgm8Ij # make setup # Colors red=`tput setaf 1` -
rg3915 revised this gist
Nov 21, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ # $ make setup # Colors red=`tput setaf 1` green=`tput setaf 2` -
rg3915 revised this gist
Nov 21, 2015 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,7 +42,6 @@ magic: @sed -i "s/@//" myproject/urls.py @echo "Create the view more simple" @sed -i "/render/afrom django.http import HttpResponse\n\n\ndef home(request):\n return HttpResponse('<h1>Welcome to the Django.</h1>')" core/views.py backup: @./manage.py dumpdata core --format=json --indent=2 > fixtures.json @@ -56,4 +55,4 @@ run: setup: venv active install: installdjango createproject migrate createuser magic run -
rg3915 created this gist
Nov 21, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,59 @@ # Colors red=`tput setaf 1` green=`tput setaf 2` reset=`tput sgr0` venv: @echo "${green}>>> Creating virtualenv${reset}" @virtualenv -p python3 venv @echo "${green}>>> venv is created.${reset}" active: @echo "${red}>>> Type source venv/bin/activate${reset}" @echo "${red}>>> Type cd djangoproject${reset}" @echo "${red}>>> Type make install${reset}" @mkdir djangoproject @cp Makefile djangoproject/ installdjango: @echo "${green}>>> Installing the Django${reset}" @pip install django @pip freeze > requirements.txt createproject: @echo "${green}>>> Creating the project 'myproject' ...${reset}" @django-admin.py startproject myproject . @echo "${green}>>> Creating the app 'core' ...${reset}" @./manage.py startapp core migrate: @./manage.py makemigrations @./manage.py migrate createuser: @echo "${green}>>> Creating a user ...${reset}" @./manage.py createsuperuser --username='admin' --email='' magic: @echo "Editing settings.py" @sed -i "/django.contrib.staticfiles/a\@ 'core'," myproject/settings.py @sed -i "s/@//" myproject/settings.py @sed -i "/urlpatterns = \[/a\@ url(r'\^$$\', 'core.views.home', name='home')," myproject/urls.py @sed -i "s/@//" myproject/urls.py @echo "Create the view more simple" @sed -i "/render/afrom django.http import HttpResponse\n\n\ndef home(request):\n return HttpResponse('<h1>Welcome to the Django.</h1>')" core/views.py @./manage.py runserver backup: @./manage.py dumpdata core --format=json --indent=2 > fixtures.json @echo "${green}>>> backup created with success: fixtures.json${reset}" load: @./manage.py loaddata fixtures.json run: @./manage.py runserver setup: venv active install: installdjango createproject migrate createuser magic