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
Language best for a Photo-sharing site: PHP, Python, Ruby or something else?
8,051,192
2
4
1,102
0
php,python,ruby,scalability
PHP can do it well. Python also can do it using web frameworks like Django or turbogears. That being said, language is not an issue as long as it has web capabilities which your post seems to dictate
0
0
0
1
2011-11-08T13:25:00.000
3
0.132549
false
8,051,087
0
0
1
3
I plan to build a photo-sharing site like Flickr/Picasa for photographers, with features most suited for them. As you know, if that venture proves successful, many GB to TB of data transfers take place every day. This question is not just about scalability of my application as it grows, but also performance. I would li...
Language best for a Photo-sharing site: PHP, Python, Ruby or something else?
8,052,193
0
4
1,102
0
php,python,ruby,scalability
I've done Web applications in PHP, ColdFusion, Java, and Ruby, with various frameworks. I find Rails to be the most powerful Web framework I've ever used. Nothing can really equal it, because the power comes from the Ruby language, and no other language (except maybe Smalltalk) can really equal that. That said, as long...
0
0
0
1
2011-11-08T13:25:00.000
3
0
false
8,051,087
0
0
1
3
I plan to build a photo-sharing site like Flickr/Picasa for photographers, with features most suited for them. As you know, if that venture proves successful, many GB to TB of data transfers take place every day. This question is not just about scalability of my application as it grows, but also performance. I would li...
Language best for a Photo-sharing site: PHP, Python, Ruby or something else?
8,051,120
7
4
1,102
0
php,python,ruby,scalability
Any. The language doesn't matter. Ruby-fanatics (especially the RubyOnRails sort) will try and tell you that their language will do everything in only 10 lines and it'll make you dinner and pick the kids up from school. Others will tell you that their language is the most secure, fastest, quickest to develop in, etc. I...
0
0
0
1
2011-11-08T13:25:00.000
3
1.2
true
8,051,087
0
0
1
3
I plan to build a photo-sharing site like Flickr/Picasa for photographers, with features most suited for them. As you know, if that venture proves successful, many GB to TB of data transfers take place every day. This question is not just about scalability of my application as it grows, but also performance. I would li...
Getting the final destination of a javascript redirect on a website
8,053,358
-1
3
5,021
0
python,urllib2
It doesnt sound like fun to me, but every javascript function is a is also an object, so you can just read the function rather than call it and perhaps the URL is in it. Otherwise, that function may call another which you would then have to recurse into... Again, doesnt sound like fun, but might be doable.
0
0
1
0
2011-11-08T15:58:00.000
2
-0.099668
false
8,053,295
0
0
1
1
I parse a website with python. They use a lot of redirects and they do them by calling javascript functions. So when I just use urllib to parse the site, it doesn't help me, because I can't find the destination url in the returned html code. Is there a way to access the DOM and call the correct javascript function from...
on Windows, virtualenv is not being used with i run a python program
8,069,779
1
2
576
0
python,windows,django,virtualenv
Virtualenv modifies the PATH to include a Python with the correct setup. It's a completely separate program from the system Python. The PATH is used to look up programs by name: the first program of a given name that's in the PATH gets executed. When you “run a file”, Windows uses the extension of the file to look up a...
0
0
0
0
2011-11-09T17:30:00.000
3
0.066568
false
8,069,029
1
0
1
1
I have virtualenv installed on windows. In cmd, i run python and look at sys.path and see the virtualenv path included. but when i run manage.py (for django), I don't see the virtualenv path, so virtualenv is not working with django server. Why?
Connect appengine with cakephp
8,070,747
0
0
378
1
php,python,google-app-engine,cakephp
You can not run PHP on GAE. If you run PHP somewhere, it is a bad architecture to go over the internet for your data. It will be slooooow and a nightmare to develop in. You should store your data where you run your php, unless you must have a distributed, globally scaling architecture, which afaiu not the case.
0
1
0
0
2011-11-09T18:21:00.000
5
0
false
8,069,649
0
0
1
1
I'm thinking in create a webapplication with cakephp but consuming python's appengine webservice. But, to install cakephp etc, I need to configure the database. Appengine uses another kind of datastorage, with is different from mysql, etc. I was thinking in store the data in appengine, and using the python webservices,...
Time zones and Localisation
8,099,104
1
1
1,526
0
python,django,timezone,python-datetime
The problem with relying on the client to self-report their time zone is that there is always a chance (how big of a chance is debateable) that what you will really get is a UTC offset. If you get a UTC offset, your logic will work fine most of the time, but in reality will only apply to the exact timestamps produced ...
0
0
0
0
2011-11-10T04:37:00.000
5
1.2
true
8,075,052
1
0
1
2
I'm currently storing all times in UTC, to make things easier for when I start bringing multiple sites and servers online. The problem comes in when translating date and datetime objects into strings in my templates and when accepting user input. 6:00PM UTC doesn't mean a whole lot to someone who is in PST. Likewise,...
Time zones and Localisation
8,075,182
0
1
1,526
0
python,django,timezone,python-datetime
I wouldn't do ip geolocation. It can be very inaccurate, especially free services. Just ask the user for zip code or state, and store it in cookie.
0
0
0
0
2011-11-10T04:37:00.000
5
0
false
8,075,052
1
0
1
2
I'm currently storing all times in UTC, to make things easier for when I start bringing multiple sites and servers online. The problem comes in when translating date and datetime objects into strings in my templates and when accepting user input. 6:00PM UTC doesn't mean a whole lot to someone who is in PST. Likewise,...
Web Frameworks with site style inbuilt
8,082,137
1
0
249
0
python,css,frameworks
I feel your pain. As a developer coming from the desktop world and doing some web development, I'm used to setting up the appearance of my application at the same time I select and arrange my user interface widgets. You will just have to accept that browser based software does not work that way. You must separately l...
0
0
0
1
2011-11-10T10:12:00.000
4
0.049958
false
8,077,886
0
0
1
2
I hope this isn't knocked for being too general, but... I recently had occasion to learn web2py for a final year university project. In this subject teams of four had 8 weeks to design a web app. Ultimately i found that web2py was quite versatile, with it being very easy to get a site up and running fast, a lot of opti...
Web Frameworks with site style inbuilt
8,085,839
1
0
249
0
python,css,frameworks
So far what I've seen about Yii Framework (PHP) is that it can generate an initial nice Styled Web Application backbone, ready for you to work in it adding your functionality, DBs, User roles, etc. and of course all the freedom to define your own Look and Feel by defining HTML views, CSS, JS, etc. I'm about to start le...
0
0
0
1
2011-11-10T10:12:00.000
4
0.049958
false
8,077,886
0
0
1
2
I hope this isn't knocked for being too general, but... I recently had occasion to learn web2py for a final year university project. In this subject teams of four had 8 weeks to design a web app. Ultimately i found that web2py was quite versatile, with it being very easy to get a site up and running fast, a lot of opti...
Customizing the Django User admin
8,092,344
0
0
521
0
python,django,django-models,django-admin
Turns out, one can put the methods in the UserAdmin itself instead than in the User model. This way I can access all the information I need about the user.
0
0
0
0
2011-11-11T09:52:00.000
2
1.2
true
8,092,254
0
0
1
1
I have a Django application where users have additional data. That data is collected in a Profile model with a OneToOneField pointing to User. This is fine and works perfectly for most purposes, but I have trouble customizing the admin for User. In particular: I would like to be able to show a Profile field inside lis...
jquery - can I detect once all content is loaded?
8,093,470
0
3
6,659
0
jquery,events,python-idle
Ideally the answer would be $(function(){ }) or window.onload = function(){} that fires after all the DOM contents are loaded. But I guess, the ads on your page starts loading asynchronously after the DOM load. So, assuming you know the number of 'ads' on your page (you said you are loading them piece by piece), my ad...
0
0
1
1
2011-11-11T11:26:00.000
4
0
false
8,093,297
0
0
1
1
I have a page with a lot of ads being loaded in piece by piece. I need to position an element relative to overall page height, which is changing during load, because of ads being added. Question: Is there a jquery event or similar to detect, when all elements are loaded? I'm currently "waiting" with setTimeout, but thi...
How do I confirm a form has been submitted with django?
8,097,716
0
1
3,238
0
python,django
Honestly, this isn't a Django-specific issue. The problem is whether you are doing a normal form submission or using AJAX. The basic idea is to POST to your form submission endpoint using AJAX and the form data, and in the Django view, merely update your models and return either an empty 200 response or some data (in X...
0
0
0
0
2011-11-11T17:23:00.000
3
0
false
8,097,644
0
0
1
1
I'm submitting a form and instead of redirecting to a success url I would like to just show "Form has been submitted" in text on the page when the form has been submitted. Does anyone know how I can do so?
Sending data through the web to a remote program using python
8,098,102
2
1
403
0
python,networking
I would suggest taking a look at setting up a simple site in google app engine. It's free and you can use python to do the site. Than it would just be a matter of creating a simple restful service that you could send a POST to with your pickled data and store it in a database. Than just create a simple web front end on...
0
0
1
0
2011-11-11T18:02:00.000
4
0.099668
false
8,098,068
0
0
1
4
I have a program that I wrote in python that collects data. I want to be able to store the data on the internet somewhere and allow for another user to access it from another computer somewhere else, anywhere in the world that has an internet connection. My original idea was to use an e-mail client, such as g-mail, to ...
Sending data through the web to a remote program using python
8,098,342
0
1
403
0
python,networking
Adding this as an answer so that OP will be more likely to see it... Make sure you consider security! If you just blindly accept pickled data, it can open you up to arbitrary code execution.
0
0
1
0
2011-11-11T18:02:00.000
4
0
false
8,098,068
0
0
1
4
I have a program that I wrote in python that collects data. I want to be able to store the data on the internet somewhere and allow for another user to access it from another computer somewhere else, anywhere in the world that has an internet connection. My original idea was to use an e-mail client, such as g-mail, to ...
Sending data through the web to a remote program using python
8,099,975
0
1
403
0
python,networking
I suggest you to use a good middle-ware like: Zero-C ICE, Pyro4, Twisted. Pyro4 using pickle to serialize data.
0
0
1
0
2011-11-11T18:02:00.000
4
0
false
8,098,068
0
0
1
4
I have a program that I wrote in python that collects data. I want to be able to store the data on the internet somewhere and allow for another user to access it from another computer somewhere else, anywhere in the world that has an internet connection. My original idea was to use an e-mail client, such as g-mail, to ...
Sending data through the web to a remote program using python
8,098,220
1
1
403
0
python,networking
Another option in addition to what Casey already provided: Set up a remote MySQL database somewhere that has user access levels allowing remote connections. Your Python program could then simply access the database and INSERT the data you're trying to store centrally (e.g. through MySQLDb package or pyodbc package). ...
0
0
1
0
2011-11-11T18:02:00.000
4
0.049958
false
8,098,068
0
0
1
4
I have a program that I wrote in python that collects data. I want to be able to store the data on the internet somewhere and allow for another user to access it from another computer somewhere else, anywhere in the world that has an internet connection. My original idea was to use an e-mail client, such as g-mail, to ...
Django - Consuming a RESTful service asynchronously
8,130,058
4
4
890
0
python,django,rest
django-celery is a popular choice for async tasks, i usually use greenlets as im used to them. Then to notify the user you can use the notification framework to tell the client that something is done.
0
0
0
0
2011-11-11T20:41:00.000
1
1.2
true
8,099,699
0
0
1
1
I need to create a django web portal in which users can select and run ad-hoc reports by providing values, via forms, to parameters defined in each specific report. The view that processes the user’s report execution requests needs to make RESTFul service calls to a remote Jasper Reports Server where the actual output...
Can a Heroku app use different/multiple ports?
8,110,748
0
7
8,631
0
python,email,heroku,port
Custom mail server? Nope. Heroku's mail services? Yes, check out the "Add-On" link for cloudmailin, mailgun and sendgrid. Basic service is free (they still want your credit-card and hope you exceed free quota).
0
0
0
0
2011-11-12T21:39:00.000
3
0
false
8,107,748
0
0
1
2
Web services on Heroku normally use the PORT environment variable, but I want to run a custom mail server on Heroku. So I need to expose 2 ports, preferably 110 and 25, but I can live with alternatives. Is it possible?
Can a Heroku app use different/multiple ports?
8,107,804
3
7
8,631
0
python,email,heroku,port
No, just running some quick tests against the heroku proxy (proxy.heroku.com) I can only make connections to ports 80 and 443. Being as heroku don't provide any POP/SMTP it doesn't make sense for them to have those ports open I'm afraid.
0
0
0
0
2011-11-12T21:39:00.000
3
0.197375
false
8,107,748
0
0
1
2
Web services on Heroku normally use the PORT environment variable, but I want to run a custom mail server on Heroku. So I need to expose 2 ports, preferably 110 and 25, but I can live with alternatives. Is it possible?
Downloading PDF files with Scrapy
8,113,814
0
0
1,740
0
python,session,cookies,scrapy
I think the site tracks your session. If it's a PHP site, pass PHPSESSID cookie to the request which downloads the PDF file.
0
0
1
0
2011-11-12T23:54:00.000
1
0
false
8,108,477
0
0
1
1
I'm scraping pdf files from a site using Scrapy, a Python web-scraping framework. The site requires to follow the same session in order to allow you to download the pdf. It works great with Scrapy's because it's all automated but when I run the script after a couple of seconds it starts to give me fake pdf files like ...
tools or techniques to help avoid mistakes in python/django
8,152,166
0
2
189
0
python,django,debugging,static-analysis
Thank you for your answers, I'll check these tools. I wanted to share with you other ideas (none python/django specific): Assert conditions in code - but remove from production code. Run periodic checks on the data (eg. sending email to dev when found unexpected state) - in case a bug slips by it may be detected faste...
0
0
0
1
2011-11-13T10:31:00.000
3
0
false
8,110,952
1
0
1
1
What tools or techniques can help avoid bugs, especially silly mistakes such as typos, coding in Python and Django? I know unit-testing every line of code is the "proper" way, but are there any shortcuts? I know of pylint, but unfortunately it doesn't check Django ORM named parameters, where a typo can go unnoticed. Is...
BeautifulSoup innerhtml?
63,989,449
3
64
53,337
0
python,html,beautifulsoup,innerhtml
str(element) helps you to get outerHTML, then remove outer tag from the outer html string.
0
0
0
0
2011-11-13T16:26:00.000
7
0.085505
false
8,112,922
0
0
1
2
Let's say I have a page with a div. I can easily get that div with soup.find(). Now that I have the result, I'd like to print the WHOLE innerhtml of that div: I mean, I'd need a string with ALL the html tags and text all toegether, exactly like the string I'd get in javascript with obj.innerHTML. Is this possible?
BeautifulSoup innerhtml?
35,100,639
1
64
53,337
0
python,html,beautifulsoup,innerhtml
How about just unicode(x)? Seems to work for me. Edit: This will give you the outer HTML and not the inner.
0
0
0
0
2011-11-13T16:26:00.000
7
0.028564
false
8,112,922
0
0
1
2
Let's say I have a page with a div. I can easily get that div with soup.find(). Now that I have the result, I'd like to print the WHOLE innerhtml of that div: I mean, I'd need a string with ALL the html tags and text all toegether, exactly like the string I'd get in javascript with obj.innerHTML. Is this possible?
Find untranslated strings in HTML templates
8,130,667
0
4
865
0
python,django,localization
You can use the builtin template parser to parse your templates, and recurse into all tags that are not instances of BlockTransTag
0
0
0
0
2011-11-14T09:14:00.000
2
0
false
8,119,360
0
0
1
1
Is there way to find untranslated strings in the HTML templates of my Django application i.e. blocks of text that are not wrapped in trans and blocktrans tags. Since we have many templates, it would be a very time-consuming process to go through them manually and check but if there isn't an option, I guess it has to be...
Model Creation by SQLAlchemy database reflection
8,125,931
4
3
1,319
1
python,reflection,sqlalchemy,pyramid
This doesn't seem to have much to do with "database reflection", but rather dynamic table creation. This is a pretty dangerous operation and generally frowned upon. You should try to think about how to model the possible structure your users would want to add to the Base and design your schema around that. Sometimes th...
0
0
0
0
2011-11-14T13:09:00.000
4
0.197375
false
8,122,078
0
0
1
1
I am currently working on a pyramid system that uses sqlalchemy. This system will include a model (let's call it Base) that is stored in a database table. This model should be extensible by the user on runtime. Basically, the user should be able to subclass the Base and create a new model (let's call this one 'Child')....
Best ways to stream live video to a webpage using Python/C++/Java
8,129,233
0
1
677
0
java,c++,python,streaming
What kind of live video source that you mean? If you don't intend to do this code-wise, you can use the free VLC Player to act as a streaming service in between any kind of media stream source (file, network, capture device, disc) and your web video client. But, if you intend to do this code-wise, you can you VLCJ libr...
0
0
0
0
2011-11-14T19:51:00.000
1
0
false
8,127,213
0
0
1
1
I want to read in a live video stream, like RTSP, run some basic processing on it, and display it on a website. What are some good ways to do this? I have used OpenCV for Python before but found it to be a hassle. I am also familiar with Java and C++ if there are better libraries available. I haven't done a lot of ...
does Tornado uses WSGI to deal with python files?
8,129,321
3
1
444
0
python,wsgi,tornado
Tornado shouldn't use WSGI, because WSGI is not async friendly. It has WSGI support, but it won't support async. Tornado has its own HTTP server (written in C and Python), and can be used standalone or placed behind another async HTTP server (usually Nginx).
0
1
0
0
2011-11-14T21:56:00.000
1
1.2
true
8,128,736
0
0
1
1
am sorry for that question, am beginning in Tornado, and because i come from two other frameworks: Flask and Django, Flask uses Werkzeug which is a WSGI webserver, Django uses WSGI too, but, when making an application programmed with Tornado, how it will deal with HTTP? there is a protocol to deal with python files whe...
Performing a check when saving a model in Django's admin
8,140,229
3
4
2,403
0
python,django,django-admin
Simply create a modelform with normal validation via the clean methods, then assign that form to be used in the admin by doing form = MyFormClass inside the ModelAdmin class.
0
0
0
0
2011-11-15T16:44:00.000
3
1.2
true
8,139,892
0
0
1
1
I'd like to perform a check when saving a model via the django Admin panel. I thought about using ModelAdmin.save_model(), however, from the documentation it says: ModelAdmin.save_model() and ModelAdmin.delete_model() must save/delete the object, they are not for veto purposes, rather they allow you to perform extra o...
How to use a report from a view inside another view in Django?
8,143,409
0
0
54
0
python,django
you could always keep the files, and have a cron job that deletes files whose session has expired
0
0
0
0
2011-11-15T21:14:00.000
2
0
false
8,143,228
0
0
1
1
I have a form where I upload a file, and I generate a report out of it. The thing is, I would also like to make the report available for download, as an archive. I would like to somehow include the CSS and the JS ( that I inherit from my layout ) inside the report, but I don't really know how to go about this. So far, ...
Removing the panel that appears on the right hand side of OpenERP main page
8,149,572
5
2
337
0
python,openerp
serch for main_sidebar in web/addons/openerp/controllers/templates/form.mako you can hide the toolbar using this css file: web/addons/openerp/static/css/screen.cs
0
0
0
0
2011-11-16T08:43:00.000
1
1.2
true
8,148,821
0
0
1
1
How can we remove the panel that appears on right hand side of openERP's main page ,which shows ACTIONS ,LINKS,OTHER OPTIONS.From which file in openERP web server can we remove that. Thanks, Sameer
Removing Database name and username from top Left hand side corner.
12,295,904
0
0
133
1
python,openerp
It's in the openerp-web module. The location depends on your particular configuration. The relevant code can be found in the file addons/web/static/src/xml/base.xml. Search for header_title and edit the contents of the h1 tag of that class.
0
0
0
0
2011-11-16T11:37:00.000
2
0
false
8,151,033
0
0
1
1
How can we remove the database name and username that appears on top left hand side corner in openERP window after openERP logo.In which file do we need to make changes to remove that. Thanks, Sameer
Which simplejson module to use for Google AppEngine?
8,151,077
2
2
146
0
python,django,google-app-engine
Where did you see anything recommending the use of google.appengine.ext.key_range.simplejson? That is only available because the key_range package happens to import simplejson. Don't use it like that.
0
0
0
0
2011-11-16T11:38:00.000
3
1.2
true
8,151,044
0
0
1
2
I'm trying to figure out which simplejson module to use. Having looked back through my project I can see in some places I am using a mixture of both: django.utils.simplejson google.appengine.ext.key_range.simplejson Which should I be using and why?
Which simplejson module to use for Google AppEngine?
8,151,134
0
2
146
0
python,django,google-app-engine
Functionality is probably the same for both, but I would use django.utils.simplejson, here is why: google.appengine.ext.key_range.simplejson is not mentioned by any GAE documents so it may get removed at some point. django.utils.simplejson has more probability to being updated along with django and it seems there is l...
0
0
0
0
2011-11-16T11:38:00.000
3
0
false
8,151,044
0
0
1
2
I'm trying to figure out which simplejson module to use. Having looked back through my project I can see in some places I am using a mixture of both: django.utils.simplejson google.appengine.ext.key_range.simplejson Which should I be using and why?
cx_Oracle 5.1.1 under apache+mod_wsgi
8,158,089
1
1
1,227
1
python,apache,cx-oracle
Need a solution as well. I have the same setup on WinXP (Apache 2.2.21/ mod_wsgi 3.3/ python 2.7.2/ cx_Oracle 5.x.x). I found that cx_Oracle 5.1 also fails with the same error. Only 5.0.4 works. Here is the list of changes that were made from 5.0.4 to 5.1: Remove support for UNICODE mode and permit Unicode to be...
0
0
0
0
2011-11-16T12:36:00.000
1
0.197375
false
8,151,815
0
0
1
1
if I use cx_Oracle 5.0.4, I can connect from python console, and works under apache+django+mod_wsgi but when I update cx_Oracle 5.1.1, I can connect from python console, BUT same code doesn't work under apache+django+mod_wsgi File "C:\Python27\lib\site-packages\django\db\backends\oracle\base.py", line 24, in rais...
Cost of Inheritance Java (Android)
8,153,347
2
1
992
0
java,android,python,performance,inheritance
It's the correct, and probably only, Java way. In Java all calls are virtual anyway unless you use final all over the place, but that means you couldn't even use interfaces. So most calls will probably be virtual dispatch whatever you do. Inheritance does not incur any other significant penalty. Besides, Android device...
0
0
0
1
2011-11-16T14:29:00.000
1
1.2
true
8,153,264
0
0
1
1
I am building an extension of ORMLite to target Android. What I want to do I want to reproduce one of the behavior that Doctrine and Symfony are achieving in PHP with models. In a word: From a yml file generate a bunch of BaseModel class with accessors and things that won't change. Let the real model inherits from t...
Python Link Fetcher Performance Issue
8,156,982
0
0
130
0
python,beautifulsoup
You should consider using hashes for comparing the previously collected list. Instead of storing a list of links as strings, store a list of MD5 or SHA1 hashes for those links. Comparing a hash to a list of hashes is much faster than comparing a string to a list of strings. Or if you maintain and persist an actual ...
0
0
1
0
2011-11-16T18:28:00.000
2
0
false
8,156,736
0
0
1
1
So I am writing link fetchers to find new links on particular sites for a given group of 'starting links'. Currently I am using Python/Beautiful Soup to accomplish this with decent success. I have an input file [for each site] that I build the 'starting links' list from. I use urllib2 to load the webpages and then beau...
Separated web server and application server?
8,163,446
3
2
265
0
python,apache,wsgi
WSGI is not a network protocol, so you will have to run a web server in front of your application even if it only acts as a WSGI container. Proxy connections from your main web server to the WSGI container with mod_proxy.
0
1
0
0
2011-11-17T07:19:00.000
2
0.291313
false
8,163,418
0
0
1
2
I am developing web service. My system is like this: Client request --> Web Server(Apache) --> Application Server(Python) I used WSGI for communicating between Apache and Python. My question how can I separated the web server and app server. At the moment, I have to run them on the same server.
Separated web server and application server?
8,163,634
1
2
265
0
python,apache,wsgi
+1 for Ignacio's answer. Also note that separating a WSGI app from a server will lose one of the main benefits of WSGI (the server calls the wsgi app directly). Additionally, WSGI apps have a response callback that was intended to communicate directly with the server. Instead of decoupling the server from the app, ...
0
1
0
0
2011-11-17T07:19:00.000
2
0.099668
false
8,163,418
0
0
1
2
I am developing web service. My system is like this: Client request --> Web Server(Apache) --> Application Server(Python) I used WSGI for communicating between Apache and Python. My question how can I separated the web server and app server. At the moment, I have to run them on the same server.
Run the some code whenever I upload the project on to the app engine server
8,163,809
0
2
64
0
python,google-app-engine,appserver
There isn't an official way to discover if your application has been modified altought each time you upload your application it gets a unique version number {app version.(some unique number)} but since there isn't a document API on how to get it I wound't take a risk and use it. What you need todo is to have a script t...
0
1
0
0
2011-11-17T07:47:00.000
1
0
false
8,163,669
0
0
1
1
I've built an appeninge project so, how can I run some piece of code on the appserver only once, i.e when ever I upload the whole project on to the server. How should I achieve this task???
How to speed up debugging of python programs in PyDev in Eclipse (esspecially Google App Engine)
8,169,698
0
0
291
0
python,debugging,google-app-engine,optimization,pydev
How often do you need to reload the application?, the dev server will update all your code and configuration changes without need to reload.
0
1
0
1
2011-11-17T15:18:00.000
1
0
false
8,169,561
0
0
1
1
How it possible to speed up debugging in PyDev in Eclipse for Google App Engine programs? How to speed up code execution? How to speed up application reloading? Please share your experience or suggestions.
Is Sentry compatible with Mongodb?
8,323,585
3
3
1,292
0
python,django,mongodb,sentry
Sentry is built on a relational DB, and thus will require such for the foreseeable future. It's possible to implement most things in many NoSQL solutions, but the various types of indexes, and some of the (newer) advanced SQL would be a lot more work. As an example, Sentry 2.0 includes a "Trending" option, which is cal...
0
0
0
0
2011-11-17T22:32:00.000
2
1.2
true
8,175,353
0
0
1
1
Is Sentry (python/django) compatible with Mongodb? If not, is there an easy solution to make it compatible? Thanks guys.
Dynamic Content with a Polling Interval
8,175,486
0
0
199
0
python,html,cgi
I wouldn't write off the javascript polling idea. Consider generating the file and pushing to a CDN. Make sure to let the CDN know you need a specific TTL that meets with the schedule you're generating with as their default TTL will probably be longer than 2 min. The CDN should be awesome at serving static content an...
0
0
1
0
2011-11-17T22:39:00.000
1
1.2
true
8,175,406
0
0
1
1
I plan to run a webserver with some content generated through a Python script. I have a script that generates the data I would want to present at the moment that polls every 2 minutes with a fairly large request. How can I put this data onto a webpage without making voluminous numbers of requests? I can think of a few ...
Java abstract/interface design in Python
8,181,715
6
48
23,337
0
java,python,interface,abstract-class
I'm not that familiar with Python, but I would hazard a guess that it doesn't. The reason why interfaces exist in Java is that they specify a contract. Something that implements java.util.List, for example, is guaranteed to have an add() method to conforms to the general behaviour as defined on the interface. You cou...
0
0
0
0
2011-11-18T11:21:00.000
4
1
false
8,181,576
1
0
1
1
I have a number of classes which all share the same methods, only with different implementations. In Java, it would make sense to have each of these classes implement an interface or extend an abstract class. Does Python have anything similar to this, or should I be taking an alternative approach?
using python like php with nginx
10,713,125
1
1
3,316
0
python,nginx,php
You can try uwscgi. Easy to config and high performance.
0
0
0
1
2011-11-18T16:10:00.000
4
0.049958
false
8,185,374
0
0
1
1
We are currently using nginx as a web server along with PHP-FPM as the php application service. We have a small application which needs to be built but must use Python3. Is their a similar option to use for Python?
How can I delete the automatic Indexes in App Engine?
8,186,860
3
2
185
0
python,google-app-engine,google-cloud-datastore
vacuum_indexes is only for indexes defined in index.yaml, for automatic index its enough to set indexed = False and uploaded a new version. You can see the impact of setting indexed to False in the development server datastore page in the write counts column.
0
1
0
0
2011-11-18T16:45:00.000
2
1.2
true
8,185,834
0
0
1
2
So I have a live Python application on App Engine that has far too many automatic indexes. I noticed a high amount of datastore writes for my low entity count and I believe this is the cause. Each entity has many StringProperties and some even have StringListProperties. I added the indexed = False to all my object's pr...
How can I delete the automatic Indexes in App Engine?
8,189,761
1
2
185
0
python,google-app-engine,google-cloud-datastore
To get rid of the existing automatic indices you will have to retrieve every single entity and re-put it with the indexed = False properties. If you don't do this, then the automatic indices will stick around. However, the new entities you create will not be added to those indices.
0
1
0
0
2011-11-18T16:45:00.000
2
0.099668
false
8,185,834
0
0
1
2
So I have a live Python application on App Engine that has far too many automatic indexes. I noticed a high amount of datastore writes for my low entity count and I believe this is the cause. Each entity has many StringProperties and some even have StringListProperties. I added the indexed = False to all my object's pr...
e-commerce in Tornado (non-blocking) VS Flask (WSGI)
8,203,022
2
4
2,594
0
python,e-commerce,wsgi,flask,tornado
Not an answer but as an alternative way django with satchmo is very suitable for that sort of projects.
0
1
0
0
2011-11-19T21:06:00.000
3
0.132549
false
8,197,345
0
0
1
1
am trying to develop a e-commerce plateforme using python and nosql, as framework i'm between two: tornado and flask; so my question is simple: Which one is suited for e-commerce: WSGI-like application (using Flask) or a non-blocking application (using Tornado)? NB: the e-commerce will manage products, and users (with...
Django Ldap authentication timed out
8,203,175
0
0
1,269
0
python,django,ldap,nginx
Active Directory does not allow anonymous binds for authorization; you can bind anonymously but you cannot do anything else. Check if the user that is being used to bind with AD has valid credentials (ie, the account hasn't expired). If it has, you'll get these strange errors.
0
0
0
0
2011-11-20T11:25:00.000
1
0
false
8,201,185
0
0
1
1
I am hosting a django-based site on a local machine (I have full access/control to it). This site authenticates users against a remote active directory via the django ldap plugin. authenticating against LDAP server used to work! Now, when trying to authenticate against the LDAP server, the request just hangs until it t...
Is it possible to serve a dynamic (with static files) web app in python as a single package with no other dependencies?
8,298,097
0
2
623
0
python,packaging,cherrypy,flask
Well assuming you can make your friends install python on their computer, couldn't you just do a zip file with your own code with its dependencies bundled with it, similarly to how virtualenv isolates your project's dependencies from the global ones? If you use the builtin dev server, it would be as simple as them doub...
0
0
0
0
2011-11-21T09:34:00.000
3
0
false
8,209,748
0
0
1
1
Lets say you have a friend who knows how to type python run.py according to your instructions (or double click it). Thats it. The friend doesnt know what apache or nginx is, but needs to server the web application for sharing movies/music with me and other friends. Now you want to make a package containing your script...
django memcahed for post form generated page
8,219,956
0
0
71
0
python,django,post,memcached
Short: Yes Not so short (but vague because of a vague question): First, find a way to build a cache key from the form values. Then on form submit, create the key and look in the cache and if there is no content with that key, create, store and return it. If there is content, return that. Maybe add and expiration time.
0
0
0
0
2011-11-21T20:02:00.000
2
0
false
8,217,798
0
0
1
2
Is it possible to use django and memcached for dynamic page that are generated by POST form method? The reason I'd like to do this because some of my pages are taking long time for processing while the form input from users are occasionally simillar.
django memcahed for post form generated page
8,220,837
0
0
71
0
python,django,post,memcached
Keep in mind, you also don't have to cache the entire page. One strategy we've tried at our shop is rendering expensive snippets of HTML and storing them in memcached so that they can be included dynamically. To do that, you wouldn't do render_to_response, but you would do manual rendering with Context and the templat...
0
0
0
0
2011-11-21T20:02:00.000
2
0
false
8,217,798
0
0
1
2
Is it possible to use django and memcached for dynamic page that are generated by POST form method? The reason I'd like to do this because some of my pages are taking long time for processing while the form input from users are occasionally simillar.
Advice: Python Framework Server/Worker Queue management (not Website)
8,220,985
0
0
552
0
python,message-queue,rabbitmq,worker
How about using pyro? It gives you remote object capability and you just need a client script to coordinate the work.
0
1
0
0
2011-11-21T22:22:00.000
1
0
false
8,219,355
0
0
1
1
I am looking for some advice/opinions of which Python Framework to use in an implementation of multiple 'Worker' PCs co-ordinated from a central Queue Manager. For completeness, the 'Worker' PCs will be running Audio Conversion routines (which I do not need advice on, and have standalone code that works). The Audio con...
Average PHP developer wanting to move to Python+Django : Directly go with Django or learn the MVC Framework stuff in PHP first?
8,221,221
1
1
789
0
php,python,django,cakephp,frameworks
Well, here's some info that may help along the way: Don't categorize everything that has routes, controllers, views, etc as "MVC". Django, for example, is self-described as MTV. Django is a fantastic framework and does lots of things well. You will find that the Django and Python library and community is much more "ba...
0
0
0
0
2011-11-22T02:02:00.000
2
0.099668
false
8,221,077
0
0
1
2
As a student in web development, I work with PHP, mainly through CMSs. I already know the basic knowledge on the famous MVC design pattern, but now would like to work with a framework. I've just discovered RoR and Django (respectively Ruby & Python Frameworks) and my first experiments with these frameworks, coupled to ...
Average PHP developer wanting to move to Python+Django : Directly go with Django or learn the MVC Framework stuff in PHP first?
8,221,162
3
1
789
0
php,python,django,cakephp,frameworks
The shortest path to Python/Django is to learn Python/Django. If you invest time in learning something different, it will just create some preconceptions that may not hold in a Python/Django environment.
0
0
0
0
2011-11-22T02:02:00.000
2
1.2
true
8,221,077
0
0
1
2
As a student in web development, I work with PHP, mainly through CMSs. I already know the basic knowledge on the famous MVC design pattern, but now would like to work with a framework. I've just discovered RoR and Django (respectively Ruby & Python Frameworks) and my first experiments with these frameworks, coupled to ...
Debug PyDev+Eclipse - Code not reloads after code change in breakpoint/suspend mode
8,224,704
5
5
886
0
python,debugging,google-app-engine,pydev
The way the debug works is not by executing the source line-by-line. The debug "compiles" your source to bytecode (the .pyc files) and execute those, not your source. The debug only keeps track of what piece of the .pyc files correspond to what line of your .py ones and display that information for your convenience, bu...
0
1
0
0
2011-11-22T09:33:00.000
1
1.2
true
8,224,592
0
0
1
1
I often doing such steps and want to optimize debug speed: I am setting some breakpoints. I am running Google Appengine Application (Python 2.5.2+). When breakpoint occur I often change code to fix bugs. After code change want to test again but there is problem if I changed code in breakpoint/suspend mode the applica...
Accessing Django Runserver on Shared Hosting
8,252,044
0
3
5,897
0
python,django,django-admin,timeout,shared-hosting
First, a webserver typically has at least two "interfaces", each with one or more IPs. The "loopback" interface will have the IP 127.0.0.1, and is ONLY accessible from the machine running the server. So, running on 127.0.0.1:8000 means that you are telling runserver to be accessible ONLY from that server itself, on po...
0
0
0
0
2011-11-24T00:27:00.000
4
0
false
8,250,936
0
0
1
2
I'm developing a Django application on a shared hosting service (hostmonster) and am, of course, unable to access the runserver on the default localhost ip of 127.0.0.1:8000 over Firefox. The Django Project site's documentation details how to set up remote access to the run-server, but I'm not having any success with t...
Accessing Django Runserver on Shared Hosting
8,252,018
0
3
5,897
0
python,django,django-admin,timeout,shared-hosting
I'm betting that port 8000 is blocked. That explains the timeouts you mention in the last couple sentences: the firewall is set to simply drop the packets and not return any connection refusal responses. You're going to have to ask your hosting company if there's a way around this, but there might not be one. At the le...
0
0
0
0
2011-11-24T00:27:00.000
4
0
false
8,250,936
0
0
1
2
I'm developing a Django application on a shared hosting service (hostmonster) and am, of course, unable to access the runserver on the default localhost ip of 127.0.0.1:8000 over Firefox. The Django Project site's documentation details how to set up remote access to the run-server, but I'm not having any success with t...
Django design patterns - models with ForeignKey references to multiple classes
8,515,995
0
0
235
0
python,django,django-models
I think its perfectly reasonable to create a "through" table such as location, which associates an asset, a content (foreign key) and a content_type (warehouse or shipment) . And you could set a unique constraint on the asset_fk so thatt it can only exist in one location at a time
0
0
0
0
2011-11-25T22:07:00.000
2
0
false
8,274,664
0
0
1
2
I'm working through the design of a Django inventory tracking application, and have hit a snag in the model layout. I have a list of inventoried objects (Assets), which can either exist in a Warehouse or in a Shipment. I want to store different lists of attributes for the two types of locations, e.g.: For Warehouses, ...
Django design patterns - models with ForeignKey references to multiple classes
8,515,865
1
0
235
0
python,django,django-models
what about having a generic foreign key on Assets?
0
0
0
0
2011-11-25T22:07:00.000
2
1.2
true
8,274,664
0
0
1
2
I'm working through the design of a Django inventory tracking application, and have hit a snag in the model layout. I have a list of inventoried objects (Assets), which can either exist in a Warehouse or in a Shipment. I want to store different lists of attributes for the two types of locations, e.g.: For Warehouses, ...
Migrate a legacy DB to Django, with image files
8,280,938
0
1
438
1
python,django,data-migration,filefield
One approach would be to create a utility django project specifying your legacy database in settings.py. Then use the inspectdb management command to create a django model representation of your legacy database. And finally use dumpdata to get you data in JSON format. You could then finally make your own JSON script th...
0
0
0
0
2011-11-26T19:05:00.000
1
0
false
8,280,859
0
0
1
1
I have a SQL dump of a legacy DB, and a folder with images, and those are referenced by some rows of certain tables, and I need to migrate that data to the new Django models. The specific problem is how to "perform" the upload, but in a management command. When the table with the field referenced is migrated to it's co...
Google App Engine handling parallel requests
8,282,420
2
0
210
0
python,google-app-engine,webserver,parallel-processing
The Python dev_appserver is single-threaded and only serves one request at a time. The production environment, naturally, has no such restriction.
0
1
0
0
2011-11-26T20:58:00.000
1
1.2
true
8,281,565
0
0
1
1
I am using Google App Engine for the first time, whenever I make requests using two instances of the application, the responses come sequentially.. For example, I opened two pages of the app's main page, made an AJAX request from one then refreshed the other, the page doesn't load until the first page gets its respons...
Django manage.py localization
8,287,296
2
1
114
0
python,django
It depends on who are you working with. Personally I prefer having output of developer's stuff in english, even though it is not my native language. I think that anyone who is a professional developer has some grasp of english, and the fact is that it is much easier to find potential errors posted in english than in an...
0
0
0
0
2011-11-27T16:24:00.000
1
0.379949
false
8,287,017
0
0
1
1
It is comfortable for somebody to read messages on native language. Is it a good idea to add localization for output of manage.py in Django?
Python 2.7 32-bit install on Win 7: No registry keys?
8,290,228
7
6
4,206
0
python,windows,registry,installation
32-bit applications installed on 64-bit OSes store their registry values in: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node. If you look there, you should see the settings you are looking for.
0
0
0
0
2011-11-27T23:09:00.000
1
1.2
true
8,289,859
1
0
1
1
I have downloaded the Python 2.7.2 Windows x86 32-bit MSI from python.org and installed it on a 64-bit Windows 7 system. Everything works (at least the command-line interpreter starts and runs), but the install process does not create any Python entries under HKEY_LOCAL_MACHINE/SOFTWARE in the Windows registry. Variou...
Image in the HTML email message
8,301,559
1
0
431
0
python,html,mime-types,sendmail,mime-message
You need to write src="cid:ContentId" to refer to an attached image, where ContentId is the ID of the MIME part.
0
0
1
1
2011-11-28T19:53:00.000
2
0.099668
false
8,301,501
0
0
1
2
I am working with a Python function that sends mails wich include an attachment and a HTML message......I want to add an image on the HTML message using <img src="XXXX"> When I try it, the message respects the tag, but does not display the image I want (it displays the not found image "X")..... does anyone know if thi...
Image in the HTML email message
8,301,539
1
0
431
0
python,html,mime-types,sendmail,mime-message
In your html you need the fully qualified path to the image: http://yourdomain.com/images/image.jpg You should be able to take the URL in the image tag, paste it into the browser's address bar and view it there. If you can't see it, you've got the wrong path.
0
0
1
1
2011-11-28T19:53:00.000
2
1.2
true
8,301,501
0
0
1
2
I am working with a Python function that sends mails wich include an attachment and a HTML message......I want to add an image on the HTML message using <img src="XXXX"> When I try it, the message respects the tag, but does not display the image I want (it displays the not found image "X")..... does anyone know if thi...
phonetic spelling in Python and Java
8,546,969
1
8
5,615
0
java,python,text-processing,text-mining,spelling
Are you looking for something akin to the international phonetic alphabet (IPA) or some other phonetic output? If ARPAbet is ok, there is the CMU pronouncing dictionary (http://www.speech.cs.cmu.edu/cgi-bin/cmudict). That'll give the ARPAbet rendering of most words in English. I've written some code that converts the A...
0
0
0
1
2011-11-28T21:26:00.000
4
0.049958
false
8,302,553
0
0
1
1
I am trying to build a system that accepts text and outputs the phonetic spelling of the words of this text. Any ideas on what libraries can be used in Python and Java?
Corba python integration with web service java
8,310,341
4
0
375
0
java,python,web-services,corba
You will need a Java CORBA provider - for example IONA or JacORB. Generate the IDL files for your python service and then use whatever IDL -> stub compiler your Java ORB provides to generate the java client-side bindings. From there it should be as simple as binding to the corbaloc:// at which your python server is ru...
0
0
1
0
2011-11-29T11:55:00.000
1
0.664037
false
8,310,262
0
0
1
1
i'm working on a project thata i need develop one web service ( in java ) that get one simple number from a Corba python implementation... how can i proceed with this?? im using omniOrb and already done the server.py that genetares one simple number! thx a lot
Print HTML text of a selenium webelement in Python
8,316,622
12
6
7,324
0
python,selenium,beautifulsoup,web-scraping,urllib2
It's not possible to get the raw HTML from a WebElement. You can get the page source from the browser object though: browser.page_source.
0
0
1
0
2011-11-29T18:54:00.000
1
1.2
true
8,316,152
0
0
1
1
I am using Selenium webdriver in Python for a web-scraping project. How to print the HTML text of the selenium.WebElement ? I intend to use the BeautifulSoup to parse the HTML to extract the data of interest. Thanks
django manage.py settings default
8,318,788
1
15
12,459
0
python,django
You can use django-admin.py with that environment variable. Commands are interchangeable, only django-admin.py doesn't override the variable you're trying to use.
0
0
0
0
2011-11-29T22:31:00.000
5
0.039979
false
8,318,688
0
0
1
1
I have a settings.py file and a dev_settings.py file that I use to override some values for dev purposes. Everytime I run the ./manage.py command, I have to specify --settings=whatever.local_settings. This becomes very tedious to do every time and I am trying to find a way to force manage.py to load my dev_settings.p...
Django. Business Logic Bottlenecks.
8,328,308
0
0
562
0
python,django,performance,views
Do you use the django debug toolbar ? You could find what queries are run with it, middleware or not. How do you monitor the performance of the view ? Are there much more users in the big project than in the fresh one ?
0
0
0
0
2011-11-30T14:16:00.000
4
0
false
8,327,300
0
0
1
1
Is there any smart way to find bottlenecks in business logic. For example, we have application, that have one view that doing HttpResponse('1') in big project. We are sure, that no SQL queries in middlewares exists. But HttpResponse working really slow(50 rps vs 200 rps on clear django project). What reasons can be? ...
how to password protect a website hosted on gunicorn
8,342,278
1
4
3,648
0
python,django,gunicorn
You can also use middleware and for example kill every session and show nothing if it not passes the requirements. For example, you can define middleware which checks if the request comes from the IP you use, if yes - do nothing, if no - stop. Maybe not the best, but solution :)
0
0
0
1
2011-12-01T12:59:00.000
2
0.099668
false
8,341,797
0
0
1
1
Is there a way to password protect an application which is hosted in gunicorn, I did this with .htaccess in apache, but can we do this in gurnicorn?
Architecture: I have to make available object properties that that is updated every couple seconds
8,348,956
0
1
62
0
python,twisted
I think either you create an selfCreatedObject or using a memcached once, it will be an instance of python objects, like list or dict or anything else so the two ways are to same destination. I prefer to use object so you can make a check the change of the object value or validate it if needed.
0
1
0
0
2011-12-01T21:41:00.000
2
0
false
8,348,687
0
0
1
2
My app maintains the state of a bunch of objects with variables. I'm using Twisted to accept socket requests and return the properties of an object. I want to make sure the app can scale for a lot of requests so I'm wondering if I should deliver the object properties directly from the objects, or if I should store thos...
Architecture: I have to make available object properties that that is updated every couple seconds
8,348,947
0
1
62
0
python,twisted
I don't think you have any performance penalty because of having many reading operations from the same object (only one thread is executed at a time after all).
0
1
0
0
2011-12-01T21:41:00.000
2
0
false
8,348,687
0
0
1
2
My app maintains the state of a bunch of objects with variables. I'm using Twisted to accept socket requests and return the properties of an object. I want to make sure the app can scale for a lot of requests so I'm wondering if I should deliver the object properties directly from the objects, or if I should store thos...
Eclipse & Python: 100% CPU load due to PythonHome reindexing
10,102,742
1
0
706
0
python,eclipse,cpu,pydev
Disable 'Build Automatically' and 'Refresh Automatically' under Preferences->General->Workspace Disable 'Code Analysis' entirely, or configure it to only run on save under Preferences->PyDev->Editor->Code Analysis
0
1
0
1
2011-12-02T16:17:00.000
2
0.099668
false
8,359,291
0
0
1
1
I am currently switching from Eclipse Java Development more and more Python scripting using PyDev. Almost all the time there is a Eclipse backgropund thread called "reindexing PythonHome..." which loads my CPU for almost 100%. Unusable to coding in there anymore :/ Do you have any idea? Thanks a lot for your help! John
Highlighting glossary terms inside a HTML document
8,366,996
-1
1
689
0
javascript,python,highlighting,glossary,glossaries
How about going through each term in the glossary and then, for each term, using regex to find all occurrences in the HTML? You could replace each of those occurrences with the term wrapped in a span with a class "highlighted" that will be styled to have a background color.
0
0
1
0
2011-12-03T09:59:00.000
3
-0.066568
false
8,366,909
0
0
1
1
We have a glossary with up to 2000 terms (where each glossary term may consist of one, two or three words (either separated with whitespaces or a dash). Now we are looking for a solution for highlighting all terms inside a (longer) HTML document (up to 100 KB of HTML markup) in order to generate a static HTML page with...
Filtering GMail messages in Google App Engine application
8,373,562
0
3
487
0
python,django,google-app-engine,gmail
What do you mean by "fully connected"? It's possible to set up a GMail filter to forward emails to a different address (say, the email address of your App Engine app). And an App Engine app an send emails (say, to a GMail address). The trick is to set up the GMail filter carefully to avoid loops.
0
1
0
1
2011-12-03T11:39:00.000
2
1.2
true
8,367,381
0
0
1
2
I would like to build an application in Google App Engine (Python) that would be fully connected to a single GMail account and then filter e-mails from this account (e.g. filter messages for a certain string and show it on the string). In the future I am also going to implement the option to send messages. What is the ...
Filtering GMail messages in Google App Engine application
8,379,161
0
3
487
0
python,django,google-app-engine,gmail
There is no Api for Gmail in App Engine. The only thing you can do is forwarding messages to App Engine. I have used fowarding for building auto responders. But there is an excellent GMail Api in Google Apps Script with lots of functions. Apps scrips uses javascript. And ofcourse your apps script can communicate with A...
0
1
0
1
2011-12-03T11:39:00.000
2
0
false
8,367,381
0
0
1
2
I would like to build an application in Google App Engine (Python) that would be fully connected to a single GMail account and then filter e-mails from this account (e.g. filter messages for a certain string and show it on the string). In the future I am also going to implement the option to send messages. What is the ...
python po box split for auth.net
8,725,779
0
1
422
0
python,regex
The regular expression '(P[\.\s]*O[\.\s]*Box)?\s*(\d+)\s*(P[\.\s]*O[\.\s]*Box)?' will match almost anything that looks like a PO Box (but will match a number only address too). The replacement '\2 PO Box' would normalize the data. So the code would be something like this import re rgx = re.compile(r'(P[\.\s]*O[\.\s]*B...
0
0
0
0
2011-12-03T19:00:00.000
1
0
false
8,370,147
1
0
1
1
Authorize.net ( or the banks ) will not validate an address unless for a PO Box address, unless its in the form of 123 P.O. Box. Most people use P.O Box 123. There are loads of variations PO Box formats and I need an algorithm that puts the number in front of the PO Box Any suggests would be helpful.
Google App Engine and win32 DDE
8,405,511
1
1
367
0
python,google-app-engine,pywin32,dde
The problem was not on the GAE development server: I managed to uninstall the win32 python build 216 library and install a previous version. The problem was indeed with the manifest of the build 216 and not with the GAE development server. Now it works fine with build 214.
0
1
0
0
2011-12-05T10:40:00.000
1
0.197375
false
8,384,052
0
0
1
1
I'm trying to set up a little server through the App Engine Python development server: GOAL: On Windows I've got a DDE application. I need to read data from this application and serve it over the Internet. SITUATION: The development server is working correctly on port 80, enabling me to store data and make it available...
Conditional formatting using ruby or python
8,778,840
1
0
428
0
python,ruby,google-sheets
This is not currently possible, Google does not let python or ruby runs in the browser. Conditional formatting is currently limited to simple rules based on cell contents. Google has recently rolled macros ability in their spreadsheets but that is limited to JavaScript and does not support conditional formatting.
0
0
0
0
2011-12-06T07:20:00.000
1
1.2
true
8,396,511
0
0
1
1
Does anybody know how to apply conditional formatting to a google spreadsheet document using ruby or python?
Error in PIL installed with PIP - Django,Python
8,402,859
1
3
4,607
0
python,django,macos,python-imaging-library,pip
My fix for this is to make sure you have packages libjpeg-dev and libpng-dev installed before doing the pip install of PIL. sudo apt-get install libjpeg-dev libpng-dev will probably do. Then pip gets PIL from source, compiles with jpeg and png support.
0
0
0
0
2011-12-06T13:59:00.000
4
0.049958
false
8,401,085
1
0
1
1
I installed PIL using PIP. However, using PIL on Django, when trying to upload a .jpg file, I get the error: Upload a valid image. The file you uploaded was either not an image or a corrupted image. I read on the Internet about this error and a solution was to delete the compiled files for the current OS, then use se...
Installing PIL with JPEG support on Mac OS X
8,409,103
3
37
36,574
0
python,django,python-imaging-library,libjpeg
Worth noting and good information to have whenever working with Python and PIL: If you use virtualenv (and I think it's a very good idea), PIL may not correctly detect the image libraries on your system and install without JPEG/PNG support. Use the pillow package for a compatible PIL fork that finds them correctly.
0
0
0
0
2011-12-06T18:34:00.000
7
0.085505
false
8,404,956
1
0
1
1
I posted a question before regarding this subject, and read other ones posted before, but none has successfully solved my problem. I am trying to install PIL on Mac OS X Lion, as I need it for a Django application. I also need JPEG support, so I need a JPEG decoder as well. I have tried to download the libjpeg sources ...
Passing form parameters between views in Pyramid
8,409,714
5
2
921
0
python,forms,pyramid
This is not a Pyramid-specific answer, but two common approaches to this problem are: Store the data in a session. Store the data as a hidden form on the confirmation page, and resubmit with "confirmed" I like 2 much better because it's a stateless method. You can also use the exact same form processing logic, and j...
0
0
0
0
2011-12-07T02:02:00.000
1
1.2
true
8,409,521
0
0
1
1
I am creating a form that requires user confirmation before submitting the data. I would like a seperate confirmation page because I need to display quite a bit information about how the form data will be processed. I was wondering if there was a pythonic way to pass data between forms in Pyramid. Submitting the form ...
Python/Javascript: WYSIWYG html editor - Handle large documents fast and/or design theory
8,413,073
1
2
1,587
0
python,html,wysiwyg
Can i suggest a complete another approach ? Since your ebook is only <p></p>: Split the text on <p></p> to get an indexed array of all your paragraphs Make your own pagination system, and fill the screen with N paragraphs, that automatically get enough text to show from the indexed array When you are doing selection, ...
1
0
0
1
2011-12-07T08:17:00.000
1
0.197375
false
8,412,215
0
0
1
1
Background: I am writing an ebook editing program in python. Currently it utilizes a source-code view for editing, and I would like to port it over to a wysiwyg view for editing. The best (only?) html renderer I could find for python was webkit (I am using the PyQt version). Question: How do I accomplish wysiwyg editin...
backup msSQL stored proc or UDF code via Python
8,414,549
1
0
244
1
c#,python,sql-server,stored-procedures,smo
There is no easy way to access SMO from Python (because there is no generic solution for accessing .NET from Python), so I would write a command-line tool in C# and call it from Python using the subprocess module. Perhaps you could do something with ctypes but I have no idea if that's feasible. But, perhaps a more impo...
0
0
0
0
2011-12-07T09:00:00.000
1
0.197375
false
8,412,636
0
0
1
1
The idea is to make a script that would get stored procedure and udf contents (code) every hour (for example) and add it to SVN repo. As a result we have sql versioning control system. Does anyone know how to backup stored procedure code using Python (sqlAlchemy, pyodbc or smth). I'v done this via C# before using SQL ...
Filter POST data in Django
8,418,076
1
0
688
0
python,django,django-models
django takes care of safely storing strings in the database. html is a worry when displaying to the user, and django provides some help there as well, escaping html unless explicitly told not to
0
0
0
0
2011-12-07T15:36:00.000
2
1.2
true
8,417,971
0
0
1
1
I have a view in django that is going to save HTML data to a model, and I'm wondering how I might go about filtering it before saving it to the model? Are there built in functions for it? I know there are template filters, but I don't think those help me in this case. What I'll be doing is getting the content of a div ...
Dynamically reload the URLConfs for a running site
8,421,524
5
3
203
0
python,django
Your question starts from a premise that most Django programmers wouldn't accept: that you can or should create URLs dynamically from the database. If you're doing that, you're doing it wrong. Your URL patterns are part of the code, not the data. Obviously, the URLs themselves are formed by combining the patterns with ...
0
0
0
0
2011-12-07T17:23:00.000
2
1.2
true
8,419,669
0
0
1
1
I have a django site. Like all standard sites, it uses URLConfs to associate URLs with views. However, in addition to that, I have some URL configs which I dynamically generate from data in the database. Everything works as I would like it. Is it possible to reload all the URLConfs while the site is running, from code?...
Python Pip vs Ruby Gems
8,507,138
0
5
3,102
0
python,ruby,rubygems,pip
I think you should raise your problem about gem/debian and what are you going to do with it specially. I am using pip and debian now and still no problem by now.
0
1
0
1
2011-12-08T16:04:00.000
1
0
false
8,433,881
0
0
1
1
I mostly do work in Python, but I have been using some of the Ruby stuff for Server Configuration Management (ie Puppet and Chef). I also use Ubuntu/Debian as my primary Linux distro for servers. Why is there a weird Debian/Ruby conflict over Gems, and not a similar showdown between Debian/Python over Pip? Personally,...
Is there anything wrong with this password reset procedure?
8,461,239
4
2
647
0
python,security,flask
If I can enter a username and email address, then I can get a reset token for any user of your service emailed to me. Maybe you should check that the email address is one that actually belongs to the user whose password is going to be reset.
0
0
0
0
2011-12-10T13:38:00.000
4
0.197375
false
8,456,886
0
0
1
3
Is there anything wrong with this procedure? Enter in username and email in a reset form. Flask creates a really long random string and stores it into the session under "reset_code". Session will also have a key for "reset_pw_username" Flask sends an email with a link to the path /password_reset/reset_pw_username/res...
Is there anything wrong with this password reset procedure?
8,463,756
1
2
647
0
python,security,flask
As Jean-Paul pointed out, asking for both username and e-mail requires checking whether they both match the same user. Hence it is more common to ask for either username or e-mail, verifying they are in your database, and sending recovery link to appropriate address. Storing the recovery token in session data will lik...
0
0
0
0
2011-12-10T13:38:00.000
4
0.049958
false
8,456,886
0
0
1
3
Is there anything wrong with this procedure? Enter in username and email in a reset form. Flask creates a really long random string and stores it into the session under "reset_code". Session will also have a key for "reset_pw_username" Flask sends an email with a link to the path /password_reset/reset_pw_username/res...
Is there anything wrong with this password reset procedure?
10,258,232
0
2
647
0
python,security,flask
The best solution is use email address as username,then user just have to remember his email address.And you just only have to validate user's email address.
0
0
0
0
2011-12-10T13:38:00.000
4
0
false
8,456,886
0
0
1
3
Is there anything wrong with this procedure? Enter in username and email in a reset form. Flask creates a really long random string and stores it into the session under "reset_code". Session will also have a key for "reset_pw_username" Flask sends an email with a link to the path /password_reset/reset_pw_username/res...
Invoke javascript methods on a page
8,461,984
0
1
119
0
c#,javascript,python,scripting,browser
If you look at the HTTP request header you can determine the user-agent making the request. Based upon that information you can write logic from the server side as to respond with a unique page per detected user-agent string. Then you add any unique JavaScript you want as a static string to be executed by the user-ag...
0
0
0
0
2011-12-11T03:28:00.000
2
0
false
8,461,764
0
0
1
1
Is there a way using either C# or a scripting language, such as Python, to load up a website in the user's default webbrowser and continue to interact it via code (e.g. invoke existing Javascript methods)? When using WinForms, you can host a Webbrowser control and invoke scripts from there, but only IE is supported. Is...
Best Python Web Framework for my API Server Needs
8,466,481
0
3
1,477
0
python,mysql,api,frameworks
Depends on what stage you are at, I would suggest to develop 2 systems because the load to pull data from 3rd party and the load to handle the API would be different. You can scale them into a different types of nodes if you want. Django-Tastypie (https://github.com/toastdriven/django-tastypie) is not bad, it supports...
0
0
0
0
2011-12-11T18:38:00.000
3
0
false
8,466,425
0
0
1
2
I am working on developing two systems: A system that will constantly retrieve economic data from a 3rd party data feed and push it into a MySQL DB (using sqlalchemy) A server that will allow anyone to query the data in the db over a JSON AJAX API (similar to Yelp or Yahoo API for example) I have two main quest...
Best Python Web Framework for my API Server Needs
13,210,600
0
3
1,477
0
python,mysql,api,frameworks
I agree with Anthony, you should look at Web2Py. It is very easy to get started, very low learning cure and easy to deploy on many systems including Linux, Windows and Amazon. So far I have found nothing that Web2Py can not do. But more importantly it does things how you would think they should be done, so if you are n...
0
0
0
0
2011-12-11T18:38:00.000
3
0
false
8,466,425
0
0
1
2
I am working on developing two systems: A system that will constantly retrieve economic data from a 3rd party data feed and push it into a MySQL DB (using sqlalchemy) A server that will allow anyone to query the data in the db over a JSON AJAX API (similar to Yelp or Yahoo API for example) I have two main quest...
Making first name, last name a required attribute rather than an optional one in Django's auth User model
8,473,116
2
11
5,078
0
python,django,forms,validation,authentication
I would definitely go with validating on the form. You could even go as far as having more form validation in the admin if you felt like it.
0
0
0
0
2011-12-11T19:37:00.000
4
1.2
true
8,466,851
0
0
1
1
I'm trying to make sure that the first name and last name field are not optional for the auth User model but I'm not sure how to change it. I can't use a sub class as I have to use the authentication system. Two solutions I can think of are: to put the name in the user profile but it's a little silly to have a field t...
How do I merge results from target page to current page in scrapy?
8,468,824
15
21
10,013
0
python,web-scraping,scrapy
Partially fill your item on the first page, and the put it in your request's meta. When the callback for the next page is called, it can take the partially filled request, put more data into it, and then return it.
0
0
0
0
2011-12-11T21:38:00.000
4
1.2
true
8,467,700
0
0
1
1
Need example in scrapy on how to get a link from one page, then follow this link, get more info from the linked page, and merge back with some data from first page.
How to know if browser has AJAX (Django)
8,468,548
1
0
476
0
python,ajax,django
User agent sniffing and the like is not seen as the best solution... if you can afford that, rather use projects like hasjs on client side to check what the user's browser really is capable and send the information to the server somehow (like, serving the checking page when there is no session, let it do the checks and...
0
0
0
0
2011-12-11T23:38:00.000
4
0.049958
false
8,468,427
0
0
1
2
In my Django application I would like to know if the browser the client is using has AJAX or not. This is because I have, for example, profile editing. I have a version that edits the user's profile in-place and another one that redirects you to an edit page. I know that most browsers have AJAX nowadays, but just to ma...
How to know if browser has AJAX (Django)
8,552,739
0
0
476
0
python,ajax,django
I haven't foun a way to do this, therefore what I could do was prepare a JavaScript-free version and a JavaScript version of my template. I load a .js file, and it replaces all the links to other pages with AJAX links. Therefore, if the user doesn't have JavaScript he will see all the original links and functionality, ...
0
0
0
0
2011-12-11T23:38:00.000
4
0
false
8,468,427
0
0
1
2
In my Django application I would like to know if the browser the client is using has AJAX or not. This is because I have, for example, profile editing. I have a version that edits the user's profile in-place and another one that redirects you to an edit page. I know that most browsers have AJAX nowadays, but just to ma...
Generic CRUD admin for Flask, with WTForms?
8,481,615
2
5
6,567
0
python,admin,web-frameworks,flask,wtforms
The short answer is no, as far as I know, there is no auto-generating ORM for redis or MongoDB. Now for a more detailed explanation: The reason why there exists CRUD generation for 'fixed' ORM's and not datastores based in free-form records is simple: the very nature of free-form records makes it difficult to create a ...
0
0
0
0
2011-12-12T03:18:00.000
3
1.2
true
8,469,596
0
0
1
1
are there any generic CRUD admin for Flask based on WTForms? Currently we are building a hybrid backend system where admin must CRUD lots of data from various source, MongoDB, Redis, ini file, ENVIRON, etc. Writing specific admin view for each of them seems a waste of time, but all Flask admin or WTForms admin solution...