Rendering XML using XSLT

2014-09-27 Thread Timothy W. Cook
I have a view that opens an XML file (it happens to be a schema but that doesn't matter) that specifies a stylesheet. It works as expected when opening the XML file locally. ​The stylesheet isn't applied when viewing the file via Django and I see in Firebug that I am getting a 404 on the styleshee

Re: Rendering XML using XSLT

2014-09-27 Thread Timothy W. Cook
Some details I forgot are that this is Django 1.6.4, Python 3.4.1. The 404 error is on http://192.168.1.9:8080/get_xsd/ccd-description.xsl On Sat, Sep 27, 2014 at 8:10 AM, Timothy W. Cook wrote: > I have a view that opens an XML file (it happens to be a schema but that > doesn't matter) that spe

Re: Rendering XML using XSLT

2014-09-27 Thread John
Do you have a URL conf that matches the /get_xsd/ccd-description.xsl stylesheet? You have to match and serve that as well. Taking a step back though. It looks like you are serving static files that would be best served from a webserver, perhaps

Re: Rendering XML using XSLT

2014-09-27 Thread Timothy W. Cook
On Sat, Sep 27, 2014 at 9:02 AM, John wrote: > Do you have a URL conf that matches the /get_xsd/ccd-description.xsl > stylesheet? You > have to match and serve that as well. > > Taking a step back though. It looks like you are serving stati

Re: syncdb error with Mysql database on Windows 7

2014-09-27 Thread Daniel Grace
For the record I solved this, I was mistaken there was no "mydb" schema in MySQL. I created this schema and ran the "syncdb" command without any problems. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Best way to use a 'all' QuerySet as a dict with id first

2014-09-27 Thread aRkadeFR
@James Brewer: If I change my code, I can have this user_ids list. btw, it's filter and not get if you're searching multiple objects (the user_ids). @Alejandro Varas G.: That doesn't change the fact that 'User.objects.get(id=X)' will hit the database everytime. Right now, the problem is solved, b

Error installing psycopg2-2.5.4 on Windows 7

2014-09-27 Thread Daniel Grace
Hi, I have Python 3.4, Django 1.7 and Postgresql 9.3 installed. I get the following error when installing pscyopg2-2.5.4 on Windows 7: Python version 3.4 required, which was not found in the registry. Any ideas? Thanks. -- You received this message because you are subscribed to the Google Gr

Re: Error installing psycopg2-2.5.4 on Windows 7

2014-09-27 Thread Daniel Grace
I solved this. I was using the wrong version of psycopg2, I needed the 64 bit version. On Saturday, 27 September 2014 14:35:43 UTC+1, Daniel Grace wrote: > > Hi, > I have Python 3.4, Django 1.7 and Postgresql 9.3 installed. I get the > following error when installing pscyopg2-2.5.4 on Windows

Re: Best way to use a 'all' QuerySet as a dict with id first

2014-09-27 Thread tkdchen
On Saturday, September 27, 2014 9:06:58 PM UTC+8, aRkadeFR wrote: > > @James Brewer: > If I change my code, I can have this user_ids list. > btw, it's filter and not get if you're searching multiple objects (the > user_ids). > > @Alejandro Varas G.: > That doesn't change the fact that 'User.

Re: Upgrading Django (to 1.7)

2014-09-27 Thread bobhaugen
The problem we ran into was not with the order of migrations, it was that all of the migrations were running with the latest models.py code. The data migration was trying to move data from one model field to another model field, and the "from" field had been deleted from models.py. This was a

Problems with psycopg2 on Windows 7 64 bit

2014-09-27 Thread Daniel Grace
I have installed Python 3.4, Django 1.7, Postgresql 9.3 and psycopg2-2.5.4 (using the Windows installer at http://www.stickpeople.com/projects/python/win-psycopg/) When I try a syncdb command from my virtualenv I get the following error: (landy) C:\landy\cresta>python manage.py syncdb Traceback

Fwd: Re: Upgrading Django (to 1.7)

2014-09-27 Thread Fred Stluka
Bob, Are you referring directly to the models by name in the data migrations? That could be the problem, because yes, the migration would be using the latest models at the time that the migration is executed, not the models as they stood at the time that the migration was written. There's a war

Re: Problems with psycopg2 on Windows 7 64 bit

2014-09-27 Thread Daniel Grace
I got around this particular problem. The Windows installer for psycopg (at http://www.stickpeople.com/projects/python/win-psycopg/ ) installs f

Re: Upgrading Django (to 1.7)

2014-09-27 Thread Andrew Pinkham
Benjamin, Thank you! The next two parts of the article will focus on why certain changes were made. Please let me know if you think there were changes that I should have written about. Depending on my schedule and feedback, I would be willing to consider adding to the material if I've missed an

Switching from Linux to Windows for development of Django applications

2014-09-27 Thread Some Developer
Hi, For reasons outside of my control I have to switch from Linux to Windows for Django development and was wondering if any Windows developers had any tips? On Linux I make heavy use of pip and virtualenv to make sure that my packages are kept separate from the system packages. I'm thinking

Re: Upgrading Django (to 1.7)

2014-09-27 Thread Andrew Pinkham
Hi Bob, Thank you! I spend a lot of Part II talking about schema and data migrations in both South and native Django 1.7 migrations. When building data migrations, you should be using historical models. In Django 1.7, you can request these models directly from the app registry built on the fly

Django 1.7 and Python 2.6

2014-09-27 Thread François Schiettecatte
Hi I know that Django 1.7 does not officially run on Python 2.6: https://docs.djangoproject.com/en/1.7/releases/1.7/#python-compatibility Unfortunately I am stuck with Python 2.6 on a number of servers but would like to migrate to Django 1.7. Does anyone run that configuration?

Re: Switching from Linux to Windows for development of Django applications

2014-09-27 Thread Avraham Serour
are you doing python or windows development? python development on windows shouldn't be much different, you have virtualenv and the same pycharm some packages that requires compilation could be a headache, the easier path is to get a binary and use easy_install to install inside the venv On Sat,

Re: Django 1.7 and Python 2.6

2014-09-27 Thread Babatunde Akinyanmi
Hi, If you can download in your server then you can install python 2.7+ into your virtenv. On 27 Sep 2014 19:54, "François Schiettecatte" wrote: > Hi > > I know that Django 1.7 does not officially run on Python 2.6: > > > https://docs.djangoproject.com/en/1.7/releases/1.7/#python-compatibility >

Django Locale

2014-09-27 Thread Anderson
Hi there, For some reason my locale file is not loading when I switch the language. This is pretty much what I did locale -> pt_BR-> LC_MESSAGES-> django.mo django.po en-> LC_MESSAGES-> dja

Re: Django 1.7 and Python 2.6

2014-09-27 Thread phil...@bailey.st
Hello there, docker might do the job. Cheers, Phillip On 27/09/14 20:42, Babatunde Akinyanmi wrote: > Hi, > If you can download in your server then you can install python 2.7+ into > your virtenv. > > On 27 Sep 2014 19:54, "François Schiettecatte" > wrote: >

Re: Django 1.7 and Python 2.6

2014-09-27 Thread Russell Keith-Magee
Out of the box, it won't work - but if maintaining an internal fork that adds Python 2.6 compatibility back in shouldn't be *too* difficult. When we drop support for a Python version, we don't go out of our way to break compatibility with that version. It's more like a gradual process where langua

Re: Switching from Linux to Windows for development of Django applications

2014-09-27 Thread Mike Dewhirst
On 28/09/2014 5:18 AM, Avraham Serour wrote: some packages that requires compilation could be a headache, the easier path is to get a binary and use easy_install to install inside the venv Chris Gohlke is your very best friend ... http://www.lfd.uci.edu/~gohlke/pythonlibs/ ... makes Windows

Re: Switching from Linux to Windows for development of Django applications

2014-09-27 Thread Mike Dewhirst
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

Re: Problems with psycopg2 on Windows 7 64 bit

2014-09-27 Thread Mike Dewhirst
On 28/09/2014 1:47 AM, Daniel Grace wrote: I got around this particular problem. The Windows installer for psycopg (at http://www.stickpeople.com/projects/python/win-psycopg/