Django url pass through
How is a url conf written so that if none of the useful urls are matched it will pass through to some sort of wild card regular expressions so that the view / redirection can be performed gracefully Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f981954c-679a-4000-9e4c-11d3e6ee3e09%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Django url pass through
Thank you your response answers the "what do I do" as a response by calling the 404 view. I also need to understand how the url will be coded so that an invalid url that does not match anything falls through the the last url in the urls.py file. I have a project urls.py file and expect that anything that does not match waitlist will fall through to the 2nd url. url(r'^waitlist/', include('waitlist.urls')), url(r'^.*$', views.404_view), If the project matches the value waitlist, the router will pull in the urls from the app. Same question as above The url my_domain.com/waitlist/ will pull in the index view as expected Will the url my_domain.com/waitlist/abc4#jjj/ pull in the 404_view and be handled graceffully? url(r'^$', views.index, name='index'), url(r'^.*$', views.404_view), Thanks again On Monday, September 22, 2014 10:25:11 PM UTC-4, robert brook wrote: > > How is a url conf written so that if none of the useful urls are matched > it will pass through to some sort of wild card regular expressions so that > the view / redirection can be performed gracefully > > Thanks > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/acbd5b3d-0aa8-4510-890c-0f6277345264%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Need example to implement sql (dictionary) translations
>From the django project web site, I am trying to implement the following code and have it spit out the dictionary form of the sql. Does anyone have an example of how this is done. The code below is from the project web page https://docs.djangoproject.com/en/1.7/topics/db/sql/ When I execute the 2 lines below I retrieve the following Does anyone have an example so that I can get this into a dictionary format so that I can send it back to the web page for consumption? >>> name_map = {'first': 'first_name', 'last': 'last_name', 'bd': 'birth_date', >>> 'pk': 'id'}>>> Person.objects.raw('SELECT * FROM some_other_table', >>> translations=name_map) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/90ee80be-2413-4b6a-8739-2bd73a1d15b5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Problem with populate script
This was really not a core function of the application, so I wold not worry about it. Just add the data to a csv page and import it into sql lite to get you going. But I believe that you need to tell Python where the data base is located using the settings file import os os.environ['DJANGO_SETTINGS_MODULE']='settings' On Monday, September 29, 2014 1:51:13 PM UTC-4, Daniel Grace wrote: > > I am trying to follow the tutorial at http://www.tangowithdjango.com/ > I am stuck in section 5.8 where it shows how to create a script to > populate the database. > I created a script called "populate.py" as shown (except I added brackets > for the Python 3 print statements), > and saved it in the root directory for my project. > But when I run the script I get an error: > > (landy) C:\landy\tango>populate.py > Starting Rango population script... > Traceback (most recent call last): > File "C:\landy\tango\populate.py", line 59, in > from rango.models import Category, Page > File "C:\landy\tango\rango\models.py", line 1, in > from django.db import models > ImportError: No module named 'django.db' > > I tried placing the script in C:\landy\tango\tango and > C:\landy\tango\rango directories but I get similar errors. > > Is it a better approach to make the populate script into a manage command? > Or should I be using fixtures? > > Thanks > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e1dfa25b-8c7c-4489-88d4-eaa637ca94b6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Need example to implement sql (dictionary) translations
Person.objects.raw('SELECT * FROM some_other_table', translations=name_map) That does not work. Printing out the results from above gives me the following. How do I convert this into a sql result, and or a dictionary? The row above On Monday, September 29, 2014 1:11:51 PM UTC-4, robert brook wrote: > > From the django project web site, I am trying to implement the following > code and have it spit out the dictionary form of the sql. > > Does anyone have an example of how this is done. > > The code below is from the project web page > > https://docs.djangoproject.com/en/1.7/topics/db/sql/ > > > When I execute the 2 lines below I retrieve the following > > > Does anyone have an example so that I can get this into a dictionary > format so that I can send it back to the web page for consumption? > > >>> name_map = {'first': 'first_name', 'last': 'last_name', 'bd': > >>> 'birth_date', 'pk': 'id'}>>> Person.objects.raw('SELECT * FROM > >>> some_other_table', translations=name_map) > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2b6d8cd6-7c0b-41cd-bc95-e54837d6b732%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Setting up Apache to be the web server for apache for Django 1.7 and python 3.3
Can someone point me to a document on how to perform a setup for Apache. What modules would it be good to install ( I presume as a site package for Python)? What should the settings.py reflect to accept calls from Apache? What do I need to configure in the apache config file? What port should I use? I assume that once I use Apache I no longer need to run python manage.py runserver, because I will no longer be using the local server, but now the Apache server? Any other suggestions would be helpful. Is mod_wsgi for a medium traffic web site for https the way to go? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f5cf6b83-7a90-4ffa-84de-c41aef1c68b0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Setting up Apache to be the web server for apache for Django 1.7 and python 3.3
The requirements of the organization is to use Apache On Friday, October 3, 2014 8:42:29 AM UTC-4, robert brook wrote: > > Can someone point me to a document on how to perform a setup for Apache. > > What modules would it be good to install ( I presume as a site package for > Python)? > > What should the settings.py reflect to accept calls from Apache? > > What do I need to configure in the apache config file? > > What port should I use? > > I assume that once I use Apache I no longer need to run python manage.py > runserver, because I will no longer > be using the local server, but now the Apache server? > > Any other suggestions would be helpful. > > Is mod_wsgi for a medium traffic web site for https the way to go? > > Thanks > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/634381ee-57e5-49d1-91fd-aa23b392a15d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Question on url routing
If I have 2 urls coded in the file for example url(r'^abc/$', views.abc), url( r'^abc/def/$', views.def), And the first url should be accessible by typing it into the browser. The 2nd url should only be accessible from the application, not by virtue of a user typing it into the browser. How do I accomplish that? How do I capture that and reroute it to a valid page? Thanks is advance -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b8423a99-7798-4458-b817-5f5179373603%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Question on url routing
I know how to detect an ajax request. I am interested int the general issue of the user typing in a valid url for the application, but not appropriate for the particular workflow. I utilize the @login_required decorater. I am looking for an analgous function to pass the user back to an appropriate page. On Friday, October 10, 2014 8:35:47 AM UTC-4, Collin Anderson wrote: > > Do you mean ajax-only? > > def my_view(request): > if not request.is_ajax(): > return redirect('/a-valid-page/') > > > https://docs.djangoproject.com/en/1.7/ref/request-response/#django.http.HttpRequest.is_ajax > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/00884451-604a-4ac1-99d1-860f6080c366%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Question on url routing
It would seem that this should be a common issue for any web site. based on the DRY principle, how has this been resolved by other developers On Friday, October 10, 2014 8:09:12 AM UTC-4, robert brook wrote: > > If I have 2 urls coded in the file for example > > url(r'^abc/$', views.abc), > url( r'^abc/def/$', views.def), > > And the first url should be accessible by typing it into the browser. > > The 2nd url should only be accessible from the application, not by virtue > of a user typing it into the browser. > > How do I accomplish that? > How do I capture that and reroute it to a valid page? > > Thanks is advance > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c90c55a0-c657-4e49-b4e2-77903f37e082%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Question on url routing
Can you provide an example of custom logic Thanks On Friday, October 10, 2014 9:56:38 AM UTC-4, Vijay Khemlani wrote: > > I think in those cases you would need to add some custom logic to your > view to check whether the URL is valid for the "step" the user is in the > workflow. > > On Fri, Oct 10, 2014 at 10:47 AM, robert brook > wrote: > >> I know how to detect an ajax request. >> >> I am interested int the general issue of the user typing in a valid url >> for the application, but not appropriate for the particular workflow. >> >> I utilize the @login_required decorater. >> >> I am looking for an analgous function to pass the user back to an >> appropriate page. >> >> >> >> On Friday, October 10, 2014 8:35:47 AM UTC-4, Collin Anderson wrote: >>> >>> Do you mean ajax-only? >>> >>> def my_view(request): >>> if not request.is_ajax(): >>> return redirect('/a-valid-page/') >>> >>> https://docs.djangoproject.com/en/1.7/ref/request-response/#django.http. >>> HttpRequest.is_ajax >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users...@googlegroups.com . >> To post to this group, send email to django...@googlegroups.com >> . >> Visit this group at http://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/00884451-604a-4ac1-99d1-860f6080c366%40googlegroups.com >> >> <https://groups.google.com/d/msgid/django-users/00884451-604a-4ac1-99d1-860f6080c366%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3ba68285-45e8-4e51-81c0-729b2a0caf68%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Question on url routing
I have figured out how to determine if the url_conf was obtained from an internal link (which would be the only acceptable workflow) or through a url that the user typed into the address bar trying to subvert the workflow. See the attached screen shot of the view. If the view goes through the except statement, I would redirect to an appropriate page. On Monday, October 13, 2014 9:58:28 AM UTC-4, Collin Anderson wrote: > > Hi Robert, > > I once had a 4-step ecommerce checkout, and at one point, I considered > using class based views for each step, and have a class method on each view > that runs form validation on the current data in the database to see if the > user is allowed to continue. It would then need to redirect back to itself > if it wasn't valid. > > In the end I decided to do some non DRY, but simple sanity checks in the > later views and redirect to a previous step if needed. > > Collin > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3839438f-ebf0-436d-9a0e-dde412605b2d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Porting to Django Linux with SQL Server Backend
The group has been developing locally with sqllite on Windows. We are porting the installation to a Linux environment /windows sql server. Looking for suggestions for database connectors from Linux to sql server 2014 using: python3.3 django 1.7 I have installed a local copy of sql server to try and find a connector package I have tried the following packages on my windows machine with a local copy of sql server django-pyodbc-azure -This worked after creating a local odbc connection The following failed with a variety of errors. django-pyodbc pymssql django-sqlserver django-mssql Any suggestions for the sql server connection for any of these would be appreciated. Thanks in advance -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2fd821c3-a9b4-4d22-a70b-a43c6917c17d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Porting to Django Linux with SQL Server Backend
Sorry I guess I should have focused the question better. I have a working connector on my windows machine using django-pyodbc-azure I can and will use this connector on the new Linux installation. Since I have never tested this on a Linux machine yet, I wanted to see if anyone had any successful experiences with this connector or any other connector on a Red Hat Linux box. By the way I looked at the link below and the comments on the git page seem that they are lagging behind on developing this package with the current releases of both python and django Thanks Bob On Wednesday, October 15, 2014 9:34:46 AM UTC-4, Michael Manfre wrote: > > It's hard to give constructive feedback without knowing any of the > specific errors you encountered, but django-mssql only works on Windows. > Depending on the error you encountered with pymssql, you could try > django-pymssql (https://github.com/aaugustin/django-pymssql). > > Regards, > Michael Manfre > > On Wednesday, October 15, 2014 9:03:54 AM UTC-4, robert brook wrote: >> >> The group has been developing locally with sqllite on Windows. >> >> We are porting the installation to a Linux environment /windows sql >> server. >> >> Looking for suggestions for database connectors from Linux to sql server >> 2014 >> using: >> python3.3 >> django 1.7 >> >> I have installed a local copy of sql server to try and find a connector >> package >> I have tried the following packages on my windows machine with a local >> copy of sql server >> >> django-pyodbc-azure -This worked after creating a local odbc connection >> >> The following failed with a variety of errors. >> django-pyodbc >> pymssql >> django-sqlserver >> django-mssql >> >> Any suggestions for the sql server connection for any of these would be >> appreciated. >> >> Thanks in advance >> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b9c6c27b-a8d1-4161-b76c-fde9e2a99a90%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Django sqlaclhemy and Sabridge Module
Has anyone had any experience using the the sabridge module to connect to a production database in general and specifically to sql server (version 2014 with python 3.3 and django 1.7)? I would like to be able to integrate sqlalchemy into my production environment. Any other suggestions that anyone has used to integrate sqlalchemy with the django (orm) user model would be appreciated. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1f5b3d36-8622-4f22-879a-799720f4811d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Porting to Django Linux with SQL Server Backend
Thanks for your response. I am in the process of porting this. I am concerned that I really only have one potential option of pyodbc-azure in the event that there is a problem. Unfortunately unless I reach a complete stumbling block I will use the pyodbc - azure connector to enable me to connect to sql server from Linux At this point what I am trying to do is use sqlalchemy wherever I can in the views to improve functionality and performance. And I will be using the built in ORM (pyodbc-azure) to log users on to take advantage of the built in functionality of the user model. Any suggestions / comments to using this combination would be appreciated On Thursday, October 16, 2014 1:18:21 AM UTC-4, WongoBongo wrote: > > I have a working system running Django 1.6/Python 2.7 on RHEL 7 connecting > to MSSQL2012 SP 2 on Win Server. > > On the Linux box we are installing this with Pip requirements: > > git+https://code.google.com/p/pyodbc@3.0.7#egg=pyodbc > django-pyodbc-azure==1.1.5 > > The local_settings.py contains: > > DATABASES = { > "default": { > ... > "HOST": "192.168.0.10", > "PORT": "", > "OPTIONS": { > "driver": "FreeTDS", > "dsn": "sqlserverdatasource", > 'host_is_server': True, > 'autocommit': True, > 'unicode_results': True, > 'extra_params': 'tds_version=8.0' > } > } > } > > We are running the latest FreeTDS from 2011. > > $ tsql -C > ... > freetds v0.91 > > We've had quirky problems with it and a few mysterious segfaults on the > application server from time to time. It does work for the most part, but > the application isn't under any kind of load at the moment. > > If I had a choice, I wouldn't run Django on MSSQL Server. > > - K > > > On Wednesday, October 15, 2014 7:13:04 AM UTC-7, robert brook wrote: >> >> Sorry I guess I should have focused the question better. >> >> I have a working connector on my windows machine using django-pyodbc-azure >> >> I can and will use this connector on the new Linux installation. >> >> Since I have never tested this on a Linux machine yet, I wanted to see if >> anyone had any successful experiences with this connector >> or any other connector on a Red Hat Linux box. >> >> By the way I looked at the link below and the comments on the git page >> seem that they are lagging behind on developing this package with >> the current releases of both python and django >> >> Thanks >> Bob >> >> On Wednesday, October 15, 2014 9:34:46 AM UTC-4, Michael Manfre wrote: >>> >>> It's hard to give constructive feedback without knowing any of the >>> specific errors you encountered, but django-mssql only works on Windows. >>> Depending on the error you encountered with pymssql, you could try >>> django-pymssql (https://github.com/aaugustin/django-pymssql). >>> >>> Regards, >>> Michael Manfre >>> >>> On Wednesday, October 15, 2014 9:03:54 AM UTC-4, robert brook wrote: >>>> >>>> The group has been developing locally with sqllite on Windows. >>>> >>>> We are porting the installation to a Linux environment /windows sql >>>> server. >>>> >>>> Looking for suggestions for database connectors from Linux to sql >>>> server 2014 >>>> using: >>>> python3.3 >>>> django 1.7 >>>> >>>> I have installed a local copy of sql server to try and find a connector >>>> package >>>> I have tried the following packages on my windows machine with a local >>>> copy of sql server >>>> >>>> django-pyodbc-azure -This worked after creating a local odbc >>>> connection >>>> >>>> The following failed with a variety of errors. >>>> django-pyodbc >>>> pymssql >>>> django-sqlserver >>>> django-mssql >>>> >>>> Any suggestions for the sql server connection for any of these would be >>>> appreciated. >>>> >>>> Thanks in advance >>>> >>> -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/526df765-f99f-44da-90bf-7ce6d5bb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Porting to Django Linux with SQL Server Backend
Thank you for your response. I saw that you mentioned that you were getting seg faults I noticed on a web site that there was an entry that might overcome that problem http://www.kcaran.com/entries/technology/linux/linuxodbc.html *** sing Red Hat, you may get a ‘Segmentation Fault’ using DBI, even though connecting to the database works fine with *tsql*. If this happens, try setting the following environmental variable: PERL_DL_NONLAZY = 1 Read this Usenet thread for more details <http://groups.google.com/group/perl.dbi.users/tree/browse_frm/thread/995131d999ca388/b3d60553c8f87d4d?rnum=1&hl=en&q=redhat+DBI+%22segmentation+fault%22&_done=%2Fgroup%2Fperl.dbi.users%2Fbrowse_frm%2Fthread%2F995131d999ca388%2Fd0fb4863311789f6%3Flnk%3Dst%26q%3Dredhat+DBI+%22segmentation+fault%22%26rnum%3D1%26hl%3Den%26#doc_f937fadc7f1ba28d> *NOTE:* This appears to be fixed. https://rhn.redhat.com/errata/RHBA-2006-0319.html *** On Thursday, October 16, 2014 1:18:21 AM UTC-4, WongoBongo wrote: > > I have a working system running Django 1.6/Python 2.7 on RHEL 7 connecting > to MSSQL2012 SP 2 on Win Server. > > On the Linux box we are installing this with Pip requirements: > > git+https://code.google.com/p/pyodbc@3.0.7#egg=pyodbc > django-pyodbc-azure==1.1.5 > > The local_settings.py contains: > > DATABASES = { > "default": { > ... > "HOST": "192.168.0.10", > "PORT": "", > "OPTIONS": { > "driver": "FreeTDS", > "dsn": "sqlserverdatasource", > 'host_is_server': True, > 'autocommit': True, > 'unicode_results': True, > 'extra_params': 'tds_version=8.0' > } > } > } > > We are running the latest FreeTDS from 2011. > > $ tsql -C > ... > freetds v0.91 > > We've had quirky problems with it and a few mysterious segfaults on the > application server from time to time. It does work for the most part, but > the application isn't under any kind of load at the moment. > > If I had a choice, I wouldn't run Django on MSSQL Server. > > - K > > > On Wednesday, October 15, 2014 7:13:04 AM UTC-7, robert brook wrote: >> >> Sorry I guess I should have focused the question better. >> >> I have a working connector on my windows machine using django-pyodbc-azure >> >> I can and will use this connector on the new Linux installation. >> >> Since I have never tested this on a Linux machine yet, I wanted to see if >> anyone had any successful experiences with this connector >> or any other connector on a Red Hat Linux box. >> >> By the way I looked at the link below and the comments on the git page >> seem that they are lagging behind on developing this package with >> the current releases of both python and django >> >> Thanks >> Bob >> >> On Wednesday, October 15, 2014 9:34:46 AM UTC-4, Michael Manfre wrote: >>> >>> It's hard to give constructive feedback without knowing any of the >>> specific errors you encountered, but django-mssql only works on Windows. >>> Depending on the error you encountered with pymssql, you could try >>> django-pymssql (https://github.com/aaugustin/django-pymssql). >>> >>> Regards, >>> Michael Manfre >>> >>> On Wednesday, October 15, 2014 9:03:54 AM UTC-4, robert brook wrote: >>>> >>>> The group has been developing locally with sqllite on Windows. >>>> >>>> We are porting the installation to a Linux environment /windows sql >>>> server. >>>> >>>> Looking for suggestions for database connectors from Linux to sql >>>> server 2014 >>>> using: >>>> python3.3 >>>> django 1.7 >>>> >>>> I have installed a local copy of sql server to try and find a connector >>>> package >>>> I have tried the following packages on my windows machine with a local >>>> copy of sql server >>>> >>>> django-pyodbc-azure -This worked after creating a local odbc >>>> connection >>>> >>>> The following failed with a variety of errors. >>>> django-pyodbc >>>> pymssql >>>> django-sqlserver >>>> django-mssql >>>> >>>> Any suggestions for the sql server connection for any of these would be >>>> appreciated. >>>> >>>> Thanks in advance >>>> >>> -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/41e1b51d-dc38-4dd0-bda9-14d68d5886ba%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Installing django on red hat linux box
I have alot of experience installing packages on windows and mac and it goes very smoothly. I do not have alot of experience doing the installs on a Linux box. I am running into problems installing 4 packages. The Lan team tried yum, but the basic django packages were not available. Then I tried installing pip and I got proxy errors using the get-pip.py script So I fell back to installing the dowloaded packages with the old standy setup.py install which fails. I am attaching the top of the log Anyone have any suggestions how to proceed? ** running install running bdist_egg running egg_info writing pyodbc.egg-info/PKG-INFO writing top-level names to pyodbc.egg-info/top_level.txt writing dependency_links to pyodbc.egg-info/dependency_links.txt reading manifest file 'pyodbc.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching 'tests/*' writing manifest file 'pyodbc.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_ext building 'pyodbc' extension gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPYODBC_VERSION=3.0.7 -I/usr/include/python2.6 -c /home/rbrook/pyodbc-3.0.7/src/pyodbcmodule.cpp -o build/temp.linux-x86_64-2.6/home/rbrook/pyodbc-3.0.7/src/pyodbcmodule.o -Wno-write-strings In file included from /home/rbrook/pyodbc-3.0.7/src/pyodbcmodule.cpp:12: /home/rbrook/pyodbc-3.0.7/src/pyodbc.h:41:20: error: Python.h: No such file or directory /home/rbrook/pyodbc-3.0.7/src/pyodbc.h:42:25: error: floatobject.h: No such file or directory /home/rbrook/pyodbc-3.0.7/src/pyodbc.h:43:24: error: longobject.h: No such file or directory * -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/83a1d410-9cc1-4841-a517-1895ba220179%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Installing django on red hat linux box
I have installed a virtualenv on my local machine to do the development. On the development web server using a virutal environment is not really important. The packages that I am interested in are not available through yum. Trying to install the packages locally displays header errors. Any suggestions around this? On Wednesday, October 22, 2014 12:12:10 PM UTC-4, robert brook wrote: > > > I have alot of experience installing packages on windows and mac and it > goes very smoothly. > I do not have alot of experience doing the installs on a Linux box. > > I am running into problems installing 4 packages. > > The Lan team tried yum, but the basic django packages were not available. > > Then I tried installing pip and I got proxy errors using the get-pip.py > script > > So I fell back to installing the dowloaded packages with the old standy > setup.py install which fails. > > I am attaching the top of the log > > Anyone have any suggestions how to proceed? > > ** > > running install > > running bdist_egg > > running egg_info > > writing pyodbc.egg-info/PKG-INFO > > writing top-level names to pyodbc.egg-info/top_level.txt > > writing dependency_links to pyodbc.egg-info/dependency_links.txt > > reading manifest file 'pyodbc.egg-info/SOURCES.txt' > > reading manifest template 'MANIFEST.in' > > warning: no files found matching 'tests/*' > > writing manifest file 'pyodbc.egg-info/SOURCES.txt' > > installing library code to build/bdist.linux-x86_64/egg > > running install_lib > > running build_ext > > building 'pyodbc' extension > > gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall > -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector > --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv > -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic > -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPYODBC_VERSION=3.0.7 > -I/usr/include/python2.6 -c /home/rbrook/pyodbc-3.0.7/src/pyodbcmodule.cpp > -o build/temp.linux-x86_64-2.6/home/rbrook/pyodbc-3.0.7/src/pyodbcmodule.o > -Wno-write-strings > > In file included from /home/rbrook/pyodbc-3.0.7/src/pyodbcmodule.cpp:12: > > /home/rbrook/pyodbc-3.0.7/src/pyodbc.h:41:20: error: Python.h: No such > file or directory > > /home/rbrook/pyodbc-3.0.7/src/pyodbc.h:42:25: error: floatobject.h: No > such file or directory > > /home/rbrook/pyodbc-3.0.7/src/pyodbc.h:43:24: error: longobject.h: No such > file or directory > > * > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e142631b-c0f9-4296-9a35-2dbe295196b2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Installing django on red hat linux box
I have python 3.3. Had to coerce red hat to do allow the install 3.3. Must have been a stripped down version. version 6 came with python 2.6 installed. Must be a stripped down version as pip does not come with python 3.3 I believe I need the package , python3.3-dev, to get the headers to utilize the std setup.py install I am going to follow up with Red Hat. Thanks On Wednesday, October 22, 2014 12:53:08 PM UTC-4, Pat Claffey wrote: > > Hi, > I assume you have python installed successfully. What version? If you > install python 3.4 then pip should install automatically (unless 3.4. is a > second python install in which case pip does not install) > > You should be able to see the python (and pip) executables in /usr/bin or > /usr/local/bin. For example on my system I see python2.6 and pip installed > on /usr/bin (python is just a link to python2.6). I manually installed > python3.4 and pip3.4. I see these executables in /usr/local/bin. > > python2.6 was pre-installed on my linux box (red hat). I installed > python3.4 and pip3.4 manually. > > > > On Wednesday, October 22, 2014 5:12:10 PM UTC+1, robert brook wrote: >> >> >> I have alot of experience installing packages on windows and mac and it >> goes very smoothly. >> I do not have alot of experience doing the installs on a Linux box. >> >> I am running into problems installing 4 packages. >> >> The Lan team tried yum, but the basic django packages were not available. >> >> Then I tried installing pip and I got proxy errors using the get-pip.py >> script >> >> So I fell back to installing the dowloaded packages with the old standy >> setup.py install which fails. >> >> I am attaching the top of the log >> >> Anyone have any suggestions how to proceed? >> >> ** >> >> running install >> >> running bdist_egg >> >> running egg_info >> >> writing pyodbc.egg-info/PKG-INFO >> >> writing top-level names to pyodbc.egg-info/top_level.txt >> >> writing dependency_links to pyodbc.egg-info/dependency_links.txt >> >> reading manifest file 'pyodbc.egg-info/SOURCES.txt' >> >> reading manifest template 'MANIFEST.in' >> >> warning: no files found matching 'tests/*' >> >> writing manifest file 'pyodbc.egg-info/SOURCES.txt' >> >> installing library code to build/bdist.linux-x86_64/egg >> >> running install_lib >> >> running build_ext >> >> building 'pyodbc' extension >> >> gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall >> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector >> --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv >> -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions >> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic >> -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPYODBC_VERSION=3.0.7 >> -I/usr/include/python2.6 -c /home/rbrook/pyodbc-3.0.7/src/pyodbcmodule.cpp >> -o build/temp.linux-x86_64-2.6/home/rbrook/pyodbc-3.0.7/src/pyodbcmodule.o >> -Wno-write-strings >> >> In file included from /home/rbrook/pyodbc-3.0.7/src/pyodbcmodule.cpp:12: >> >> /home/rbrook/pyodbc-3.0.7/src/pyodbc.h:41:20: error: Python.h: No such >> file or directory >> >> /home/rbrook/pyodbc-3.0.7/src/pyodbc.h:42:25: error: floatobject.h: No >> such file or directory >> >> /home/rbrook/pyodbc-3.0.7/src/pyodbc.h:43:24: error: longobject.h: No >> such file or directory >> >> * >> >> >> -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/38b5e63d-7f1b-4564-8c53-3bb99ab3020d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Installing django on red hat linux box
I am a contractor in a large organziation. They must have everything locked down. I downloaded get-pip.py and got errors that seemed to be proxy, firewall security issues, that is why I fell back to implementing through setup.py and ran into the header issues. Thanks On Wednesday, October 22, 2014 12:55:26 PM UTC-4, Pat Claffey wrote: > > once I got pip sorted out it was really easy install django (just pip > install django) - so advise is to get pip working. You will need it for > other python packages also. > > On Wednesday, October 22, 2014 5:12:10 PM UTC+1, robert brook wrote: >> >> >> I have alot of experience installing packages on windows and mac and it >> goes very smoothly. >> I do not have alot of experience doing the installs on a Linux box. >> >> I am running into problems installing 4 packages. >> >> The Lan team tried yum, but the basic django packages were not available. >> >> Then I tried installing pip and I got proxy errors using the get-pip.py >> script >> >> So I fell back to installing the dowloaded packages with the old standy >> setup.py install which fails. >> >> I am attaching the top of the log >> >> Anyone have any suggestions how to proceed? >> >> ** >> >> running install >> >> running bdist_egg >> >> running egg_info >> >> writing pyodbc.egg-info/PKG-INFO >> >> writing top-level names to pyodbc.egg-info/top_level.txt >> >> writing dependency_links to pyodbc.egg-info/dependency_links.txt >> >> reading manifest file 'pyodbc.egg-info/SOURCES.txt' >> >> reading manifest template 'MANIFEST.in' >> >> warning: no files found matching 'tests/*' >> >> writing manifest file 'pyodbc.egg-info/SOURCES.txt' >> >> installing library code to build/bdist.linux-x86_64/egg >> >> running install_lib >> >> running build_ext >> >> building 'pyodbc' extension >> >> gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall >> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector >> --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv >> -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions >> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic >> -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPYODBC_VERSION=3.0.7 >> -I/usr/include/python2.6 -c /home/rbrook/pyodbc-3.0.7/src/pyodbcmodule.cpp >> -o build/temp.linux-x86_64-2.6/home/rbrook/pyodbc-3.0.7/src/pyodbcmodule.o >> -Wno-write-strings >> >> In file included from /home/rbrook/pyodbc-3.0.7/src/pyodbcmodule.cpp:12: >> >> /home/rbrook/pyodbc-3.0.7/src/pyodbc.h:41:20: error: Python.h: No such >> file or directory >> >> /home/rbrook/pyodbc-3.0.7/src/pyodbc.h:42:25: error: floatobject.h: No >> such file or directory >> >> /home/rbrook/pyodbc-3.0.7/src/pyodbc.h:43:24: error: longobject.h: No >> such file or directory >> >> * >> >> >> -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/47e63372-fc69-4d3f-9753-5b12a5a69a9f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Successful project on windows does not render assets on mac
I am copying the code from one development machine(windows) to another (mac) and can see in the command window that *404* are being displayed as the status codes. The rendered template has very little successful formatting Any thoughts why this is happening on mac. Also, this development will ultimately be moving to linux. I want to make sure this does not happen in production. Thanks [01/Nov/2014 17:39:24] "GET /waitlist/ HTTP/1.1" 200 12144 [01/Nov/2014 17:39:24] "GET /media/spinner.gif HTTP/1.1" 200 136 [01/Nov/2014 17:39:24] "GET /static/css/bootstrap.min.css HTTP/1.1" 404 1667 [01/Nov/2014 17:39:24] "GET /static/templates/starter-template.css HTTP/1.1" 404 1694 [01/Nov/2014 17:39:24] "GET /static/assets/js/ie-emulation-modes-warning.js HTTP/1.1" 404 1721 [01/Nov/2014 17:39:24] "GET /static/js/bootstrap.min.js HTTP/1.1" 404 1661 [01/Nov/2014 17:39:24] "GET /static/assets/js/ie10-viewport-bug-workaround.js HTTP/1.1" 404 1727 [01/Nov/2014 17:39:24] "GET /static/assets/js/ajax_get.js HTTP/1.1" 404 1667 [01/Nov/2014 17:39:24] "GET /media/spinner.gif HTTP/1.1" 200 136 [01/Nov/2014 17:39:24] "GET /static/js/bootstrap.min.js HTTP/1.1" 404 1661 [01/Nov/2014 17:39:24] "GET /static/assets/js/ie10-viewport-bug-workaround.js HTTP/1.1" 404 1727 [01/Nov/2014 17:39:24] "GET /static/assets/js/ajax_get.js HTTP/1.1" 404 1667 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3c48c702-26bb-49e4-b3e3-d1f4cadfa302%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Successful project on windows does not render assets on mac
Thanks for the clue. 99% of the paths in the settings file were variables, there was one the had a windows slash in the variable path. Once I turned that around I was all set. Thanks On Saturday, November 1, 2014 6:48:45 PM UTC-4, Aliane Abdelouahab wrote: > > it seems that python finds media directory, but not the static one, so > just use print and the variable of your static folder and look at the > console where python is seeing the static folder. > > Le samedi 1 novembre 2014 23:44:21 UTC+1, robert brook a écrit : >> >> I am copying the code from one development machine(windows) to another >> (mac) and can see in the command window that *404* are being displayed >> as the status codes. >> The rendered template has very little successful formatting >> >> Any thoughts why this is happening on mac. >> >> Also, this development will ultimately be moving to linux. >> I want to make sure this does not happen in production. >> >> Thanks >> >> >> >> [01/Nov/2014 17:39:24] "GET /waitlist/ HTTP/1.1" 200 12144 >> [01/Nov/2014 17:39:24] "GET /media/spinner.gif HTTP/1.1" 200 136 >> [01/Nov/2014 17:39:24] "GET /static/css/bootstrap.min.css HTTP/1.1" 404 >> 1667 >> [01/Nov/2014 17:39:24] "GET /static/templates/starter-template.css >> HTTP/1.1" 404 1694 >> [01/Nov/2014 17:39:24] "GET >> /static/assets/js/ie-emulation-modes-warning.js HTTP/1.1" 404 1721 >> [01/Nov/2014 17:39:24] "GET /static/js/bootstrap.min.js HTTP/1.1" 404 1661 >> [01/Nov/2014 17:39:24] "GET >> /static/assets/js/ie10-viewport-bug-workaround.js HTTP/1.1" 404 1727 >> [01/Nov/2014 17:39:24] "GET /static/assets/js/ajax_get.js HTTP/1.1" 404 >> 1667 >> [01/Nov/2014 17:39:24] "GET /media/spinner.gif HTTP/1.1" 200 136 >> [01/Nov/2014 17:39:24] "GET /static/js/bootstrap.min.js HTTP/1.1" 404 1661 >> [01/Nov/2014 17:39:24] "GET >> /static/assets/js/ie10-viewport-bug-workaround.js HTTP/1.1" 404 1727 >> [01/Nov/2014 17:39:24] "GET /static/assets/js/ajax_get.js HTTP/1.1" 404 >> 1667 >> >> >> -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ac2551da-d7c0-4e6e-9174-e2f89f590bab%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Multiple versions of python on linux server
This is the first time that I am having apache configured to run django I plan on using mod_wsgi on apache and linux using 2 servers, the apache server and the application server. The linux (red hat 6) / django server had python 2.6 installed for admin purposes out of the box.. Go figure, 2.6 has to be 10 years old. When you type in python, the 2.6 version runs. We added python 3.3 to install all of the packages to run the application. I am able to launch the local dev server with python 3.3 after running a script to initiate python 3.3 I will have apache point to the wsgi.py file for the django application. But how will apache know to implement python3.3 If I am missing something let me know, I am new at this production implementation. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2304dc16-31da-4fcd-bec5-d8e807b4b4d2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Multiple versions of python on linux server
Thanks I think this is the correct track. I do not have the luxury to create a virtual environment because of the constraints of this organization. But I see from the documentation link that you sent me that I can define something along these lines "Once the baseline Python environment has been created, the WSGIPythonHome directive should be defined within the global part of the main Apache configuration files. WSGIPythonHome /usr/local/pythonenv/BASELINE " Where do I place this directive in Apache and can you give me an example of the anything else that would be in this directive? Thanks On Monday, November 3, 2014 10:57:47 AM UTC-5, Andréas Kühne wrote: > > 2014-11-03 16:46 GMT+01:00 robert brook >: > >> This is the first time that I am having apache configured to run django >> >> I plan on using mod_wsgi on apache and linux using 2 servers, the apache >> server and the application server. >> >> The linux (red hat 6) / django server had python 2.6 installed for admin >> purposes out of the box.. >> Go figure, 2.6 has to be 10 years old. >> >> When you type in python, the 2.6 version runs. >> >> We added python 3.3 to install all of the packages to run the application. >> >> I am able to launch the local dev server with python 3.3 after running a >> script to initiate python 3.3 >> >> I will have apache point to the wsgi.py file for the django application. >> But how will apache know to implement python3.3 >> >> If I am missing something let me know, I am new at this production >> implementation. >> >> Thanks >> >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users...@googlegroups.com . >> To post to this group, send email to django...@googlegroups.com >> . >> Visit this group at http://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/2304dc16-31da-4fcd-bec5-d8e807b4b4d2%40googlegroups.com >> >> <https://groups.google.com/d/msgid/django-users/2304dc16-31da-4fcd-bec5-d8e807b4b4d2%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > Hi Robert, > > You should look into virtual environments. That way you can get a python > 2.6, 2.7, 3.3 or 3.4 environment running without any problems. Check out: > http://docs.python-guide.org/en/latest/dev/virtualenvs/. > > When you have a working environment, you just have to activate it before > you start the mod_wsgi instance, check: > https://code.google.com/p/modwsgi/wiki/VirtualEnvironments > > Regards, > > Andréas > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/673d7b0a-ac60-43aa-9ec0-a72acb4b2463%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Multiple versions of python on linux server
I understand the difference between a virtual machine and a virtual environment (of which I can have 0 - many environments on one virtual machine). Since I do not have conflicts in packages and am only using python 33 for the django packages, the 2 environments act as if they were 2 virtual machines. Can I simply point the wsgi directive at the appropriate python executable/ site packages? And can you direct me at the contents of the apache script and the steps to make the web application run as expected? Any assistance that you can provide me on the details of how to tie this all together would be much appreciated. Thanks On Monday, November 3, 2014 11:21:50 AM UTC-5, Tim Chase wrote: > > On 2014-11-03 08:07, robert brook wrote: > > I do not have the luxury to create a virtual environment because of > > the constraints of this organization. > > Just making sure that you're aware of the difference between a > virtual environment and a virtual machine. > > A virtual machine is a full abstraction of the hardware and it's > entirely likely that your IT department would impose constraints on > their creation & management. > > A virtual *environment* is just a local directory created & populated > with the standard Python "virtualenv" utility, and the setting of a > few environmental variables (done in the WSGI configuration). It > seems odd that an IT department would be so fascist as to limit the > creation & population of a folder on an existing machine. > > -tkc > > > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f096e862-2a49-471e-810a-59cfaa492406%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Multiple site package directories for Python and question about apache configuration
I am building the web application on a linux red hat machine. I was trying to pull the path for the site packages for the 3 modules that I have installed so that I can specify the path in the apache config file Can I specify 2 paths in Apache? Thanks >>> import django >>> print (django.__path__) ['*/opt/rh/python33/root/usr/lib/python3.3/site-packages/* Django-1.7-py3.3.egg/django'] >>> import sql_server.pyodbc >>> print (sql_server.pyodbc.__path__) ['/opt/rh/python33/root/usr/*lib* /python3.3/site-packages/django_pyodbc_azure-1.2.0-py3.3.egg/sql_server/pyodbc'] >>> import sqlalchemy >>> print (sqlalchemy.__path__) ['/opt/rh/python33/root/usr/*lib64* /python3.3/site-packages/SQLAlchemy-0.9.7-py3.3-linux-x86_64.egg/sqlalchemy'] >>> -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/52f06d85-5ebf-468f-8807-390475e08ea5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Multiple site package directories for Python and question about apache configuration
I overlooked mentioning that the path command returned 2 different locations for the 3 modules. Not sure why one package got installed in the lib64 path. They were all installed with the setup.py install command. On Monday, November 3, 2014 3:18:06 PM UTC-5, robert brook wrote: > > I am building the web application on a linux red hat machine. > > I was trying to pull the path for the site packages for the 3 modules that > I have installed so that I can specify the path in the apache config file > > Can I specify 2 paths in Apache? > > Thanks > > > > >>> import django > > >>> print (django.__path__) > > ['*/opt/rh/python33/root/usr/lib/python3.3/site-packages/* > Django-1.7-py3.3.egg/django'] > > >>> import sql_server.pyodbc > > >>> print (sql_server.pyodbc.__path__) > > ['/opt/rh/python33/root/usr/*lib* > /python3.3/site-packages/django_pyodbc_azure-1.2.0-py3.3.egg/sql_server/pyodbc'] > > > > >>> import sqlalchemy > > >>> print (sqlalchemy.__path__) > > ['/opt/rh/python33/root/usr/*lib64* > /python3.3/site-packages/SQLAlchemy-0.9.7-py3.3-linux-x86_64.egg/sqlalchemy'] > > >>> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0ac402e8-285b-46b7-aa7c-07846257e6c3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Multiple site package directories for Python and question about apache configuration
I see that there are 2 paths in my application for site packages. How do I configure Apache to use the 2 packages. A typical entry in Apache is WSGIPythonPath /path/to/mysite.com:/path/to/your/venv/lib/python3.X/site-packages Can I specify 2 paths to represent the 2 locations of site packages. And what would the syntax be? On Monday, November 3, 2014 4:15:59 PM UTC-5, Aliane Abdelouahab wrote: > > On linux, python installs libs in diffferents places: for example in open > suse, when you install it the first time, and you choose python and some > third party libraries, and then when you will do setup.py for a library you > download, they will be in different locations! > http://stackoverflow.com/a/12950101/861487 > > Le lundi 3 novembre 2014 21:24:17 UTC+1, robert brook a écrit : >> >> I overlooked mentioning that the path command returned 2 different >> locations for the 3 modules. >> Not sure why one package got installed in the lib64 path. They were all >> installed with the setup.py install command. >> >> On Monday, November 3, 2014 3:18:06 PM UTC-5, robert brook wrote: >>> >>> I am building the web application on a linux red hat machine. >>> >>> I was trying to pull the path for the site packages for the 3 modules >>> that I have installed so that I can specify the path in the apache config >>> file >>> >>> Can I specify 2 paths in Apache? >>> >>> Thanks >>> >>> >>> >>> >>> import django >>> >>> >>> print (django.__path__) >>> >>> ['*/opt/rh/python33/root/usr/lib/python3.3/site-packages/* >>> Django-1.7-py3.3.egg/django'] >>> >>> >>> import sql_server.pyodbc >>> >>> >>> print (sql_server.pyodbc.__path__) >>> >>> ['/opt/rh/python33/root/usr/*lib* >>> /python3.3/site-packages/django_pyodbc_azure-1.2.0-py3.3.egg/sql_server/pyodbc'] >>> >>> >>> >>> >>> import sqlalchemy >>> >>> >>> print (sqlalchemy.__path__) >>> >>> ['/opt/rh/python33/root/usr/*lib64* >>> /python3.3/site-packages/SQLAlchemy-0.9.7-py3.3-linux-x86_64.egg/sqlalchemy'] >>> >>> >>> >>> >> -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ca460d30-a2be-4133-a69a-248e7e38739e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.