Youcanchangethethemejustbyreplacingonewordinbase.html
Features:Latestbootstraptemplate,modernizer,jqueryetc.latest,servedfromcontentdeliverynetworks.UserRegistry,Login&ForgotPasswordEmailintegrationwithSendGrid&acontactformwithrecaptchaAsampletasksdatabasewithSQLALchemywithPaginationHowtouseit:gitclonehttps://github.com/AndreiD/Flask-Easy-Template.git<project_name>ordownloadthezippipinstall-rrequirements.txtpythonrun.py->https://server_ip:5000Thingstodoafter:checktheconfig.pyinrun.pyedittheportoftheapp(Default:5000)Fortemplatesedit/app/templates/base.html
{%setbootstrap_version='3.3.4'%}{%setjquery_version='2.1.3'%}{%setmodernizer_version='2.8.3'%}{%setbootswatch_version='3.3.2'%}{%setbootswatch_theme='slate'%}
Incaseyoudon'tlikethe"slate"theme,youcanchoseanicethemefromhttps://bootswatch.com/andjustreplacethethemename
Step2.???Step3.PROFIT
AboutStarsStarringarepositoryallowsyoutokeeptrackofprojectsthatyoufindinteresting,evenifyouaren'tassociatedwiththeproject.
Whenyoustararepository,you'reactuallyperformingtwodistinctactions:
CreatingabookmarkforeasieraccessShowingappreciationtotherepositorymaintainerfortheirwork
Extrasforyou:asupervisord.conf[supervisorisusedtomonitorthewebapplicationandrestartit,alsostartstheappincaseyourestartyourserver]asimplenginx.confafteryougointoproduction,uncommentthesettingsfromrun.pyforthebestperformanceYourFeedbackisappreciated:)
TROUBLESHOOTSFORBEGINNERS:-READFIRST:AboutPython2and3compatibilitySomescriptsandmodulesversionsrequiredherearewritteninpython2andnotreadyyetforpython3,soitisrecommendedtodownloadandinstallbothinterpreterspython2andalsopython3(forwindowsusersdon'tforgettoaddtheirfolderpathsalsoinyourenvironmentvariables)Thenwhencallingpythonscriptsinversion2or3anyway(examplewiththepackagemanagerscriptPIP),youcanrundefaultpythoncommandlike:"python-mpipinstall..."or"pipinstall..."Tocallonlypython3scriptschoosethisinstead:"py-mpipinstall..."or"pip3install..."-Errorparsinginrequirements.txt?Runinsteadthiscompatibleformattedfile:python-mpipinstall-rrequirements-pip2.txtorconvertfirstyourrequirements.txttoapython2pip2compatibleformatwiththiscommand:python-mpiplist--format=freeze>requirements.txt-ErrorinstallonProxytype:SyntaxErrorlikeMissingparenthesesincallto'print'?theprintfunctionrequiresparenthesesinPython3butnotinPython2whichmeansthattheextensionthatyouaretryingtoinstallisnotyetcompatiblewithpython3Thisiswhyitisrecommendedtoinstallpython3andpython2bydefault.Soruninsteadthiscompatiblecommandforpython2extensions(afterinstallingpython2ifnotgotityet):python-mpipinstall-rrequirements-pip2.txtorpython-mpipinstall...-ErrorinstallmodulePycrypto:microsoftvisualc++compilerforpython2.7isrequired?downloadandinstallmicrosoftvisualc++compilerforpython2.7here:https://www.microsoft.com/en-us/download/details.aspx?id=44266-ErrorTornadomodulenotfound?itisaproblemwheninstallingmodulesliketornadoinamultiplepythoninterpretersenvironmentSoruninsteadthiscommoncommandpythonwhichprecizebydefaultthepython2versionpython-mpipinstall-rrequirements-pip2.txtorpython-mpipinstall...orpythonrun.pyLicense:Apache2.0Copyright2015AndroidAdvance.comLicensedundertheApacheLicense,Version2.0(the"License");youmaynotusethisfileexceptincompliancewiththeLicense.YoumayobtainacopyoftheLicenseathttps://www.apache.org/licenses/LICENSE-2.0Unlessrequiredbyapplicablelaworagreedtoinwriting,softwaredistributedundertheLicenseisdistributedonan"ASIS"BASIS,WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied.SeetheLicenseforthespecificlanguagegoverningpermissionsandlimitationsundertheLicense.
评论