Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

git - Hosting-specific code in projects: push to Github too? -


imagine common scenario: hacked cool project want share world. so: put on github, , fetch github on own website people can see demo. makes updating easy: push local box github, fetch on server.

i'd track visitors add google analytics , maybe other site-specific stuff (like global header pages on site) project. however, checks out project github gets stuff too.

there few solutions prevent that. make specific 'deployment branch' website, that's cumbersome. make kind of switch in code (if ip === myip showstats()), that's ugly.

another option might use githooks, haven't got experience that.

any other suggestions? people bothered when getting deployment-specific code in checkouts?

similar breun's suggestion, (so question double answered) deploy python projects settings.py file defines settings needed on production machine. (debug=false, proper database settings , file paths...)

at end of file, try import developmentsettings.py this:

try:     projectnaam import developmentsettings except:     pass 

the file not exist in version control, fail , silently pass on server. on dev machine, manually create file , override specific settings match dev needs. (things sqlite instead of postgres)

this can extended more sophisticated deployment strategy, involving stuff fabric, buildout, capistrano , chef. gets more important when working in (distributed) teams.

my current development flow goes like: edit code, $ git commit -m "comment", $ git push, $ fab deploy master production (<- pulls 'master' origin onto server)


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -