Title
stringlengths
11
150
A_Id
int64
518
72.5M
Users Score
int64
-42
283
Q_Score
int64
0
1.39k
ViewCount
int64
17
1.71M
Database and SQL
int64
0
1
Tags
stringlengths
6
105
Answer
stringlengths
14
4.78k
GUI and Desktop Applications
int64
0
1
System Administration and DevOps
int64
0
1
Networking and APIs
int64
0
1
Other
int64
0
1
CreationDate
stringlengths
23
23
AnswerCount
int64
1
55
Score
float64
-1
1.2
is_accepted
bool
2 classes
Q_Id
int64
469
42.4M
Python Basics and Environment
int64
0
1
Data Science and Machine Learning
int64
0
1
Web Development
int64
1
1
Available Count
int64
1
15
Question
stringlengths
17
21k
Returning the outputs from a CloudFormation template with Boto?
14,165,269
7
6
3,837
0
python,amazon-web-services,boto,amazon-cloudformation
If you do a describe_stacks call, it will return a list of Stack objects and each of those will have an outputs attribute which is a list of Output objects. Is that what you are looking for?
0
0
0
0
2013-01-04T18:53:00.000
1
1.2
true
14,163,114
0
0
1
1
I'm trying to retrieve the list of outputs from a CloudFormation template using Boto. I see in the docs there's an object named boto.cloudformation.stack.Output. But I think this is unimplemented functionality. Is this currently possible?
Random test failures when code pushed to Jenkins
14,205,396
1
2
1,467
0
python,django,jenkins,django-testing,django-jenkins
This is a really tough question to answer. It is possible there are some common pitfalls django developers falls into, but those I do not know. Outside of that, this is just normal debugging: Find a way to reproduce the failure. If you can make the test fail on your own laptop, great. If you cannot, you have to debug...
0
0
0
0
2013-01-04T21:51:00.000
2
0.099668
false
14,165,573
0
0
1
1
I have asked this one earlier too but am not satisfied with the answer. What I use: Working on Django/python website. Development done on python virtual envs locally. using GIT as my SCM have separate virtual servers deployed for Developer and Production branches for GIT Using Jenkins CI for continuous Integration. Se...
Explain search (Sphinx/Haystack) in simple context?
14,166,303
1
0
135
0
python,django,search,nosql,full-text-search
Firstly, Haystack isn't a search engine, it's a library that provides a Django API to existing search engines like Solr and Whoosh. That said, your example isn't really a very good one. You wouldn't use a separate search engine to search by ISBN, because your database would already have an index on the Book table which...
0
0
0
0
2013-01-04T22:39:00.000
1
1.2
true
14,166,161
0
0
1
1
Could you explain how search engines like Sphinx, Haystack, etc fit in to a web framework. If you could explain in a way that someone new to web development could understand that would help. One example use case I made up for this question is a book search feature. Lets say I have a noSQL database that contains book ob...
Gunicorn logging from multiple workers
14,305,123
1
8
3,257
0
python,flask,gunicorn
We ended up changing our application to send logs to stdout and now rely on supervisord to aggregate the logs and write them to a file. We also considered sending logs directly to rsyslog but for now this is working well for us.
0
1
0
0
2013-01-05T14:00:00.000
2
0.099668
false
14,172,470
0
0
1
1
I have a flask app that runs in multiple gunicorn sync processes on a server and uses TimedRotatingFileHandler to log to a file from within the flask application in each worker. In retrospect this seems unsafe. Is there a standard way to accomplish this in python (at high volume) without writing my own socket based log...
Get publicly accessible contents of S3 bucket without AWS credentials
70,791,596
0
3
1,214
0
python-3.x,amazon-web-services,amazon-s3
Using AWS CLI, aws s3 ls s3://*bucketname* --region *bucket-region* --no-sign-request
0
0
1
0
2013-01-05T23:11:00.000
2
0
false
14,177,436
0
0
1
2
Given a bucket with publicly accessible contents, how can I get a listing of all those publicly accessible contents? I know boto can do this, but boto requires AWS credentials. Also, boto doesn't work in Python3, which is what I'm working with.
Get publicly accessible contents of S3 bucket without AWS credentials
14,199,730
4
3
1,214
0
python-3.x,amazon-web-services,amazon-s3
If the bucket's permissions allow Everyone to list it, you can just do a simple HTTP GET request to http://s3.amazonaws.com/bucketname with no credentials. The response will be XML with everything in it, whether those objects are accessible by Everyone or not. I don't know if boto has an option to make this request wit...
0
0
1
0
2013-01-05T23:11:00.000
2
0.379949
false
14,177,436
0
0
1
2
Given a bucket with publicly accessible contents, how can I get a listing of all those publicly accessible contents? I know boto can do this, but boto requires AWS credentials. Also, boto doesn't work in Python3, which is what I'm working with.
What are the other alternatives to using django-kombu?
14,181,856
2
3
590
0
python,django,celery
The stable version of kombu is production ready, same for celery. kombu takes care of the whole messaging between consumers, producers and the message broker which in order are the celery workers, webworkers (or more in general scripts that put tasks in the queue) and the message broker you are using. You need kombu to...
0
1
0
0
2013-01-06T09:44:00.000
1
0.379949
false
14,180,944
0
0
1
1
I am using Django-kombu with Celery but have read at a quite few places that it isn't production ready. Basically, I want to create a multiple master - multiple slaves architecture using Celery and pass messages in between them and and back to the main program that did the call. I am not able to understand where does...
python project setting for production and developement
14,191,085
1
0
150
0
python,django
What we usually do in our Django projects is create versions of all configuration files for each platform (dev, prod, etc...) and use symlinks to select the correct one. Now that Windows supports links properly, this solution fits everybody. If you insist on another configuration file, try making it a Python file that ...
0
0
0
0
2013-01-07T06:34:00.000
1
1.2
true
14,191,034
0
0
1
1
I'm building project with Django, I can make two setting files for Django: production_setting.py and development_setting.py, however, I need some configure file for my project and I'm using ConfigParser to parse that files. e.g. [Section] name = "development" version = "1.0" how to split this configure file to produc...
Outlining a Solution Stack
14,192,830
1
2
98
0
python,ruby-on-rails,ruby,node.js,webserver
It all depends on what you are actually trying to do and what your requirements are. There is no real "right" language for things like these, it's mostly determined by the Frameworks you'll be using on those language (since all are general-purpose programming languages) and your personal preference/experience. I can't ...
0
0
0
0
2013-01-07T07:08:00.000
2
1.2
true
14,191,410
0
0
1
1
please excuse my ignorance as I'm an Aerospace Engineer going headfirst into the software world. I'm building a web solution that allows small computers (think beagleboard) to connect to a server that sends and receives data to these clients. The connection will be over many types including GPRS/3G/4G. The user will in...
Does a Flask Request Run to Completion before another Request Starts?
14,202,887
2
3
1,304
0
python,flask
I'm fairly certain that there is no guarantee of that. However, it depends on how you're running the application. If you're using Heroku+gunicorn for example, all files on Heroku that are changed during a request are not kept, i.e., the files are ephemeral. So if you were to change the text file, the changes would not ...
0
0
0
0
2013-01-07T19:38:00.000
2
0.197375
false
14,202,844
0
0
1
1
I ask because I'm wondering if I can get away with using a text file as a data store for a simple app. If each handler runs to completion, then it seems like I should be able to modify the text file during that request without worrying about conflicts, assuming I close the file at the end of each request. Is this feasi...
CSS won't work with Django powered site
14,210,824
0
0
126
0
python,css,django,web
Usually the easiest way to do this is adding a folder static in the root of the project. Then look for and make settings attributes STATICFILES_DIRS = ('static',) if you want you can make this absolute path(recommended by django) STATIC_URL = '/static/' Since you're using the dev-server this should be able to work. N...
0
0
0
0
2013-01-08T06:17:00.000
2
0
false
14,209,258
0
0
1
2
My CSS will not work when I run my site. Only the HTML displays. I have the right link. I'm confused as to what put in the MEDIA_ROOT, MEDIA_URL, STATIC_ROOT, and STATIC_URL. Every site tell me something different. I'm not using the (file) directory. I the above mentioned setting refer to where the files are placed and...
CSS won't work with Django powered site
14,209,324
0
0
126
0
python,css,django,web
Give the link of your CSS in STATIC_ROOT. In html Do: {{ STATIC_URL }}/css in link.
0
0
0
0
2013-01-08T06:17:00.000
2
0
false
14,209,258
0
0
1
2
My CSS will not work when I run my site. Only the HTML displays. I have the right link. I'm confused as to what put in the MEDIA_ROOT, MEDIA_URL, STATIC_ROOT, and STATIC_URL. Every site tell me something different. I'm not using the (file) directory. I the above mentioned setting refer to where the files are placed and...
Can I use open cv with python on Google app engine?
43,981,159
3
4
2,599
0
python,google-app-engine,opencv,python-2.7
Now it is possible. The app should be deployed using a custom runtime in the GAE flexible environment. OpenCV library can be installed by adding the instruction RUN apt-get update && apt-get install -y python-opencv in the Dockerfile.
0
1
0
0
2013-01-08T15:03:00.000
3
0.197375
false
14,217,858
0
0
1
1
HI actually I was working on a project which i intended to deploy on the google appengine. However I found that google app engine is supported by python. Can I run openCV with python scripts on Google app engine?
Celery 3.0.12 countdown not working
14,246,789
1
0
497
0
python,celery
This is a bug in celery 3.0.12, reverting to celery 3.0.11 did the job. Hope this helps someone
0
1
0
0
2013-01-08T23:30:00.000
1
0.197375
false
14,225,865
0
0
1
1
When I run my task: my_task.apply_async([283], countdown=5) It runs immediately when it should be running 5 seconds later as the ETA says [2013-01-08 15:15:21,600: INFO/MainProcess] Got task from broker: web.my_task[4635f997-6232-4722-9a99-d1b42ccd5ab6] eta:[2013-01-08 15:20:51.580994] [2013-01-08 15:15:22,095: INFO/Ma...
Pass Python scripts for mapreduce to HBase
14,675,698
-2
3
3,776
0
python,hadoop,mapreduce,hbase
You can very easily do map reduce programming with Python which would interact with thrift server. Hbase client in python would be a thrift client.
0
1
0
0
2013-01-09T16:27:00.000
2
-0.197375
false
14,241,729
0
0
1
1
We have a HBase implementation over Hadoop. As of now all our Map-Reduce jobs are written as Java classes. I am wondering if there is a good way to use Python scripts to pass to HBase for Map-Reduce.
OpenERP 6.1 web client - set default value (Configuration parameters)
14,257,259
0
0
762
0
python,openerp,erp
I find another solution. When I click on button Create for res.users in right side bar, in section Customize action Set Default appears. Here you can choose default value which appears when Create button was pressed. UPDATE: All these values you can see in Settings --> Customization --> Low Level Objects --> Actions ...
0
0
0
0
2013-01-10T08:59:00.000
2
0
false
14,254,053
0
0
1
2
I need to set up default Home Action for res.user. Currently is Home Page but I want set my custom action. So, I tried create new record for Settings --> Configuration --> Configuration Parameters , but when I set field for Home Action in field Field and set type Many2One in field Type, field Value remains empty list. ...
OpenERP 6.1 web client - set default value (Configuration parameters)
14,424,152
0
0
762
0
python,openerp,erp
just an additional note:you can also apply this user defined dafaults with many2many fields like taxes_id field in product model. however there is a small bug, if you set a default value for many2many fields when you create a new record, many2many field is shown empty, when you save the record you will see it is well r...
0
0
0
0
2013-01-10T08:59:00.000
2
0
false
14,254,053
0
0
1
2
I need to set up default Home Action for res.user. Currently is Home Page but I want set my custom action. So, I tried create new record for Settings --> Configuration --> Configuration Parameters , but when I set field for Home Action in field Field and set type Many2One in field Type, field Value remains empty list. ...
How can I upload images with text parameters using Flask
14,270,654
1
0
925
0
python,flask,http-post
Access them from request.data just like any other form data.
0
0
0
0
2013-01-10T14:43:00.000
1
1.2
true
14,260,447
0
0
1
1
I want to send a image together with some text parameters to a Flask server (HTTP POST). How can I use Flask to receive both (e.g. save an image and print the text)?
Sometimes getting "API requires authorization" from intuit anywhere api after a fresh oAuth handshake
27,932,175
0
2
377
0
python,intuit-partner-platform
I received this error as well and am posting this as pointer for other who stumble upon this. Error Code 22 (Authentication required) for me meant that the OAuth signature was wrong. This was confusing because I couldn't find this error listed in the Quickbooks documents for reconnect. I was signing the request as a "P...
0
0
1
0
2013-01-10T15:36:00.000
1
0
false
14,261,512
0
0
1
1
After completing the oAuth handshake with Intuit Anywhere (AI), I use the API to get the HTML for the blue dot menu. Sometimes, the expected HTML is returned. Other times, I get this message This API requires Authorization. 22 2013-01-10T15:32:33.43741Z Typically, this message is returned when the oAuth token is exp...
Huge Django project
14,273,720
-1
3
228
0
python,django
If you use FireFox you can install FireBug on it and when you for example submit ajax form you can see at which url send you request after what you can easily find controller which work with this form data. At chrome this utility embedded by default and call by F12 key.
0
0
0
0
2013-01-11T07:29:00.000
5
-0.039979
false
14,273,593
0
0
1
3
I have a new job and a huge django project (15 apps, more than 30 loc). It's pretty hard to understand it's architecture from scratch. Are there any techniques to simplify my work in the beginning? sometimes it's even hard to understand where to find a form or a view that I need... thnx in advance.
Huge Django project
14,273,986
4
3
228
0
python,django
When I come to this kind of problem I open up a notebook and answer the following: 1. Infrastructure Server configuration, OS etc Check out the database type (mysql, postgres, nosql) External APIS (e.g Facebook Connect) 2. Backend Write a simple description Write its input/output from user (try to be thorough; which...
0
0
0
0
2013-01-11T07:29:00.000
5
1.2
true
14,273,593
0
0
1
3
I have a new job and a huge django project (15 apps, more than 30 loc). It's pretty hard to understand it's architecture from scratch. Are there any techniques to simplify my work in the beginning? sometimes it's even hard to understand where to find a form or a view that I need... thnx in advance.
Huge Django project
14,274,066
2
3
228
0
python,django
1) Try to install the site from scratch. You will find what external apps are needed for the site to run. 2) Reverse engineer. Browse through the site and try to find out what you have to do to change something to that page. Start with the url, look up in urls.py, read the view, check the model. Are there any hints to ...
0
0
0
0
2013-01-11T07:29:00.000
5
0.07983
false
14,273,593
0
0
1
3
I have a new job and a huge django project (15 apps, more than 30 loc). It's pretty hard to understand it's architecture from scratch. Are there any techniques to simplify my work in the beginning? sometimes it's even hard to understand where to find a form or a view that I need... thnx in advance.
How to make a WSGI app configurable by any server?
14,285,052
0
0
253
0
python,wsgi
in uWSGI (if using the uwsgi protocol) you can pass additional variables with uwsgi_param key value in nginx, SetEnv in apache (both mod_uwsgi and mod_proxy_uwsgi), cgi vars with Cherokee and --http-var with the uwsgi http router. For the http protocol (in gunicorn or uWSGI http-socket) the only solution popping in my...
0
0
0
0
2013-01-11T11:24:00.000
2
0
false
14,277,172
0
0
1
1
Is there a way to distribute a WSGI application that will work out of the box with any server and that will be configurable using the server's built-in features only? This means that the only configuration file the administrator would have to touch would be the server's configuration file. It wouldn't be necessary to w...
Which setup is more efficient? Flask with pypy, or Flask with gevent?
14,294,862
1
25
15,866
0
python,performance,gevent,pypy
Builtin flask server is a BaseHTTPServer or so, never use. The best scenario is very likely tornado + pypy or something like that. Benchmark before using though. It also depends quite drastically on what you're doing. The web server + web framework benchmarks are typically hello world kind of benchmarks. Is your applic...
0
0
0
1
2013-01-12T15:10:00.000
3
0.066568
false
14,294,643
0
0
1
1
Both 'pypy' and 'gevent' are supposed to provide high performance. Pypy is supposedly faster than CPython, while gevent is based on co-routines and greenlets, which supposedly makes for a faster web server. However, they're not compatible with each other. I'm wondering which setup is more efficient (in terms of speed/p...
Django-nonrel broke after installing new version of Google App Engine SDK
14,368,275
1
0
191
1
python,google-app-engine,django-nonrel
Did you update djangoappengine without updating django-nonrel and djangotoolbox? While I haven't upgraded to GAE 1.7.4 yet, I'm running 1.7.2 with no problems. I suspect your problem is not related to the GAE SDK but rather your django-nonrel installation has mismatching pieces.
0
1
0
0
2013-01-13T20:03:00.000
2
0.099668
false
14,307,581
0
0
1
2
I had GAE 1.4 installed in my local UBUNTU system and everything was working fine. Only warning I was getting at that time was something like "You are using old GAE SDK 1.4." So, to get rid of that I have done following things: I removed old version of GAE and installed GAE 1.7. Along with that I have also changed my ...
Django-nonrel broke after installing new version of Google App Engine SDK
14,382,654
0
0
191
1
python,google-app-engine,django-nonrel
Actually I changed the google app engine path in /.bashrc file and restarted the system. It solved the issue. I think since I was not restarting the system after .bashrc changes, hence it was creating problem.
0
1
0
0
2013-01-13T20:03:00.000
2
1.2
true
14,307,581
0
0
1
2
I had GAE 1.4 installed in my local UBUNTU system and everything was working fine. Only warning I was getting at that time was something like "You are using old GAE SDK 1.4." So, to get rid of that I have done following things: I removed old version of GAE and installed GAE 1.7. Along with that I have also changed my ...
Count vs len on a Django QuerySet
14,327,315
29
113
92,515
0
python,django,performance
I think using len(qs) makes more sense here as you need to iterate over the results. qs.count() is a better option if all that you want to do it print the count and not iterate over the results. len(qs) will hit the database with select * from table whereas qs.count() will hit the db with select count(*) from table. al...
0
0
0
0
2013-01-14T21:29:00.000
5
1
false
14,327,036
0
0
1
1
In Django, given that I have a QuerySet that I am going to iterate over and print the results of, what is the best option for counting the objects? len(qs) or qs.count()? (Also given that counting the objects in the same iteration is not an option.)
sub domains in tornado web app for SAAS
14,342,790
0
2
791
0
python,webserver,subdomain,tornado,saas
Tornado itself does not handle subdomains. You will need to something like NGNIX to control subdomain access.
0
1
0
0
2013-01-15T09:03:00.000
2
0
false
14,334,222
0
0
1
2
I have a web app which runs at www.mywebsite.com. I am asking user to register and enter a subdomain name for their login. e.g. if user enters subdomain as "demo", then his login url should be "www.demo.mywebsite.com". How this can be done in tornado web app, as tornado itself is a web server. Or serving the app with n...
sub domains in tornado web app for SAAS
14,419,302
3
2
791
0
python,webserver,subdomain,tornado,saas
self.request.host under tornado.web.RequestHandler will contain subdomain so you can change application logic according to subdomain eg. load current_user based on cookie + subdomain.
0
1
0
0
2013-01-15T09:03:00.000
2
0.291313
false
14,334,222
0
0
1
2
I have a web app which runs at www.mywebsite.com. I am asking user to register and enter a subdomain name for their login. e.g. if user enters subdomain as "demo", then his login url should be "www.demo.mywebsite.com". How this can be done in tornado web app, as tornado itself is a web server. Or serving the app with n...
Change CharField value after init
14,334,871
0
0
232
0
python,django,django-forms,django-widget
This seems overly complicated. Apart from anything else, tying up an entire process waiting for someone to fill in a form is a bad idea. Although I can't really understand exactly what you want to do, it seems likely that there are better solutions. Here's a few possibilities: Page A redirects to Page B before initial...
0
0
0
0
2013-01-15T09:31:00.000
1
0
false
14,334,667
0
0
1
1
I have a page "A" with some CharField to fill programmatically. The value to fill come from another page "B", opened by javascript code executed only when the page is showed (after the init). This is the situation: page A __init__ during the init, start a thread listening on the port 8080 page A initialized and showed...
Restrict so users only view a certain part of website-Django
14,335,895
1
1
1,610
0
python,django,user-interface,django-views
This is a very wide-ranging question. One solution would be to store a trial flag on each user. On an authenticated request, check for User.trial in your controller (and probably view) and selectively allow/deny access to the endpoint or selectively render parts of the page. If you wish to use built-in capabilities of ...
0
0
0
0
2013-01-15T10:34:00.000
3
0.066568
false
14,335,832
0
0
1
1
I am using Django, and require certain 'trial' users only to activate a certain part of the website-any ideas on an efficient way to do this? I was thinking about giving a paying customer a certain ID and linking this to the URL of the sites for permission. Thanks, Tom
Best strategy for storing precomputed sunrise/sunset data?
14,365,980
0
1
537
1
python,google-app-engine,python-2.7
I would say precompute those structures and output them into hardcoded python structures that you save in a generated python file. Just read those structures into memory as part of your instance startup. From your description, there's no reason to compute these values at runtime, and there's no reason to store it in th...
0
1
0
0
2013-01-15T17:59:00.000
3
0
false
14,343,871
0
0
1
2
I'm working on an NDB based Google App Engine application that needs to keep track of the day/night cycle of a large number (~2000) fixed locations. Because the latitude and longitude don't ever change, I can precompute them ahead of time using something like PyEphem. I'm using NDB. As I see it, the possible strateg...
Best strategy for storing precomputed sunrise/sunset data?
14,345,283
1
1
537
1
python,google-app-engine,python-2.7
For 2000 immutable data points - just calculate them when instance starts or on first use, then keep it in memory. This will be the cheapest and fastest.
0
1
0
0
2013-01-15T17:59:00.000
3
0.066568
false
14,343,871
0
0
1
2
I'm working on an NDB based Google App Engine application that needs to keep track of the day/night cycle of a large number (~2000) fixed locations. Because the latitude and longitude don't ever change, I can precompute them ahead of time using something like PyEphem. I'm using NDB. As I see it, the possible strateg...
add data to table periodically in mysql
27,122,957
0
1
214
1
python,mysql,django
Used django-celery package and created job in it to update the data periodically
0
0
0
0
2013-01-15T18:33:00.000
2
0
false
14,344,473
0
0
1
2
I have income table which contain recurrence field. Now if user select recurrence_type as "Monthly" or "Daily" then I have to add row into income table "daily" or "monthly" . Is there any way in Mysql which will add data periodically into table ? I am using Django Framework for developing web application.
add data to table periodically in mysql
14,344,610
1
1
214
1
python,mysql,django
As I know there is no such function in MySQL. Even if MySQL could do it, this should not be its job. Such functions should be part of the business logic in your application. The normal way is to setup the cron job in server. The cron job will wake up at the time you set, and then call your python script or SQL to fulfi...
0
0
0
0
2013-01-15T18:33:00.000
2
1.2
true
14,344,473
0
0
1
2
I have income table which contain recurrence field. Now if user select recurrence_type as "Monthly" or "Daily" then I have to add row into income table "daily" or "monthly" . Is there any way in Mysql which will add data periodically into table ? I am using Django Framework for developing web application.
How to implement a 'Vote up' System for posts in my blog?
14,347,324
1
4
1,105
1
python,mysql,google-app-engine,jinja2
If voting is only for subscribed users, then enable voting after members log in to your site. If not, then you can track users' IP addresses so one IP address can vote once for a single article in a day. By the way, what kind of security do you need?
0
0
0
0
2013-01-15T21:27:00.000
2
0.099668
false
14,347,244
0
0
1
2
I have written a simple blog using Python in google app engine. I want to implement a voting system for each of my posts. My posts are stored in a SQL database and I have a column for no of votes received. Can somebody help me set up voting buttons for individual posts? I am using Jinja2 as the templating engine. How ...
How to implement a 'Vote up' System for posts in my blog?
14,349,144
4
4
1,105
1
python,mysql,google-app-engine,jinja2
First, keep in mind that there is no such thing as "secure", just "secure enough for X". There's always a tradeoff—more secure means more annoying for your legitimate users and more expensive for you. Getting past these generalities, think about your specific case. There is nothing that has a 1-to-1 relationship with u...
0
0
0
0
2013-01-15T21:27:00.000
2
1.2
true
14,347,244
0
0
1
2
I have written a simple blog using Python in google app engine. I want to implement a voting system for each of my posts. My posts are stored in a SQL database and I have a column for no of votes received. Can somebody help me set up voting buttons for individual posts? I am using Jinja2 as the templating engine. How ...
How can I run Bitnami OSQA with other web service (wordpress, joomla)?
14,351,798
0
0
133
0
php,python,bitnami,osqa
You can install BitNami modules for each one those stacks, just go to the stack download page, select the module for your platform, execute it in the command line and point to the existing installation. Then you will need to configure httpd.conf to point each domain to each app.
0
0
0
1
2013-01-16T02:45:00.000
1
0
false
14,350,605
0
0
1
1
I installed OSQA Bitnami on my VPS. And I also point 3 domains to this VPS. Now I want each domain point to different web service (I have another PHP website I want to host here). How can I run php service along with OSQA Bitnami (it's python stack)?
Saving models in django
14,354,584
0
1
62
0
python,django,django-models,multiple-sites
I would caution against writing the same thing twice. Some thing will definitely go wrong, and you will have two nonmatching db's. Why don't you make the site_id-product relationship M2M, so that you can have more than one site_id's?
0
0
0
0
2013-01-16T05:24:00.000
1
1.2
true
14,351,879
0
0
1
1
I am working on a multisite project and i am using mezzanine+cartridge for this. I want to use same inventory for both sites. But there are some issues with this: there is a field site_id in the product table which stores the ID of the current site. Thus, I cannot reuse product over sites. Is there any way (like with t...
Adding external Ids to Partners in OpenERP withouth a new module
14,356,856
0
6
4,853
1
python,xml-rpc,openerp
Add an integer field in res partner table for storing external id on both database. When data is retrived from the external server and adding to your openerp database, store the external id in the record of res partner in local server and also save the id of the newly created partner record in the external server's par...
0
0
0
0
2013-01-16T10:27:00.000
3
0
false
14,356,218
0
0
1
1
My Question is a bit complex and iam new to OpenERP. I have an external database and an OpenERP. the external one isn't PostgreSQL. MY job is that I need to synchronize the partners in the two databases. External one being the more important. This means that if the external one's data change so does the OpenERp's, bu...
How to approach updating an database-driven application after release?
14,364,804
2
1
120
1
python,database,migration,sqlalchemy
Some thoughts for managing databases for a production application: Make backups nightly. This is crucial because if you try to do an update (to the data or the schema), and you mess up, you'll need to be able to revert to something more stable. Create environments. You should have something like a local copy of the da...
0
0
0
0
2013-01-16T17:29:00.000
2
1.2
true
14,364,214
0
0
1
1
I'm working on a web-app that's very heavily database driven. I'm nearing the initial release and so I've locked down the features for this version, but there are going to be lots of other features implemented after release. These features will inevitably require some modification to the database models, so I'm concern...
Differentiating between debug and production environments in WSGI app
14,367,674
2
5
213
0
python,web-applications,wsgi,dev-to-production
If your setup allows it, consider using environment variables. Your production servers could have one value for an environment variable while dev servers have another. Then on execution of your application you can detect the value of the environment variable and set "debug" accordingly.
0
0
0
0
2013-01-16T20:30:00.000
2
1.2
true
14,367,237
0
0
1
2
We need to load different configuration options in our Python WSGI application, according to production or debugging environments (particularly, some server configuration information relating to the task server to which the application needs to post jobs). The way we have implemented it so far is to have a global debu...
Differentiating between debug and production environments in WSGI app
14,589,970
1
5
213
0
python,web-applications,wsgi,dev-to-production
I don't like using environment variables. Try to make it working with your application configuration, which can be overwrite by: importing non versioned files (in dev environment), wrapped by try-except with proper log notification. command line arguments (argparse from standard library)
0
0
0
0
2013-01-16T20:30:00.000
2
0.099668
false
14,367,237
0
0
1
2
We need to load different configuration options in our Python WSGI application, according to production or debugging environments (particularly, some server configuration information relating to the task server to which the application needs to post jobs). The way we have implemented it so far is to have a global debu...
Django: How to query objects immediately after they have been saved from a separate view?
14,367,745
0
0
100
0
python,django,django-models,django-forms,django-views
What other fields are there in the model db? You could add an upload_id, which is set automatically after uploading, send it to the next view, and query for that in the db.
0
0
0
0
2013-01-16T20:55:00.000
2
0
false
14,367,670
0
0
1
1
Suppose I want to query and display all the images that the user just uploaded through a form on the previous page (multiple images are uploaded at once, each is made into a separate object in the db). What's the best way to do this? Since the view for uploading the images is different from the view for displaying the ...
Custom Django Database Frontend
14,371,043
1
3
2,045
1
python,database,django,frontend
Exporting the excel sheet in Django and have the them rendered as text fields , is not as easy as 2 step process. you need to know how Django works. First you need to export the data in mysql in database using either some language or some ready made tools. Then you need to make a Model for that table and then you can u...
0
0
0
0
2013-01-17T01:00:00.000
2
0.099668
false
14,370,576
0
0
1
1
I have been trying to get my head around Django over the last week or two. Its slowly starting to make some sense and I am really liking it. My goal is to replace a fairly messy excel spreadsheet with a database and frontend for my users. This would involve pulling the data out of a table, presenting it in a web tabul...
Google App Engine Instances keep quickly shutting down
14,377,741
4
8
2,656
0
python,google-app-engine,python-2.7
My solution to this was to increase the Pending Latency time. If a webpage fires 3 ajax requests at once, AppEngine was launching new instances for the additional requests. After configuring the Minimum Pending Latency time - setting it to 2.5 secs, the same instance was processing all three requests and throughput wa...
0
1
0
0
2013-01-17T03:47:00.000
3
1.2
true
14,371,920
0
0
1
3
So I've been using app engine for quite some time now with no issues. I'm aware that if the app hasn't been hit by a visitor for a while then the instance will shut down, and the first visitor to hit the site will have a few second delay while a new instance fires up. However, recently it seems that the instances only ...
Google App Engine Instances keep quickly shutting down
14,416,358
1
8
2,656
0
python,google-app-engine,python-2.7
1 idle instance means that app-engine will always fire up an extra instance for the next user that comes along - that's why you are seeing an extra instance fired up with that setting. If you remove the idle instance setting (or use the default) and just increase pending latency it should "wait" before firing the extr...
0
1
0
0
2013-01-17T03:47:00.000
3
0.066568
false
14,371,920
0
0
1
3
So I've been using app engine for quite some time now with no issues. I'm aware that if the app hasn't been hit by a visitor for a while then the instance will shut down, and the first visitor to hit the site will have a few second delay while a new instance fires up. However, recently it seems that the instances only ...
Google App Engine Instances keep quickly shutting down
14,742,365
0
8
2,656
0
python,google-app-engine,python-2.7
I only started having this type of issue on Monday February 4 around 10 pm EST, and is continuing until now. I first started noticing then that instances kept firing up and shutting down, and latency increased dramatically. It seemed that the instance scheduler was turning off idle instances too rapidly, and causing su...
0
1
0
0
2013-01-17T03:47:00.000
3
0
false
14,371,920
0
0
1
3
So I've been using app engine for quite some time now with no issues. I'm aware that if the app hasn't been hit by a visitor for a while then the instance will shut down, and the first visitor to hit the site will have a few second delay while a new instance fires up. However, recently it seems that the instances only ...
WSGI apps with python 2 and python 3 on the same server?
14,375,870
-1
5
1,947
0
python,apache,wsgi
Its quite possible. This is what virtualenv as all about. Set up the second app in a virtualenv , with python3 . You an add it in a virtualhost configuration in apache.
0
1
0
0
2013-01-17T09:09:00.000
2
-0.099668
false
14,375,520
0
0
1
1
I already have a web application in written in Python 2 that runs over WSGI (specifically, OpenERP web server). I would like to write a new web application that would run on the same server (Apache 2 on Ubuntu), but using WSGI and Python 3. The two applications would be on different ports. Is that possible?
Jinja2 substring integer
14,386,224
2
0
6,415
0
python,substring,jinja2
Or you can create a filter for phonenumbers like {{ phone_number|phone }}
0
0
0
0
2013-01-17T10:30:00.000
2
0.197375
false
14,377,002
0
0
1
1
I have a question and I tried to solve diff way with Jinja2. I have a number that is saved in database. When I print the original number is for ex: 907333-5000. I want that number to be printed in this format: (907) 333-5000 but I don't know exactly how to do with Jinja2. Thank you
Python 3 - SQL Result - where to store it
14,377,893
0
1
105
1
python,database,multithreading
This would be a good use for something like memcached.
0
0
0
0
2013-01-17T10:43:00.000
1
1.2
true
14,377,250
0
0
1
1
I'm wrinting a webapp in bottle. I have a small interface that lets user run sql statements. Sometimes it takes about 5 seconds until the user get's a result because the DB is quite big and old. What I want to do is the following: 1.Starte the query in a thread 2.Give the user a response right away and have ajax poll...
Python framework to create pure backend project
14,391,975
5
0
2,258
0
python,django,pylons,web-frameworks
Any of them will work. Arguably the most popular Python web frameworks these days are Django, Flask, and Pyramid.
0
0
0
0
2013-01-17T13:48:00.000
4
1.2
true
14,380,519
0
0
1
1
Some details about the project: pure backend project, no front expose a rest api (maybe custom routes?) connect to other rest apis query MySQL & MongoDB using an ORM have unit tests What Python framework would you recomend me for it?
Pydev: How to import a gae project to eclipse Pydev gae project?
14,387,118
0
1
712
0
python,google-app-engine,pydev
If you want to use Eclipse's Import feature, go with General -> File system.
0
1
0
0
2013-01-17T15:58:00.000
3
0
false
14,383,025
0
0
1
2
Created a gae project with the googleappengine launch and have been building it with textmate. Now, I'd like to import it to the Eclipse PyDev GAE project. Tried to import it, but it doesn't work. Anyone know how to do that? Thanks in advance.
Pydev: How to import a gae project to eclipse Pydev gae project?
14,383,720
2
1
712
0
python,google-app-engine,pydev
You could try not using the eclipse import feature. Within Eclipse, create a new PyDev GAE project, and then you can copy in your existing files.
0
1
0
0
2013-01-17T15:58:00.000
3
1.2
true
14,383,025
0
0
1
2
Created a gae project with the googleappengine launch and have been building it with textmate. Now, I'd like to import it to the Eclipse PyDev GAE project. Tried to import it, but it doesn't work. Anyone know how to do that? Thanks in advance.
Interacting with a flash application using python
14,387,317
1
0
1,778
0
python,flash,testing,automated-tests,jython
There are a number of ways I've seen around the net, but most seem to involve exposing Flash through JS and then using the JS interface, which is a bit of a problem if you are trying to test things that you don't have dev access to, or need to be in a prod-like state for your tests. Of course, even if you do that, you...
0
0
0
0
2013-01-17T19:53:00.000
1
0.197375
false
14,387,018
0
0
1
1
I'm contemplating using python for some functional testing of flash ad-units for work. Currently, we have an ad (in flash) that has N locations (can be defined as x,y) that need to be 'clicked'. I'd like to use python, but I know Java will do this. I also considered Jython + Sikuli, but wanted to know if there is a py...
How to delete or reset a search index in Appengine
14,390,379
7
5
2,747
0
python,google-app-engine,full-text-search
If you empty out your index and call index.delete_schema() (index.deleteSchema() in Java) it will clear the mappings that we have from field name to type, and you can index your new documents as expected. Thanks!
0
1
0
0
2013-01-17T21:14:00.000
1
1.2
true
14,388,251
0
0
1
1
The Situation Alright, so we have our app in appengine with full text search activated. We had an index set on a document with a field named 'date'. This field is a DateField and now we changed the model of the document so the field 'date' is now a NumericField. The problem is, on the production server, even if I clea...
Why request.get_full_path is not available in the templates?
14,392,480
4
2
2,821
0
python,django
Try {{ request.get_full_path }} in your template.
0
0
0
0
2013-01-18T04:30:00.000
2
0.379949
false
14,392,423
0
0
1
1
I am currently passing 'request_path': request.get_full_path() through render_to_response. I was wondering is this is really nessccary since I was told the it's unnesscary and the context processor takes care of that but {{ get_full_path }} is empty. Please advise.
changing GAE db.Model schema on dev_server with ListProperties? BadValueError
14,401,694
0
3
94
0
python,google-app-engine,google-cloud-datastore
here's my workaround to get it working on dev_server: 1) update your model in production and deploy it 2) use appcfg.py download_data and grab all entities of the type you've updated 3) use appcfg.py upload_data and push all the entities into your local datastore voila.. your local datastore entities can now be retriev...
0
1
0
0
2013-01-18T13:11:00.000
1
1.2
true
14,399,722
0
0
1
1
My understanding of changing db.Model schemas is that it 'doesn't matter' if you add a property and then try and fetch old entities without that property. Indeed, adding the following property to my SiteUser db.Model running on dev_server: category_subscriptions = db.StringProperty() Still allows me to retrieve an old ...
Django Gunicorn Long Polling
14,403,008
2
0
1,026
0
python,django,event-handling,gunicorn
Gunicorn by default will spawn regular synchronous WSGI processes. You can however tell it to spawn processes that use gevent, eventlet or tornado instead. I am only familiar with gevent which can certainly be used instead of Node.js for long polling. The memory footprint per process is about the same for mod_wsgi and ...
0
1
0
0
2013-01-18T13:28:00.000
1
1.2
true
14,399,958
0
0
1
1
Is using Django with gunicorn is considered to be a replacement for using evented/async servers like Tornado, Node.js, and similar ? Additionally, Will that be helpful in handling long-polling/cometed services? Finally, is Gunicorn only replacing the memory consuming Apache threads (in case of Apache/mod-wsgi) with lig...
Accessing a Java RMI API from Python program
14,403,624
2
5
5,222
0
java,python,rmi
You're going to have a very hard time i would imagine. RMI and Java serialization are very Java specific. I don't know if anyone has already attempted to implement this in python (i'm sure google knows), but your best bet would be to find an existing library. That aside, i would look at finding a way to do the RMI in...
0
0
0
1
2013-01-18T16:41:00.000
2
0.197375
false
14,403,472
0
0
1
2
I have a Python program that needs to access a Java RMI API from a third party system in order to fetch some data. I have no control over the third party system so it MUST be done using RMI. What should be my approach here? I have never worked with RMI using Python so I'm kind of lost as to what I should do.. Thanks i...
Accessing a Java RMI API from Python program
14,403,646
2
5
5,222
0
java,python,rmi
How about a little java middle ware piece that you can talk to via REST and the piece in turn can to the remote API?
0
0
0
1
2013-01-18T16:41:00.000
2
1.2
true
14,403,472
0
0
1
2
I have a Python program that needs to access a Java RMI API from a third party system in order to fetch some data. I have no control over the third party system so it MUST be done using RMI. What should be my approach here? I have never worked with RMI using Python so I'm kind of lost as to what I should do.. Thanks i...
Is Brython entirely client-side?
14,418,885
5
17
5,868
0
python,brython
Brython itself seems to be completely client side, but whether that will be enough really depends on the code you wrote. It is not a full blown Python interpreter and does not have the libraries. You might want a backend to support it or use another client side solution as suggested in the comments. Given how few real ...
0
0
0
0
2013-01-19T20:57:00.000
4
1.2
true
14,418,774
0
0
1
2
I have a piece of code written in Python. I would like to put that code in a webpage. Brython seems like the simplest way to glue the two things together, but I don't have a server that can actually run code on the server side. Does Brython require server-side code, or can I host a page using it on the cheap with (say)...
Is Brython entirely client-side?
17,833,373
2
17
5,868
0
python,brython
Brython doesn't always work with python code, I've learned. Something I think needs to be clarified is that while you can run brython in a very limited capacity by accessing the files locally, (because of the AJAX requirement) you can't import libraries - not even the most basic (e.g., html, time). You really need a b...
0
0
0
0
2013-01-19T20:57:00.000
4
0.099668
false
14,418,774
0
0
1
2
I have a piece of code written in Python. I would like to put that code in a webpage. Brython seems like the simplest way to glue the two things together, but I don't have a server that can actually run code on the server side. Does Brython require server-side code, or can I host a page using it on the cheap with (say)...
Initializing a class at Django startup and then referring to it in views
14,419,559
2
2
771
0
python,django
Try to use the singleton design pattern.
0
0
0
0
2013-01-19T22:25:00.000
2
1.2
true
14,419,532
0
0
1
1
I am trying to do some pre-processing at Django startup (I put a startup script that runs once in urls.py) and then use the created instance of an object in my views. How would I go about doing that?
Learning Python for web development. Python 2 or 3?
14,425,489
6
4
766
0
web-applications,python-3.x,python-2.x
If you are looking for a Python framework for web development, I would highly recommend using Django. Regarding Python 2 or 3 issue, Python 3 is of course the future. Django will soon be migrated to Python 3. For now you can stick with Django and Python 2.7. But avoid using those features of Python 2.7 which are remove...
0
0
0
0
2013-01-20T14:17:00.000
1
1.2
true
14,425,379
0
0
1
1
I am a quite experienced PHP developer (using OOP features where possible) and currently searching for another language to play with. I've used Ruby, Python and Node and found Python to be the best choice so far (in terms of maturity, ease of use and the learning curve). As I am mostly focusing on web centric developme...
echoprint - stopping the service Solr, I lose the database
14,444,869
2
0
696
0
python,solr,audio-fingerprinting,echoprint
well I found my mistake and if the ttserver. Thanks Alexandre for that data. Well the right way to make it work would be this /usr/local/tokyotyrant-1.1.33/bin/ttserver casket.tch there indicated the name of the on-disk hash, that will make persistent. Then start Solr normally and I can enter and view songs without pro...
0
1
0
0
2013-01-20T17:28:00.000
1
0.379949
false
14,427,160
0
0
1
1
As I can do to stop the service and tt solr correctly. What I do is restart the PC and then wake up services, but to perform validation of a song, I get a message as if the database has been damaged. I wonder what is the right way to close the service to run and test after songs but not the database is damaged. Greetin...
How to set up a django test server when using gunicorn?
20,411,022
1
11
1,308
0
python,django,selenium,gunicorn
Off top of my head, you can try to override LiveServerTestCase.setUpClass and wind up gunicorn instead of LiveServerThread
0
0
0
0
2013-01-21T02:18:00.000
2
0.099668
false
14,431,639
0
0
1
2
I am running an app in django with gunicorn. I am trying to use selenium to test my app but have run into a problem. I need to create a test server like is done with djangos LiveServerTestCase that will work with gunicorn. Does anyone have any ideas of how i could do this? note: could also someone confirm me that LiveS...
How to set up a django test server when using gunicorn?
20,448,450
2
11
1,308
0
python,django,selenium,gunicorn
I've read the code. Looking at LiveServerTestCase for inspiration makes sense but trying to cook up something by extending or somehow calling LiveServerTestCase is asking for trouble and increased maintenance costs. A robust way to run which looks like what LiveServerTestCase does is to create from unittest.TestCase a ...
0
0
0
0
2013-01-21T02:18:00.000
2
0.197375
false
14,431,639
0
0
1
2
I am running an app in django with gunicorn. I am trying to use selenium to test my app but have run into a problem. I need to create a test server like is done with djangos LiveServerTestCase that will work with gunicorn. Does anyone have any ideas of how i could do this? note: could also someone confirm me that LiveS...
How can I check if a checkbox is checked in Selenium Python WebDriver?
18,076,075
6
40
62,290
0
python,selenium-webdriver
I'm using driver.find_element_by_name("< check_box_name >").is_selected()
0
0
1
0
2013-01-21T16:09:00.000
6
1
false
14,442,636
0
0
1
1
I've been searching a week how check if a checkbox is checked in Selenium WebDriver with Python, but I find only algorithms from JAVA. I've read the WebDriver docs and it doesn't have an answer for that. Anyone have a solution?
Communicate between two servers - Amazon SQS / SNS?
14,500,253
1
2
479
0
python,linux,amazon-web-services,debian
Assuming Server #1 is running a script through cron, then there should be no reason you can't just use ssh to remotely change Server #2. I believe if you use the elastic-ip addresses it might not count as bandwidth usage. Barring that, I'd use SNS. The model would instead be something like: Server #1 notifies Server...
0
0
1
0
2013-01-24T11:09:00.000
2
0.099668
false
14,499,893
0
0
1
1
I have two servers. Basically Server #1 runs a script throughout the day and when its done I need to send a notification to Server #2 to get it to run some other scripts. I am currently leaning on Amazon AWS tools and using Python so I was wondering if someone could recommend a simple, secure and easy to program way of...
Make a Python app package/install for Mac
14,504,112
0
1
1,071
0
python,macos,installation,py2app,dmg
I believe what you are looking for is to add: #!/usr/bin/python to the first line of your code will allow your friend to just double click on the file and it should open. Just as a warning osx does not tell us what version and as such what version of python and what standard libraries are going to be present. Also, jus...
0
0
0
0
2013-01-24T11:24:00.000
1
1.2
true
14,500,185
1
0
1
1
I have developed an application for a friend. Aplication is not that complex, involves only two .py files, main.py and main_web.py, main being the application code, and _web being the web interface for it. As the web was done later, it's kept in this format, I know it can be done with one app but not to complicate it t...
How to crawl a web site where page navigation involves dynamic loading
14,503,228
1
3
4,658
0
python,web-crawler
if you are using google chrome, you can check the url which is dynamically being called in network->headers of the developer tools so based on that you can identify whether it is a GET or POST request. If it is a GET request you can find the parameters straight away from the url. If it is a POST request you can find ...
0
0
1
0
2013-01-24T13:58:00.000
6
0.033321
false
14,503,078
0
0
1
1
I want to crawl a website having multiple pages and when a page number is clicked it is dynamically loaded.How to screen scrape it? i.e as the url is not present as href or a how to crawl to other pages? Would be greatful if someone helped me on this. PS:URL remains the same when different page is clicked.
Implementing a Flask blueprint so that it can be safely mounted more than once?
14,527,032
2
3
636
0
python,flask
It's hard to answer a question like this, because it is so general. First, your Blueprint needs to be implemented in a way that makes no assumptions about the state of the app object it will be registered with. Second, you'll want to use a configurable url scheme to prevent route conflicts. There are far more nuanced ...
0
0
0
0
2013-01-24T14:15:00.000
1
0.379949
false
14,503,387
0
0
1
1
The Flask documentation says : that you can register blueprints multiple times though not every blueprint might respond properly to that. In fact it depends on how the blueprint is implemented if it can be mounted more than once. But I can't seem to find out what must be done to mount a blueprint safely more than onc...
Exception while performing a SOAP request using suds in python
14,530,273
0
0
189
0
soap-client,python-2.6,suds
This may not exactly be a suds issue. Could you pasted your full code? Have you validate that the same Service call returns the results when you use a Tool (SOAPUI may be) to invoke the service?
0
0
0
0
2013-01-24T21:00:00.000
1
0
false
14,510,670
0
0
1
1
I am accessing our jira system to get some information through SOAP. They updated the jira system lately and I started seeing some problems. The problem is very well known but I couldn't wrap head around the solution which was posted. File "C:\CRMAPPS\APPS\PYTHON~1\lib\xml\sax\handler.py", line 38, in fatalError ra...
Django : Call a method only once when the django starts up
14,516,949
1
6
8,360
0
python,django,django-views,django-database
there are some cheats for this. The general solution is trying to include the initial code in some special places, so that when the server starts up, it will run those files and also run the code. Have you ever tried to put print 'haha' in the settings.py files :) ? Note: be aware that settings.py runs twice during st...
0
0
0
0
2013-01-25T06:45:00.000
2
0.099668
false
14,516,737
0
0
1
1
I want to initialize some variables (from the database) when Django starts. I am able to get the data from the database but the problem is how should I call the initialize method . And this should be only called once. Tried looking in other Pages, but couldn't find an answer to it. The code currently looks something l...
Python 2.7 or 3.3 for learning Django
14,519,663
7
8
6,488
0
python,django,python-3.x,python-2.7
Django only has experimental support for Python 3, so you'll have to go with Python 2.7 for now.
0
0
0
0
2013-01-25T10:13:00.000
4
1.2
true
14,519,625
1
0
1
2
I am interested in learning Python but I don't know which version I should chose. When I Googled, I got answers posted over a year ago. If I want to learn Django, which version will be useful and will get support? Note that I know C, C++, Java and C#.
Python 2.7 or 3.3 for learning Django
14,519,922
0
8
6,488
0
python,django,python-3.x,python-2.7
If you already know several languages then learn both Python 2 and 3. The difference is small enough to allow many projects to support both versions using single (the same) source code. For actual deployment you might prefer Python 2.7 if you need to use dependencies that are not ported to Python 3.
0
0
0
0
2013-01-25T10:13:00.000
4
0
false
14,519,625
1
0
1
2
I am interested in learning Python but I don't know which version I should chose. When I Googled, I got answers posted over a year ago. If I want to learn Django, which version will be useful and will get support? Note that I know C, C++, Java and C#.
In Pyramid Framework what is the difference between default Unencrypted Session Factory and setting cookies manually?
14,539,402
8
2
451
0
python,python-2.7,pyramid
The UnencryptedCookieSessionFactory manages one cookie, that is signed. This means that the client can read1 what is in the cookie, but cannot change the values in the cookie. If you set cookies directly using response.set_cookie(), the client can not only read the cookie, they can change the value of the cookie and yo...
0
0
0
1
2013-01-25T22:31:00.000
1
1.2
true
14,531,396
0
0
1
1
I do not understand the difference between setting up a Unencrypted Session Factory in order to set cookies, as compared to using request.response.set_cookie(..) and request.cookies[key].
Flask: Heroku with custom domain name breaks sessions?
14,571,069
1
1
768
0
python,session,cookies,flask
After much testing and many permutations of SESSION_COOKIE_DOMAIN and SERVER_NAME, I concluded that the problem was with Heroku. Something about the way Heroku currently routes/hooks up to custom domains breaks domain cookies. I verified this by moving to EC2...now everything works.
0
0
0
0
2013-01-27T03:48:00.000
1
1.2
true
14,544,225
0
0
1
1
I have a Flask application hosted on Heroku, and the Heroku instance (say, "helloworld.herokuapp.com") has a custom domain name, say "www.helloworld.com". When I access the app at the native heroku URL, sessions work perfectly fine. When I access it at www.helloworld.com, they don't work. I assume that this is because ...
web2py - setting up my own environment
14,554,639
3
1
95
0
python,web2py
You can use the admin interface to install (i.e., unpack) the app. From that point, the app is just a bunch of files in folders, so you can use any editor, IDE, and version control system on those files as you see fit.
0
0
0
0
2013-01-28T02:14:00.000
1
1.2
true
14,554,551
0
0
1
1
I've created a web2py app using the admin interface, but I want to use my own editor and version control. I've downloaded the packed app, but what do I do with it?
Distributing a local Flask app
14,559,747
1
5
1,761
0
python,flask,distribution
Why distribute it at all? If the user you want to use it is on the same local network as the Flask application, just give them the IP address and they can access it via a browser just as you are doing, and no access to the source code either!
0
0
0
0
2013-01-28T04:23:00.000
2
0.099668
false
14,555,393
0
0
1
1
I've made a simple Flask app which is essentially a wrapper around sqlite3. It basically runs the dev server locally and you can access the interface from a web browser. At present, it functions exactly as it should. I need to run it on a computer operated by someone with less-than-advanced computing skills. I could in...
where I host apps developed using tornado webserver
14,639,967
1
2
1,996
0
python,google-app-engine,webserver,hosting,tornado
At heroku the WebSockets protocol is not yet supported on the Cedar stack.
0
1
0
0
2013-01-28T06:42:00.000
3
0.066568
false
14,556,744
0
0
1
1
Is It there any hosting service for hosting simple apps developed using tornado.(Like we hosting in Google App Engine). Is it possible to host on Google App Engine?.The Apps is just like some student datas(adding,removing,searching etc).I'm devoloped using python. Thanks in advance
OpenERP 7 with modules from OpenERP 6.1
14,564,692
6
2
3,217
1
python,openerp,erp
Openerp 6.1 modules directly can not be used in openerp 7. You have to do some basic changes in openerp 6.1 modules. Like tree, form tag compulsory string and verision="7" include in form. If you have inherited some basic modules like sale, purchase then you have to do changes in inherit xpath etc. Some objects res....
0
0
0
0
2013-01-28T14:06:00.000
1
1.2
true
14,563,801
0
0
1
1
I have couple OpenERP modules implemented for OpenERP 6.1 version. When I installed OpenERP 7.0, i copied these modules into addons folder for OpenERP 7. After that, I tried to update modules list trough web interface, but nothings changed. Also, I started server again with options --database=mydb --update=all, but mod...
How to retrieve the real SQL from the Django logger?
14,567,526
0
0
189
1
python,sql,django,django-database
select * from app_model where name = %s is a prepared statement. I would recommend you to log the statement and the parameters separately. In order to get a wellformed query you need to do something like "select * from app_model where name = %s" % quote_string("user") or more general query % map(quote_string, params). ...
0
0
0
0
2013-01-28T17:00:00.000
4
0
false
14,567,172
0
0
1
1
I am trying to analyse the SQL performance of our Django (1.3) web application. I have added a custom log handler which attaches to django.db.backends and set DEBUG = True, this allows me to see all the database queries that are being executed. However the SQL is not valid SQL! The actual query is select * from app_mod...
Search index for flat HTML pages
14,570,969
1
1
349
0
python,html,search,indexing,django-flatpages
With Solr, you would write code that retrieves content to be indexed, parses out the target portions from the each item then sends it to Solr for indexing. You would then interact with Solr for search, and have it return either the entire indexed document an ID or some other identifying information about the original i...
0
0
0
0
2013-01-28T20:44:00.000
1
1.2
true
14,570,901
0
0
1
1
I'm looking to add search capability into an existing entirely static website. Likely, the new search functionality itself would need to be dynamic, as the search index would need to be updated periodically (as people make changes to the static content), and the search results will need to be dynamically produced when...
How can I detect my robot from an overhead webcam image?
14,572,614
1
0
684
0
python,opencv,computer-vision,robot
I'd do the following, and I'm pretty sure it would work: I assume that the background of the video stream (the robots vicinity) is pretty static, so the firs step is: 1. background subtraction 2. detect movement in the foreground, this is your robot and everything else that changes from the background model, you'll nee...
0
0
0
1
2013-01-28T21:55:00.000
2
0.099668
false
14,571,975
0
0
1
1
Here's my problem: Suppose there's a course for robots to go through, and there's an overhead webcam that can see the whole of it, and which the robot can use to navigate. Now the question is, what's the best way to detect the robot (position and heading) on the image of this webcam? I was thinking about a few solution...
Async URL Fetch and Memcache on Appengine
14,630,265
0
1
150
0
python,google-app-engine
No, there is no automated way where async Url Fetch would store data automatically to memcache on completion. You have to do it in your code, but this defeats what you are trying to do. Also remember that memcache is volatile and it's content can be purged at any time.
0
1
0
0
2013-01-31T13:50:00.000
1
0
false
14,627,334
0
0
1
1
Is it possible to make a async url fetch on appengine and to store the rpc object in the memcache? What I try to do is to start the asynch url fetch within a task, but I don't want the task to wait until the fetch has finished. Therefore I tought I would just write it to memcache and access it later from outside the ta...
Unit testing GAE Blobstore (with nose)
29,110,829
0
1
123
0
python,google-app-engine
I had the same question so I dug into the nosegae code, and then into the actual testbed code. All you need to do is set nosegae_blobstore = True where you're setting up all the other stubs. This sets up a dict-backed blobstore stub.
0
1
0
0
2013-01-31T17:09:00.000
2
0
false
14,631,306
0
0
1
1
We're using nose with nose-gae for unit testing our controllers and models. We now have code that hits the blob store and files API. We are having a hard time testing those due to lack of testing proxies/mocks. Is there a good way to unit tests these services or lacking unit testing is there a way to automated acceptan...
Django: How do I extend the same functionality to many views?
14,639,666
0
1
159
0
python,django,django-templates,django-views,template-inheritance
I believe separating out your upload related functionality into separate views will be better way to go about it. That way all your templates (inheriting from base.html) will refer to appropriate view for uploads. You can use HTTP_REFERER header to redirect to appropriate page from the upload views.
0
0
0
0
2013-02-01T02:31:00.000
5
0
false
14,638,799
0
0
1
3
I have a parent template that I'm using in many parts of the site, called base.html. This template holds a lot of functional components, such as buttons that trigger different forms (inside modal windows) allowing users to upload different kinds of content, etc. I want users to be able to click these buttons from almos...
Django: How do I extend the same functionality to many views?
14,645,465
0
1
159
0
python,django,django-templates,django-views,template-inheritance
You can render many templates in just one view by requiring unique value in each or use request session.
0
0
0
0
2013-02-01T02:31:00.000
5
0
false
14,638,799
0
0
1
3
I have a parent template that I'm using in many parts of the site, called base.html. This template holds a lot of functional components, such as buttons that trigger different forms (inside modal windows) allowing users to upload different kinds of content, etc. I want users to be able to click these buttons from almos...
Django: How do I extend the same functionality to many views?
14,646,308
0
1
159
0
python,django,django-templates,django-views,template-inheritance
Load the functionality part with ajax on your base.html. That way you have a view_method that deals exclusively with those funcionalities.
0
0
0
0
2013-02-01T02:31:00.000
5
0
false
14,638,799
0
0
1
3
I have a parent template that I'm using in many parts of the site, called base.html. This template holds a lot of functional components, such as buttons that trigger different forms (inside modal windows) allowing users to upload different kinds of content, etc. I want users to be able to click these buttons from almos...
Python read microphone
40,968,039
0
6
19,017
0
python,audio,random,microphone
u can refer speech_recognition module or PyAudio module for recording speech.I used PyAudio module with Microsoft cognitive service.It worked fine for me.
0
0
0
0
2013-02-01T08:40:00.000
2
0
false
14,642,443
0
0
1
1
I am trying to make python grab data from my microphone, as I want to make a random generator which will use noise from it. So basically I don't want to record the sounds, but rather read it in as a datafile, but realtime. I know that Labview can do this, but I dislike that framework and am trying to get better at py...
Django-Storages not being installed properly
15,756,378
0
0
173
0
python,django,amazon-ec2,python-django-storages
If you're using virtualenv I find you don't need to add in sudo. So just try doing a pip install django-storages?
0
0
0
0
2013-02-01T16:41:00.000
1
0
false
14,650,989
0
0
1
1
I'm working on deploying my first django app to an EC2 server. I'm serving my static files from an S3 server, so I'm using the django-storages app. I installed it using sudo pip install django-storages on the EC2 server. However, I keep getting the error "no module found" when I try to import it. Yet, when I run pip ...
Capturing PDF files using Python Selenium Webdriver
14,760,698
0
2
1,728
0
python,pdf,selenium,webdriver,selenium-webdriver
We ultimately accomplished this by clearing firefox's temporary internet files before the test, then looking for the most recently created file after the report was generated.
0
0
1
1
2013-02-01T17:40:00.000
1
1.2
true
14,651,973
0
0
1
1
We test an application developed in house using a python test suite which accomplishes web navigations/interactions through Selenium WebDriver. A tricky part of our web testing is in dealing with a series of pdf reports in the app. We are testing a planned upgrade of Firefox from v3.6 to v16.0.1, and it turns out tha...
< > changed to < and > while parsing html with beautifulsoup in python
55,544,880
0
7
8,456
0
python,html,parsing,beautifulsoup
It can be due to an invalid character (due to charset encoding/decoding), therefor BeautifulSoup has issues to parse the input. I solve it by passing my string directly to BeautifulSoup without doing any encoding/decoding. In my case, I was trying to convert UTF-16 to UTF-8 myself.
0
0
1
0
2013-02-03T03:42:00.000
2
0
false
14,669,283
0
0
1
1
While processing html using Beautifulsoup, the < and > were converted to &lt;and &gt;, since the tag anchor were all converted, the whole soup lost its structure, any suggestion?
Is google app engine right for me (hosting a few rapidly updating text files created w/ python)
14,670,069
0
0
108
0
python,google-app-engine
Yes and no. Appengine is great in terms of reliability, server speed, features, etc. However, it has two main drawbacks: You are in a sandboxed environment (no filesystem access, must use datastore), and you are paying by instance hour. Normally, if you're just hosting a small server accessed once in a while, you can...
0
1
0
0
2013-02-03T05:38:00.000
2
0
false
14,669,819
0
0
1
1
I have a python script that creates a few text files, which are then uploaded to my current web host. This is done every 5 minutes. The text files are used in a software program which fetches the latest version every 5 min. Right now I have it running on my web host, but I'd like to move to GAE to improve reliability. ...
subprocess.call() of 'sort' command within Django script is adding \M to the end of my files
14,671,017
0
0
129
0
python,django,linux,unix,sorting
It is highly unlikely that sort would on its own volition change line endings from Unix to Windows. It is more likely that A.csv already contains Windows line endings, and sort merely preserves them. If it is your script that's creating A.csv in the first place, double-check the newline convention that's being used.
0
0
0
0
2013-02-03T09:12:00.000
1
0
false
14,670,990
0
0
1
1
I am messing around with Django. I have a custom admin script in one of my apps (inside the management/commands folder) that has a subprocess.call() line. I am doing a 'sort A.csv -o A_sorted.csv' call. The sorted file that gets written is full of '^M' at the end of every line. I find this doesn't happen when runni...
Handling multiple requests in Flask
14,673,087
3
65
72,055
0
python,flask
For requests that take a long time, you might want to consider starting a background job for them.
0
0
1
0
2013-02-03T13:02:00.000
2
0.291313
false
14,672,753
0
0
1
1
My Flask applications has to do quite a large calculation to fetch a certain page. While Flask is doing that function, another user cannot access the website, because Flask is busy with the large calculation. Is there any way that I can make my Flask application accept requests from multiple users?
ndb.query.count() failed with 60s query deadline on large entities
14,713,169
2
4
2,669
1
python,google-app-engine,app-engine-ndb,bigtable
This is indeed a frustrating issue. I've been doing some work in this area lately to get some general count stats - basically, the number of entities that satisfy some query. count() is a great idea, but it is hobbled by the datastore RPC timeout. It would be nice if count() supported cursors somehow so that you could ...
0
1
0
0
2013-02-03T14:41:00.000
3
0.132549
false
14,673,642
0
0
1
1
For 100k+ entities in google datastore, ndb.query().count() is going to cancelled by deadline , even with index. I've tried with produce_cursors options but only iter() or fetch_page() will returns cursor but count() doesn't. How can I count large entities?
How to properly manage application configurations
15,259,314
0
2
175
0
python,configuration
Create a default settings module which contains your desired default settings. Create a second module intended to be used by the the user with a from default_settings import * statement at the top, and instructing the user to write any replacements into this module instead. Python is rather expressive, so in most cases...
0
0
0
0
2013-02-03T16:14:00.000
1
0
false
14,674,487
1
0
1
1
What is the most universal and best application configurations management method? I want to have these properties in order to have "good configuration management": A list of all available properties and their default values in one place. A list of properties which can be changed by an app user, also in one place. When...