On 28/09/2014 3:09 AM, Some Developer wrote:
>
> If anyone can post information on their Windows development work flows
> I'd be very grateful since I'm pretty new to Windows development work.
>
* This goes against Microsoft recommendations but I install Python2.x
and Python3.x in the root of drive C: so I'm not forced to use a
admin-privileged cmd shell.
* I put the following dirs on the Windows path ...
C:\Users\mike\bin and C:\Users\mike\bat
* I write batch files rather than virtualenvwrapper because it wasn't
available to me when I started using virtualenv.
* My favourite batch file in development is run.bat which launches
manage.py in various guises ... see below
* I use subversion running on my Ubuntu staging server plus buildbot on
the same machine. When I commit changes to the repo, buildbot blows the
staging site away completely and starts again from scratch and runs all
the tests. I know its not git but I like it.
* I use a plain text editor with syntax highlighting because I haven't
installed Pycharm. I've downloaded it but haven't had time to think
about it. I should.
Good luck
Mike
# run.bat
@echo off
echo .
echo .
echo .
echo Should be running in virtualenv
echo .
echo .
echo .
pause
if %1xx==xx (
..\Scripts\python manage.py runserver --settings=
ssds.settings.dev
goto end
)
if %2xx==xx (
set apps=common company refer substance workplace
) else (
set apps=%2
)
if %1==dumpdata (
set file=%2
goto dumpdata
)
if %1==syncdb (
set file=%2
goto syncdb
)
if %1==test (
copy substance\fixtures\test_data.json
substance\fixtures\initial_data.json /Y
..\Scripts\python manage.py test --settings=ssds.settings.test
--verbosity=1 %apps%
)
if %1==cover (
copy substance\fixtures\test_data.json
substance\fixtures\initial_data.json /Y
coverage run manage.py test --settings=ssds.settings.test --verbosity=1
%apps%
coverage html
)
goto end
:syncdb
..\Scripts\python manage.py syncdb
goto end
:dumpdata
if %2xx==xx set file=fixtures\initial_data-x.json
..\Scripts\python manage.py dumpdata --settings=ssds.settings.production
--indent=2 --verbosity=0 --natural --exclude=contenttypes
--exclude=auth.permission --exclude=admin.logentry
--exclude=sessions.session --exclude=company.userprofile <snip my
project tables>...</snip> --exclude=south.migrationhistory > %file%
:end
set json=fixtures\initial_data.json
if exist %json% (del %json%)