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
Best practice to handle global 500 errors in Django?
11,860,808
0
0
2,163
0
python,django
okay, now I understand how Http404 works. So you have to define this Http500 exception somewhere, and catch it in middleware.
0
0
0
0
2011-04-15T09:36:00.000
2
1.2
true
5,674,902
0
0
1
1
I have a django app running with MySQL and Redis as backend I have a function called redis_helper() to do redis queries. But sometimes Redis crash and needs sometime to bootup, so I need to return a friendly HTTP 500 error message. The problem is, django only defines Http404(Exception) class in django/http/__init__.py...
Parsing html content with python and modifying it
5,675,635
1
1
606
0
python,html,beautifulsoup
Read the BeautifulSoup documentation - and come back if you have real issues.
0
0
1
0
2011-04-15T10:42:00.000
2
0.099668
false
5,675,531
0
0
1
1
I am new to python and i don't know many things.I want to parse an html page,modify it and show it in my own page.I try use beautifulsoup in order to parse html but some errors are generated.I searched on the web but i don't know any specific way to do this.Can anyone help me?
Django Debug Toolbar Only Working for Admin Section
5,685,316
4
8
4,781
0
python,django,django-debug-toolbar
A few tipps without knowing your code: 'debug_toolbar.middleware.DebugToolbarMiddleware' should be your last or second to last middle ware entry (not 100% sure how it works out with the flatpagefallback middleware) 'debug-toolbar' as last in the list of INSTALLED_APPS Double check if the toolbar's assets are loaded Ma...
0
0
0
0
2011-04-16T05:59:00.000
7
0.113791
false
5,684,798
0
0
1
3
Hey, I've been using Django 1.2.1 for some time now and came across Django Debug Toolbar just the other day. It looks really useful and I'm really eager to try some stuff out. I installed exactly how the readme said. Step by Step. I put the middleware at the end just in case things get caught up but I'm using quite sta...
Django Debug Toolbar Only Working for Admin Section
15,992,979
0
8
4,781
0
python,django,django-debug-toolbar
In my case the error was very simple. I removed the footer and it worked like a charm! Hope this solves an issue for somebody else.
0
0
0
0
2011-04-16T05:59:00.000
7
0
false
5,684,798
0
0
1
3
Hey, I've been using Django 1.2.1 for some time now and came across Django Debug Toolbar just the other day. It looks really useful and I'm really eager to try some stuff out. I installed exactly how the readme said. Step by Step. I put the middleware at the end just in case things get caught up but I'm using quite sta...
Django Debug Toolbar Only Working for Admin Section
5,755,603
3
8
4,781
0
python,django,django-debug-toolbar
I had the same problem here, and eventually arrived at this post... Anyway, in my case what I noticed was that I had a javascript error in one of my js included libraries. And that breaked the js interpretation flow. When I fixed the javascript error, the django toolbar worked. That explains why it worked in the admin ...
0
0
0
0
2011-04-16T05:59:00.000
7
0.085505
false
5,684,798
0
0
1
3
Hey, I've been using Django 1.2.1 for some time now and came across Django Debug Toolbar just the other day. It looks really useful and I'm really eager to try some stuff out. I installed exactly how the readme said. Step by Step. I put the middleware at the end just in case things get caught up but I'm using quite sta...
how do you install django older version using easy_install?
21,246,463
5
8
12,466
0
python,django,virtualenv
Since the question was about easy_install, it's useful to know that (with setuptools v2.1) you can specify version numbers with easy_install like you can with pip. Thus: $ easy_install django==1.3 will install django 1.3. This was important for my problem (which Google directed me here to solve), when I needed to ins...
0
0
0
0
2011-04-16T16:51:00.000
3
0.321513
false
5,688,053
1
0
1
1
I just broke my environment because of django 1.3. None of my sites are able to run. So, i decided to use virtualenv to set virtual environment with different python version as well as django. But, seems like if i download the package and install using "sudo python setup.py install" this does not get added to my virtu...
Google App Engine: How to get the offset of an object
5,691,077
2
0
157
0
python,database,google-app-engine
Why not query the data twice? Once for users with a higher score, in descending order. Once for users with a lower score. Fetch five records in each query.
0
1
0
0
2011-04-16T16:54:00.000
2
0.197375
false
5,688,079
0
0
1
1
I am using Google App Engine in Python. In My database, I have some Entity which contain score of user. So I wanted to make a page on the ranking of a particular user. To do that, I need to get the 5 user with the higher score than that user and 5 user with lower score than that user, and also the position of that part...
Using django-facebook to display text on facebook canvas
21,381,966
0
2
1,073
0
python,django,django-facebook
Yeah, very though question. As first advice i suggest you to be sure that you have SSL enabled on the webserver that serve the canvas service. After that you will able to serve static files as canvas page, but not a django view. It is possible but i'm not able to find a workaround.
0
0
0
0
2011-04-17T18:21:00.000
2
0
false
5,695,455
0
0
1
1
I am practicing using django-facebook to integrate my django app with facebook and turn it into a facebook app. The documentation for django-facebook is very bad but I have managed to get my sample app to load the facebook canvas page. But I am unable to display anything on the canvas page. Any advice or suggestions wo...
web.py and flask
5,695,723
43
28
7,454
0
python,flask,web.py
Flask is a new and a very active project with good documentation and guidelines for new development and plugins. Its community is quite large and Armin (the lead) is an A grade programmer. Hence it is definitely the better contender. Web.py is an older and more mature project which is more a library than a framework. ...
0
0
0
0
2011-04-17T18:57:00.000
1
1.2
true
5,695,689
0
0
1
1
For these pythonic web frameworks; They looks similar, except a few minor differences like their url handling schemes. So it is very hard to choose one of them. I want to learn from your experiences that which one more suits for a web application that is small in size, but need long term support (initial application i...
Django Admin : Grouped data in the list
5,699,159
0
8
3,477
0
python,django,admin
What about using list_filter='my_field' in the admin.py file ?
0
0
0
0
2011-04-18T05:39:00.000
2
0
false
5,698,957
0
0
1
1
Can I show a grouped result in Django Admin? By default, they are showing all rows, I want to group these rows based on some fields, and display it. Something like "GROUP BY username" or stuff. I've tried to search but no luck :(
Analyze logfile from GAE
5,699,117
1
0
220
0
python,google-app-engine
I suggest you use Google Analytics on your web app. If you want to do some sort of server-side visitor analaytics (instead of the client-side Javascript that Google Analytics uses), you'd have to store something in a database (BigTable on GAE) and run your own analytics.
0
1
0
0
2011-04-18T06:02:00.000
2
1.2
true
5,699,092
0
0
1
1
Hi My app had visitors and I like to analyze the log file. Can I run a log analyzer program on the log file that google app engine allows us to download? Are third-party programs such as webalizer and visitors compatible? Thank you
MySQL&django hangs on huge session delete
5,703,375
1
1
513
1
python,mysql,django
I am not MySQL expert, but I guess MySQL locks the table for the deleting and this might be MySQL transaction/backend related. When deleting is in progress MySQL blocks the access to the table from other connections. MyISAM and InnoDB backend behavior might differ. I suggest you study MySQL manual related to this: the ...
0
0
0
0
2011-04-18T13:03:00.000
4
0.049958
false
5,703,308
0
0
1
2
I'm running django site with MySQL as DB back-end. Finally i've got 3 millions rows in django_session table. Most of them are expired, thus i want to remove them. But if i manually run delete from django_session where expire_date < "2011-04-18" whole site seems to be hanged - it cannot be accessed via browser. Why suc...
MySQL&django hangs on huge session delete
5,703,378
5
1
513
1
python,mysql,django
If your table is MyISAM, DELETE operations lock the table and it is not accessible by the concurrent queries. If there are many records to delete, the table is locked for too long. Split your DELETE statement into several shorter batches.
0
0
0
0
2011-04-18T13:03:00.000
4
1.2
true
5,703,308
0
0
1
2
I'm running django site with MySQL as DB back-end. Finally i've got 3 millions rows in django_session table. Most of them are expired, thus i want to remove them. But if i manually run delete from django_session where expire_date < "2011-04-18" whole site seems to be hanged - it cannot be accessed via browser. Why suc...
PyMongo vs MongoEngine for Django
6,248,071
1
35
27,617
0
python,django,mongodb,pymongo,mongoengine
mongoengine will use the pymongo driver to connect to mongodb. If you are familiar with django.. use mongoengine
0
0
0
0
2011-04-19T07:14:00.000
4
0.049958
false
5,712,857
0
0
1
2
For one of my projects I prefered using Django+Mongo. Why should I use MongoEngine, but not just PyMongo? What are advantages? Querying with PyMongo gives results that are allready objects, aren't they? So what is the purpose of MongoEngine?
PyMongo vs MongoEngine for Django
5,712,928
21
35
27,617
0
python,django,mongodb,pymongo,mongoengine
I assume you have not read the MongoEngine claim. MongoEngine is a Document-Object Mapper (think ORM, but for document databases) for working with MongoDB from Python. This basically say it all. In addition: your claim that Pymongo would deliver objects is wrong....well in Python everything is an object - even ...
0
0
0
0
2011-04-19T07:14:00.000
4
1.2
true
5,712,857
0
0
1
2
For one of my projects I prefered using Django+Mongo. Why should I use MongoEngine, but not just PyMongo? What are advantages? Querying with PyMongo gives results that are allready objects, aren't they? So what is the purpose of MongoEngine?
Can I extend Jenkins with Jython/Python
5,714,293
0
8
2,437
0
java,python,continuous-integration,jython,jenkins
Since Jython can produce Java classes I see no reason why this should not work. Note that you will need to learn at least some things about Java (mostly the platform, not necessarily the language) in order to be able to write plugins for Jenkins.
0
0
0
0
2011-04-19T09:26:00.000
3
0
false
5,714,263
0
0
1
1
Is it possible to write Jenkins plugins using Python (via Jython), and if so, where would I get started? I don't know Java (and don't have a real interest in learning it at the moment) so being able to use Python would be nice for me.
Accessing key field into Django Template
5,714,546
0
0
125
0
python,google-app-engine,django-templates
There are 2 solutions: You should filter the data before passing it into view You can write additional function in model for retrieving the key if it`s not a field already Can you explain exactly what is **__key__** ?
0
0
0
0
2011-04-19T09:43:00.000
2
0
false
5,714,462
0
0
1
1
How can I access key field of model into django template?
How do I reintroduce South to my Django project?
5,716,010
3
2
538
0
python,django,postgresql,django-south,reinstall
South creates a table in your database to track migrations that have been applied. The table is south_migrationhistory. You probably want to either drop the table (and re-sync your db) or delete it's contents. I imagine at the moment south thinks that it's applied migration that it hasn't, which may be confusing thin...
0
0
0
0
2011-04-19T11:01:00.000
1
1.2
true
5,715,320
0
0
1
1
I'm in the classic position of the novice coder, where in hindsight I'd do many things differently if I were starting my project over. I used South relatively early in my project, ran into some problems due to my lack of knowledge, and abandoned it, removing it from installed apps, and syncing the DB. I then learned ...
Using JRuby or Python to call some 3rd party Java libraries - architecture question
5,723,661
1
0
215
0
java,python,ruby,jruby,jython
I know for a fact that you can call all your Java libraries using JRuby. You can use the ruby programming language on your front and back end via Rails (Rails is a framework written in ruby). The difference between MRI (Matz Ruby) and JRuby is that JRuby runs on the JVM, whereas MRI has its own VM which is different fr...
0
0
0
0
2011-04-19T21:08:00.000
2
1.2
true
5,722,739
0
0
1
1
I am evaluating what I will use on the front and back ends of a project. I definitely will need to use some 3rd party Java libraries, but I am curious whether there is a nice way to do the front and back-end layer in something like Ruby or Python? Or is it possible to just call the Java libraries from Ruby/Python and ...
Can't access MySQL database in Django VirtualEnv on localhost
8,742,834
1
1
1,450
1
python,mysql,django,mysql-error-1045
I found the problem I was having. Django was importing a different settings.py file. I had another django project inside my django product like myproject/myproject/. Instead of importing myproject/settings.py, it was importing myproject/myproject/settings.py I assume that Aptana Studio created that project there. If ...
0
0
0
0
2011-04-20T06:39:00.000
1
1.2
true
5,726,440
0
0
1
1
I have had a virtualenv for Trunk up and running for a while, but now I am trying to branch, and get things setup on another virtualenv for my 'refactor' branch. Everything looks to be setup correctly, but when I try to run any manage.py commands, I get this error: _mysql_exceptions.OperationalError: (1045, "Access den...
Automate WordPress Install from python
5,732,608
0
3
1,206
0
python,wordpress
Urllib is an option, but because your script is running on the local machine anyway, I would probably use os.system. That way you can execute the php script like from a shell. You have to look into the php file on how to pass the parameters.
0
1
0
1
2011-04-20T14:56:00.000
2
0
false
5,732,384
0
0
1
2
I have a python program that sets up a wordpress site on my server. It downloads the zip and unzips it into a directory, sets up the database and user, configures the config file. Now I would like to call the the wp_install function in wp-admin/include/upgrade.php and pass it the parameters it needs $weblog_title, $use...
Automate WordPress Install from python
5,732,698
1
3
1,206
0
python,wordpress
It looks like wp_install() gets called inside of /wp-admin/install.php during step 1, and after form data has been validated. If you submit ?step=1& ... (all of the other required form fields) it should result in calling wp_install. So yes, you should be able to use urllib(2) for this.
0
1
0
1
2011-04-20T14:56:00.000
2
0.099668
false
5,732,384
0
0
1
2
I have a python program that sets up a wordpress site on my server. It downloads the zip and unzips it into a directory, sets up the database and user, configures the config file. Now I would like to call the the wp_install function in wp-admin/include/upgrade.php and pass it the parameters it needs $weblog_title, $use...
How do I replicate "from module import class" with __import__() or django.utils.importlib?
5,737,203
0
0
250
0
python,django
Or import(module,globals(),locals(),['classname',],-1)
0
0
0
0
2011-04-20T17:22:00.000
3
0
false
5,734,186
1
0
1
2
I want to import a class from python module. The module contains multiple classes and which one I need is determined by a string at runtime. Edit: I'm using python 2.6.5, django 1.3.
How do I replicate "from module import class" with __import__() or django.utils.importlib?
5,734,239
1
0
250
0
python,django
With judicious use of getattr().
0
0
0
0
2011-04-20T17:22:00.000
3
1.2
true
5,734,186
1
0
1
2
I want to import a class from python module. The module contains multiple classes and which one I need is determined by a string at runtime. Edit: I'm using python 2.6.5, django 1.3.
Django REST browser interface
5,750,681
3
3
2,220
0
python,django,web-services,testing,rest
As the author of django-rest-framework it'd be great to pick your brains about which bits of functionality could do with fleshing out. :) (obv i've got some thoughts of my own and areas I'm planning to work on, but be really good to get some user perspective) Your absolutely right about the API browser not being limite...
0
0
0
0
2011-04-20T21:29:00.000
2
0.291313
false
5,736,868
0
0
1
1
I'm writing a set of REST services for a Django project. I've been using django-rest-framework for a while. Because of its limited functionality I had to switch to django-piston which I quite enjoy. However, django-rest-framework had one really nice feature - it was able to display an admin-like interface for testing t...
SVN Integration with django
5,737,523
6
1
478
0
python,django,svn
You can have a post-commit hook in the svn repo that uses, ideally, a restful interface to your Django app and adds the note. That way your app remains very simple.
0
0
0
0
2011-04-20T22:42:00.000
1
1.2
true
5,737,483
0
0
1
1
I have a small bug tracker written in django. I'd like to integrate it with an svn repository so that when someone commits to svn it will automatically add a note to an issue in the bug tracker. Does anyone have any input on how to best approach this? Should I setup svn hooks? use a cron job and pull from the log?
Export test as python from Selenium IDE
15,879,812
6
10
16,458
0
python,firefox,selenium,selenium-ide
What version of SIDE are you running? If you are running the latest version (1.9), go into options, check the box off for "Enable Experimental Features" and the formats menu should now list Python.
0
0
1
0
2011-04-21T20:14:00.000
3
1.2
true
5,749,321
0
0
1
1
I made several tests in Selenium IDE and saved it as a test suite in the HTML format which works fine for importing back into selenium IDE. Now however I would like to expand these tests using python and when I click export test suite and choose python I get this error Suite export not implemented for the chrome://sel...
pydev does not recognize django installation
17,463,869
2
5
4,493
0
python,django,pydev
I had the exact same problem - only with later versions of the different softwares: Python 3.3.2 and Django 1.5.1 under Eclipse with PyDev 2.7.5. I solved the problem differently: I simply copied the complete Django 1.5.1 folder into the Python "Resources" folder /System/Library/Frameworks/Python.framework/Versions/3...
0
0
0
0
2011-04-21T21:16:00.000
4
0.099668
false
5,749,871
1
0
1
1
I have python 2.6.1 installed with django 1.3 and PyDev 2.0. I am able to import django and print the version from commandline. However, when I try to create a Django project with pydev or even import django I get an error. When creating the django project, I get "Django not found." error. I have tried removing and add...
Capture google app engine logging output
5,758,949
5
3
1,164
0
python,google-app-engine,logging
The default logger sends logging output to stderr. Use your shell's method of redirecting stderr to a file (in tcsh, (dev_appserver.py > /dev/tty) >& your_logfile.txt, your shell may vary.) You can also use the logging module in python to change the logger to send directly to a file if you detect it's running locally (...
0
1
0
0
2011-04-22T17:07:00.000
2
1.2
true
5,757,945
0
0
1
1
How can one view the Google App Engine logs outside the Admin console? I'm developing, so using dev_appserver.py/the Admin Console and would like to see the logs as the records are emitted. I'd like to monitor the logging output in a console with standard Unix tools e.g. less/grep/etc, but there doesn't seem to be an o...
manage.py runserver
34,825,606
3
88
220,548
0
python,django
in flask using flask.ext.script, you can do it like this: python manage.py runserver -h 127.0.0.1 -p 8000
0
0
1
0
2011-04-24T05:20:00.000
9
0.066568
false
5,768,797
0
0
1
3
I am running python manage.py runserver from a machine A when I am trying to check in machine B. The url I typed is http://A:8000/ . I am getting an error like The system returned: (111) Connection refused
manage.py runserver
34,215,336
4
88
220,548
0
python,django
Just in case any Windows users are having trouble, I thought I'd add my own experience. When running python manage.py runserver 0.0.0.0:8000, I could view urls using localhost:8000, but not my ip address 192.168.1.3:8000. I ended up disabling ipv6 on my wireless adapter, and running ipconfig /renew. After this everyth...
0
0
1
0
2011-04-24T05:20:00.000
9
0.088656
false
5,768,797
0
0
1
3
I am running python manage.py runserver from a machine A when I am trying to check in machine B. The url I typed is http://A:8000/ . I am getting an error like The system returned: (111) Connection refused
manage.py runserver
32,757,797
0
88
220,548
0
python,django
I had the same problem and here was my way to solve it: First, You must know your IP address. On my Windows PC, in the cmd windows i run ipconfig and select my IP V4 address. In my case 192.168.0.13 Second as mention above: runserver 192.168.0.13:8000 It worked for me. The error i did to get the message was the use o...
0
0
1
0
2011-04-24T05:20:00.000
9
0
false
5,768,797
0
0
1
3
I am running python manage.py runserver from a machine A when I am trying to check in machine B. The url I typed is http://A:8000/ . I am getting an error like The system returned: (111) Connection refused
How to use Django-filer(asset file manager)?
13,129,716
0
3
1,363
0
python,django,django-filer
Had a similar problem. I had missed that when easy_thumbnails is automatically pulled in by pip, you still have to explicitly add it to your INSTALLED_APPS in settings.py. I spotted this because when I was uploading images, they weren't appearing in the clipboard, and when inspecting the response from the upload, there...
0
0
0
0
2011-04-25T16:17:00.000
2
0
false
5,780,397
0
0
1
1
Can someone point me in the right direction on how to use Django-filer? I have installed the necessary tools for the filer to work and I get the Filer tab in the admin interface, but when I upload an image to the app I am not able to get the preview thumbimage. The image is also uploaded to the Media_root path(Public f...
Is it possible to install py26-mysql without installing mysql5 package?
5,782,960
2
0
182
1
python,mysql,macports
To use py26-mysql you don't need the entire server distribution for MySQL. You do need the client libs, at the very least. If you remove the server, you need to make sure you re-install the base libraries needed by the Python module to function.
0
0
0
0
2011-04-25T20:26:00.000
1
1.2
true
5,782,875
0
0
1
1
I am developing a database based django application and I have installed apache, python and django using macport on a snow leopard machine. I ran into issues installing MySQL with macport. But I was able to successfully install a standalone MySQL server (from MySQL.com). Is it possible to remove the MysQL package insta...
Creating a 3 column HTML table with dynamic data in Django
5,785,403
0
7
11,330
0
python,html,django,xhtml
you can use {% if friends|length == 9 %} to check if you have 9 records.
0
0
0
0
2011-04-26T02:41:00.000
3
0
false
5,785,348
0
0
1
1
I am trying to create a dynamic HTML table with 3 columns and 3 rows. Each column will have 3 records from the database so there will be 9 total records displayed (if they have 9 friends. otherwise just however many they have). I am doing this to mainly display small user profile pictures with their friends' usernames ...
Mechanize and Javascript
5,992,203
6
28
29,397
0
javascript,python,browser,mechanize
Basically if you want something that deals with javascript then you need a real javascript engine, these invariably involve automating a real browser (I'm including headless ones in this). Java’s HtmlUnit doesn't do a very good job as it doesn't use a javascript engine from an actual browser. Phantom JS sounds ideal (a...
0
0
0
0
2011-04-26T16:32:00.000
5
1
false
5,793,414
0
0
1
1
I want to use Mechanize to simulate browsing to a web page with active JavaScript, including DOM Events and AJAX, and so far I've found no way to do that. I looked at some Python client browsers that support JavaScript like Spynner and Zope, and none of them really work for me. Spynner crashes PyQt all the time, and Zo...
How does node.js handle authentication/user systems?
5,794,426
1
3
1,869
0
javascript,python,authentication,node.js
I reviewed the documentation and found no user management system. node.js is a JavaScript server where-as django is an MVC with built-in socket utilities.
0
0
0
0
2011-04-26T17:38:00.000
4
0.049958
false
5,794,238
0
0
1
1
I come from Django's framework, and it has built in "user" system. It takes care of all the registrations, passwords, logins, etc. Does Node.js have this?
web2py: Restrict user to only rows created by the user
5,795,972
1
3
1,415
0
python,web2py
This shouldn't be handled by web2py. Your database is supposed to handle user permissions for this, so you will need to look in the documentation for the db backend you are using. Also, if everyone has a separate user account on your front end that all connect to a single database user, then you won't be able to contro...
0
0
0
0
2011-04-26T19:54:00.000
5
1.2
true
5,795,708
0
0
1
2
I would like to restrict users to database entries only they have created. Is their any standard web2py way of doing this? auth.requires_permission looked good, but it appears to require a hard-coded row id, which doesn't solve my problem.
web2py: Restrict user to only rows created by the user
7,569,764
0
3
1,415
0
python,web2py
Add a 'created_by' field in the db. Insert the user id when inserting the record. Use this to filter while selecting.
0
0
0
0
2011-04-26T19:54:00.000
5
0
false
5,795,708
0
0
1
2
I would like to restrict users to database entries only they have created. Is their any standard web2py way of doing this? auth.requires_permission looked good, but it appears to require a hard-coded row id, which doesn't solve my problem.
modeling user settings in django
5,797,047
0
9
6,716
0
python,django,settings
Either put them in the user profile model, or create another model with a one-to-one to User.
0
0
0
0
2011-04-26T22:06:00.000
2
0
false
5,797,038
0
0
1
1
I would like have additional settings tied to each user in my application (beyond, is_staff, is_admin etc etc). Basically I'd like to have different settings to customize their user experience (ie: don't show tooltips, how many rows to display in results tables, other flags for turning things on or off). Are there best...
Django/Apache/mod_wsgi not using virtualenv's Python binary
5,800,722
2
6
6,113
0
python,django,apache,mod-wsgi,wsgi
I had the same situation in a Pylons app and ended up using /usr/bin binary plus virtualenv site-packages dir instead. Of course it was the same python version...
0
0
0
0
2011-04-27T07:07:00.000
4
0.099668
false
5,800,608
1
0
1
1
I have a virtualenv at /opt/webapps/ff/ with its own Python installation. I have WSGIPythonHome set to /opt/webapps/ff in my Apache config file (and this is definitely getting used in some capacity, because if I set it to a slightly different existing directory and restart Apache I get a 504). But if I e.g. assert Fa...
How to send the text pasted in a textbox of a html webpage to the application written in python in the harddisk?
5,808,829
1
0
77
0
python,html,web-hosting
Here's my suggestion: modify your program to include a button for doing the transformation. When you click it, it should take the contents of the clipboard, do whatever transformation you want, and put the result back on the clipboard. Once you do that, to use it you select the text from the widget, use the keyboard to...
0
0
0
0
2011-04-27T16:55:00.000
2
1.2
true
5,807,715
0
0
1
2
I have a application running in python, i want to send the input taken from the text box of the webpage and send it as input to the application and once again the output of the application which is in text format back to the result page on web. thanks a lot for your time :) :)
How to send the text pasted in a textbox of a html webpage to the application written in python in the harddisk?
5,808,739
0
0
77
0
python,html,web-hosting
Have you tried PyQt4 which has this ability built-in? You can do what you're asking in about ten LOC.
0
0
0
0
2011-04-27T16:55:00.000
2
0
false
5,807,715
0
0
1
2
I have a application running in python, i want to send the input taken from the text box of the webpage and send it as input to the application and once again the output of the application which is in text format back to the result page on web. thanks a lot for your time :) :)
Real time chart (SVG) + AJAX/Javascript/Jquery + StdOut + Python + I dont really know myself
5,809,518
0
1
5,305
0
python,ajax,svg,cgi,charts
I would use JavaScript to create or manipulate an SVG document, with AJAX requests polling the server and getting data back.
0
0
1
0
2011-04-27T18:33:00.000
4
0
false
5,808,819
0
0
1
1
I am not sure how to accurately describe my problem , and right now i have a total mess in my head , so please deal with it and correct me if i am wrong , and i will be for sure. MAIN GOAL: Is to built a real time line chart , which updates itself without web page reloading based on data , which comes from stdout . S...
Python raising _ExpectedFailure for unittests with @unittest.expectedFailure
5,810,407
1
4
665
0
python,unit-testing
I have the problem and I got it to work by deleting the /usr/local/lib/python2.7 and then reinstalling everything from scratch. The reason for this I believe is that python may not have cleared it's python object and cache files(*.pyc, *.pyo) from it's working directory. That is, not YOUR project's directory but where ...
0
0
0
1
2011-04-27T19:16:00.000
1
1.2
true
5,809,333
0
0
1
1
I have two systems running the same set of Django unittests. Some of the tests use the @unittest.expectedFailure decorator. On one system, these are running fine and reporting at the end of the test run OK (expected failures=10, unexpected successes=2). On the other system, the same tests error, but raise _ExpectedFa...
Django for social networking
39,394,293
0
30
24,265
0
python,django
This is not an issue only on Django or python, it's a thing of cloud and software engineering. One server alone may be ok for 10,000 users, given they are not concurrent, also location, are these users in the same city? country? I believe Django is very good and I will use it my self in a similar project, my issue is ...
0
0
0
0
2011-04-27T21:02:00.000
7
0
false
5,810,540
0
0
1
1
I know this is a relatively broad question, but is Django robust enough to build a social network on? I am concerned mainly with performance/speed. For example, for a site with a small user base (<10,000 users), is it possible to create a Django-backed site that would perform at a speed similar to Facebook? What are it...
How do I access user information with django with django-social-auth?
5,815,430
1
0
348
0
python,django,oauth
If I remember correctly they just use the default user model. So just like with the default user object you can create a profile model to store additional information.
0
0
0
0
2011-04-28T05:31:00.000
1
1.2
true
5,814,042
0
0
1
1
My guess is that I am still able to use the user object to get the default information like email or user name. Is this correct? What if I would like to access some more information not specified on django default user object?
How to view crawled unicoded arabic string?
5,821,867
0
1
1,490
0
python,unicode,web-crawler
As others suggested it is not a bad idea to view the file in a browser. Store it in utf-8 (like open('x.html','w').write(x.encode('utf-8'))), as most browsers are well equipped to handle utf-8. In the browser, you may need to change View->Character Encoding to Utf-8. You will need Arabic fonts on your machine, so the ...
0
0
0
0
2011-04-28T06:06:00.000
5
0
false
5,814,324
0
0
1
1
I have crawled some webpages using Python. I ripped off the html tags and only stored some content of those pages as repr(s). Most of those pages are not in English. Now how can I view the crawled content in its original language? For example, the crawler wrote only one line of some Arabic text to a txt file: u'\u0639\...
Python: Need to extract tag content from html page using regex, but not BeautifulSoup
5,814,571
0
0
2,535
0
python,html,regex,tags,substring
Using non greedy matching (*?) can do this easily, at least for your example. re.findall(r'<raw[^>]*?>(.*?)</raw>', DATA)
0
0
1
0
2011-04-28T06:25:00.000
2
0
false
5,814,493
0
0
1
1
I have a requirement wherein I have to extract content inside <raw> tag. For example I need to extract abcd and efgh from this html snippet: <html><body><raw somestuff>abcd</raw><raw somesuff>efgh</raw></body></html> I used this code in my python re.match(r'.*raw.*(.*)/raw.*', DATA) But this is not returning any subst...
What is the best API for registering and configuring domain names?
5,814,951
2
6
4,713
0
python,api,hosting,dns,registration
There is no general API for this. You have to check back with your own domain registration organization. This is specific to the related domain provider.
0
0
1
0
2011-04-28T06:59:00.000
3
0.132549
false
5,814,837
0
0
1
1
I'm trying to make a website that allows you to setup a photo gallery with a custom domain name. Users of the site don't know how to register or configure domain names, so this has to be done for them. User enters desired domain name in a box (we check if it's available) and click 'register' button and our website regi...
Is it possible to reconcile github and docutils buildhtml?
5,863,357
1
0
204
0
python,github,restructuredtext,docutils
Perhaps you can just use a symlink?
0
0
0
0
2011-04-28T12:00:00.000
2
1.2
true
5,818,242
1
0
1
1
Github will parse a reStructuredText file if its extension is .rst. The docutils buildhtml.py will only parse files with the extension .txt, and I can't see an option to change that. This is massively annoying. Is there any way to get Github to recognise .txt files as RST or buildhtml to recognise .rst files?
In Django Admin, how do you have cascaded InlineModelAdmin
5,821,241
0
0
412
0
python,django
If you just want to append some links like in the Restaurant change view, you don't really need to use an inline as this provides a form for changing data. I would probably override change_view in RestaurantAdmin to get a list of the related menus and pass it as an extra_context. And then override the model specific ch...
0
0
0
0
2011-04-28T13:14:00.000
2
0
false
5,819,205
0
0
1
1
Hi I have a list of restaurants (e.g. McDonalds, etc), with menus (e.g Lunch Menu, Dinner Menu), submenus (e.g. Appetizers, Sandwidches, etc.) and dishes (Angus Burger, Chicken Burger, etc.) They are all linked by foreign keys. Is there a way, so that in the Restaurant admin, I have Menu as a tabular inline, with a lin...
How can a flex mxml file being run on server as swf/html file be made non cachable?
5,825,199
0
0
325
0
python,html,apache-flex
The random querystring idea is a good way to make sure the swf is downloaded everytime, but that might not be what you really want to do. Especially if your swf is large in size and it only occasionally needs to update. What I would do is have a service that outputs the most recent version number of my swf. You'll h...
0
0
0
0
2011-04-28T15:19:00.000
2
0
false
5,820,970
0
0
1
1
I have a application developed in flex deployed on server. In the application data is filled by user and saved in cookies so as to be available even when the user closes the application. However if new version of application is released the user can still access the older version saved in the cahe. How can it be assure...
Serialize an entity key to a string in Python for GAE
5,826,255
3
5
1,650
0
python,google-app-engine
str(entity.key()) will return a base64-encoded representation of the key. entity.key().name() or entity.key().id() will return just the name or ID, omitting the kind and the ancestry.
0
0
0
0
2011-04-28T20:47:00.000
4
0.148885
false
5,824,801
1
0
1
1
In the Java low-level API, there is a way to turn an entity key into a string so you can pass it around to a client via JSON if you want. Is there a way to do this for python?
Integrating python webapp with some jar files
5,835,814
0
0
124
0
java,python
You could always run the jar files in a subprocess and use PIPE for IO (or temp files). This works pretty well for us (we are generating PDF from our Django app with flying saucer and iText)
0
0
0
0
2011-04-29T10:09:00.000
2
0
false
5,830,706
0
0
1
1
Hi I have few jar files which are few calculations compiled into jar files. I have a python web app which is supposed to interact with these jar files and get me the data. I have heard that it can be done using the java bridge. Can someone let me know how this could be done or at least point me to the right link.
Is there any wysiwyg app which I can use to make the frontend pages of a sinmple django webapp?
5,830,888
1
0
198
0
python,django
I found all wysiwyg editors I've used are much more confusing to use than just some plain old html. It is super easy to get started. Do it in plain html.
0
0
0
0
2011-04-29T10:16:00.000
3
0.066568
false
5,830,767
0
0
1
1
I've never done any web development before. I'm using django because I'm OK at python. I just want to make a small webapp which does a small task fast...
Limiting one Content item per Member in a Folder on Plone 4
5,843,705
2
7
301
0
python,permissions,plone,zope,archetypes
Well, it is a sort of validation constraint, so maybe add a validator to the title field that in reality does not bother about the title, but checks the user etc.? (I think a field validator is passed enough information to pull this off, if not, overriding the post_validate method or listening to the corresponding even...
0
0
0
0
2011-04-29T13:47:00.000
3
0.132549
false
5,832,899
0
0
1
1
I have created a custom Archetypes content type called "Résumé" and would like to enforce a limitation that lets a Member add only one item of this type inside a folder. Even better would be redirecting the member to the edit page of his or her item, if it already exists in that folder. How can I enforce this limitatio...
Django - South - Is There a way to view the SQL it runs?
5,897,509
50
28
10,745
1
python,database,migration,django-south
You can at least inspect the sql generated by doing manage.py migrate --db-dry-run --verbosity=2. This will not do anything to the database and will show all the sql. I would still make a backup though, better safe than sorry.
0
0
0
0
2011-04-29T14:32:00.000
5
1
false
5,833,418
0
0
1
2
Here's what I want to do. Develop a Django project on a development server with a development database. Run the south migrations as necessary when I change the model. Save the SQL from each migration, and apply those to the production server when I'm ready to deploy. Is such a thing possible with South? (I'd also be ...
Django - South - Is There a way to view the SQL it runs?
5,932,967
2
28
10,745
1
python,database,migration,django-south
I'd either do what Lutger suggested (and maybe write a log parser to strip out just the SQL), or I'd run my migration against a test database with logging enabled on the test DB. Of course, if you can run it against the test database, you're just a few steps away from validating the migration. If it passes, run it aga...
0
0
0
0
2011-04-29T14:32:00.000
5
0.07983
false
5,833,418
0
0
1
2
Here's what I want to do. Develop a Django project on a development server with a development database. Run the south migrations as necessary when I change the model. Save the SQL from each migration, and apply those to the production server when I'm ready to deploy. Is such a thing possible with South? (I'd also be ...
Python scripts in HTML
5,842,534
2
9
49,400
0
python,html
You are mixing up client-side and server-side execution of code. Browsers support only Javascript. Any application-server or Python-based webframework support template language where you can mix HTML and Python in some way or the other.
0
0
0
1
2011-04-30T14:47:00.000
5
0.07983
false
5,842,487
0
0
1
1
Is it possible to write Python scripts in HTML code similarly as you write PHP between <?php ... ?> tags? I'd like to achieve that my Python application will run in the browser. thank you for help
Parsing lines from a live streaming website in Python
5,844,901
1
1
858
0
python,stream,live,urllib
You'll have to periodically re-download the website. Don't do it constantly because that will be too hard on the server. This is because HTTP, by nature, is not a streaming protocol. Once you connect to the server, it expects you to throw an HTTP request at it, then it will throw an HTTP response back at you containing...
0
0
1
0
2011-04-30T21:56:00.000
3
0.066568
false
5,844,870
0
0
1
3
I'm trying to read in info that is constantly changing from a website. For example, say I wanted to read in the artist name that is playing on an online radio site. I can grab the current artist's name but when the song changes, the HTML updates itself and I've already opened the file via: f = urllib.urlopen("SITE") S...
Parsing lines from a live streaming website in Python
5,844,908
0
1
858
0
python,stream,live,urllib
Yes, this is correct approach. To get changes in web, you have to send new query each time. Live AJAX sites do exactly same internally. Some sites provide additional API, including long polling. Look for documentation on the site or ask their developers whether there is some.
0
0
1
0
2011-04-30T21:56:00.000
3
0
false
5,844,870
0
0
1
3
I'm trying to read in info that is constantly changing from a website. For example, say I wanted to read in the artist name that is playing on an online radio site. I can grab the current artist's name but when the song changes, the HTML updates itself and I've already opened the file via: f = urllib.urlopen("SITE") S...
Parsing lines from a live streaming website in Python
5,844,912
1
1
858
0
python,stream,live,urllib
If you use urllib2 you can read the headers when you make the request. If the server sends back a "304 Not Modified" in the headers then the content hasn't changed.
0
0
1
0
2011-04-30T21:56:00.000
3
0.066568
false
5,844,870
0
0
1
3
I'm trying to read in info that is constantly changing from a website. For example, say I wanted to read in the artist name that is playing on an online radio site. I can grab the current artist's name but when the song changes, the HTML updates itself and I've already opened the file via: f = urllib.urlopen("SITE") S...
get_serving_url question
5,848,560
2
0
188
0
python,google-app-engine
No. size=120 is something you could pass as the 2nd argument to the get_serving_url method. =s120 would be something that you append to the URL returned by get_serving_url. The effect is the same: larger images are scaled down, but smaller images are not scaled up.
0
0
0
0
2011-05-01T09:50:00.000
1
1.2
true
5,847,679
0
0
1
1
Hi My question is whether I've understood the usage correctly: Adding =s120 to the url will scale the image to 120 pixels and adding the parameter size=120 will behave differently: It will only shrink images larger than 120 pixels. Is this true? Thank you
If I open and read the file which is periodically written, can I/O deadlock occur?
12,211,059
0
1
773
1
python,linux,performance,io,deadlock
Quick advice, make sure (like, super sure) that you do close your file. So ALWAYS use a try-except-final block for this Remember that the contens of a final block will ALWAYS be executed, that will prevent you a lot of head pain :)
0
1
0
0
2011-05-01T11:55:00.000
2
0
false
5,848,184
0
0
1
1
In my server process, it looks like this: Main backend processes: Processes Huge list of files and , record them inside MySQL. On every 500 files done, it writes "Progress Report" to a separate file /var/run/progress.log like this "200/5000 files done" It is multi-processed with 4 children, each made sure to run on a ...
how to map url with usernames prefixed?
5,848,509
0
2
164
0
python,url,flask
By pointing all the subdomains of that domain to the same website via DNS, and then inspecting the HTTP 1.1 Host header to determine which user website is being viewed.
0
0
1
0
2011-05-01T12:59:00.000
2
0
false
5,848,496
0
0
1
1
Suppose there is a web app name thesite.com. I need to give every user a url of his own. For eg- if alice signs up, she gets a space of her own at the url "alice.thesite.com".. How do I achieve this. Thanks Alice
Using Django minus the web server
5,858,438
0
14
4,303
0
python,django,model-view-controller,qt,hybrid
You'll still have to run the Django app as a web server, but you can restrict it to serve to only localhost or something. And sure, you can use QtWebKit as the client.
0
0
0
0
2011-05-02T14:29:00.000
2
0
false
5,858,392
0
0
1
1
I'm writing a syndication client, with the aim being to have a client for devices, and a web site that has the same functionality. I shall develop the website using Django - this is already decided; the client shall be written in python with both a CLI and a PyQt4 GUI. I have been writing the clinet first, and it's fai...
How can I send a user registration confirmation email using Tornado and MongoDB?
7,483,440
6
5
3,734
1
python,email,tornado
I wonder why you would handle registration like that. The usual way to handle registration is: Write the user info to the database, but with an 'inactive' label attached to the user. Send an email to the user. If the user confirms the registration, then switch the user to 'active'. If you don't want to write to the d...
0
1
0
0
2011-05-02T20:41:00.000
2
1
false
5,862,238
0
0
1
1
I'm working with Tornado and MongoDB and I would like to send a confirmation email to the user when he creates an account in my application. For the moment, I use a simple XHTML page with a form and I send information to my MongoDB database using Tornado. I would like to have an intermediate step which sends an email t...
Deploying an app to users' appspot
5,872,643
0
0
193
0
python,google-app-engine
No. Writing an application that deploys other applications is in violation of the terms of service. Note we don't have any 'hard' limits - those limits that aren't billing enabled can be increased on application to us if you provide a reasonable use-case.
0
1
0
0
2011-05-03T05:19:00.000
5
0
false
5,865,349
0
0
1
3
I am working on a Python App, which runs on App Engine. Is there a way I can publish the app on each customers' appSpot account, so that the App uses the users' cloud storage? Instead of running the App on my AppSpot account and all the users storing the data on my Cloud space?
Deploying an app to users' appspot
5,870,645
1
0
193
0
python,google-app-engine
Yes, absolutely. You just need to have each client create an App Engine account with an application to which you have administrator access. You can adjust the settings on the application to forbid downloads of your code by the other administrators if that's appropriate for your agreement with the client. This also allo...
0
1
0
0
2011-05-03T05:19:00.000
5
1.2
true
5,865,349
0
0
1
3
I am working on a Python App, which runs on App Engine. Is there a way I can publish the app on each customers' appSpot account, so that the App uses the users' cloud storage? Instead of running the App on my AppSpot account and all the users storing the data on my Cloud space?
Deploying an app to users' appspot
5,865,451
1
0
193
0
python,google-app-engine
No, you cannot do that. The app is hosted and run in the administrator's account which would be you. What you can do is, release the source code and point your users do install it in their appspot account, just like creating a new application.
0
1
0
0
2011-05-03T05:19:00.000
5
0.039979
false
5,865,349
0
0
1
3
I am working on a Python App, which runs on App Engine. Is there a way I can publish the app on each customers' appSpot account, so that the App uses the users' cloud storage? Instead of running the App on my AppSpot account and all the users storing the data on my Cloud space?
sqlalchemy identity map question
5,869,588
0
6
2,298
1
python,sqlalchemy,identity-map
So this all depends on how you setup your sqlalchemy connection. Normally what you do is to manage each wsgi request to have it's own threadlocal session. This session will know about all of the goings-on of it, items added/changed/etc. However, each thread is not aware of the others. In this way the loading/preconfigu...
0
0
0
0
2011-05-03T12:35:00.000
2
0
false
5,869,514
0
0
1
1
The identity map and unit of work patterns are part of the reasons sqlalchemy is much more attractive than django.db. However, I am not sure how the identity map would work, or if it works when an application is configured as wsgi and the orm is accessed directly through api calls, instead of a shared service. I would ...
Class-based (generic) views in Flask
5,870,277
11
5
2,127
0
python,web-frameworks,flask,django-class-based-views
Starting with Python 2.6 you can apply the decorators to classes as well. There is no builtin pattern for callable classes because there are too many ways to implement them, but essentially the trick would be to override __call__ on the class and to have a wrapper decorator that instanciates the class. I was planning ...
0
0
0
0
2011-05-03T13:07:00.000
1
1.2
true
5,869,899
0
0
1
1
What's the best way to write generic views using the Flask web framework? Does the @app.route decorator support callable classes? Or am I thinking about this in entirely the wrong fashion? Any help or advice would be greatly appreciated!
Google app engine gql query two properties with same string
10,265,451
0
3
631
1
python,google-app-engine
Note that there is no gain of performance in using Drew's schema, because queries in list properties must check for equality against all the elements of the list.
0
0
0
0
2011-05-03T21:24:00.000
3
0
false
5,875,881
0
0
1
1
I have a data model called Game. In the Game model, I have two properties called player1 and player2 which are their names. I want to find a player in gamebut I don't know how to buil the query because gql does not support OR clause and then I can't use select * from Game where player1 = 'tom' or player2 = 'tom' statem...
Django non blocking email? Downsides to threading.thread or subprocess?
5,877,718
9
5
1,266
0
python,django,multithreading
Offloading the work to some other external process is really the right thing to do, and once you've done it, it's not likely to be the last time you do it. Celery/RabbitMQ is a decent solution, and the nice thing is they're already there. Recent RabbitMQ releases have a decent web-based management app and a decent mana...
0
1
0
0
2011-05-04T01:56:00.000
2
1.2
true
5,877,658
0
0
1
1
I have a django site. Certain actions by the end user send email to the rest of users in a group. When the number of users gets to be > 20 it can add 1-3 seconds to the request cycle, which I don't like. I'd like to be able to send the email from a non-blocking function. I know RabbitMQ and Celery in conjunction ca...
Multi tier architecture implementation on Python
5,880,853
4
0
3,223
0
python
This architecture really makes no sense. You're using Django, a full-stack web framework, for the front end, but not using it for the database. And you're using Pyramid, another full-stack web framework, for the web service side, thus ensuring that you duplicate all the business logic. Much as I am an advocate of Djang...
0
0
0
0
2011-05-04T08:10:00.000
2
0.379949
false
5,880,438
0
0
1
2
I need to create web application, which can be reached by user as regular web site and as XML-RPC web service. Also web site should have mobile version. I'm planning to use next technologies: Django (for web frontends (regular and mobile)). Pyramid (for web service). SQLAlchemy, Memcached (for persistence level) Late...
Multi tier architecture implementation on Python
5,880,567
0
0
3,223
0
python
You should checkout the Turbogears framework as it is composed of several popular components: ORM with sqlalchemy, pylons for logic and support for WSGI, permits support for several templating engines for the frontend... endless. I use it for several web-services behind AJAX-enabled front-ends (like Flex-based apps, am...
0
0
0
0
2011-05-04T08:10:00.000
2
0
false
5,880,438
0
0
1
2
I need to create web application, which can be reached by user as regular web site and as XML-RPC web service. Also web site should have mobile version. I'm planning to use next technologies: Django (for web frontends (regular and mobile)). Pyramid (for web service). SQLAlchemy, Memcached (for persistence level) Late...
jasper reports server?
5,889,020
1
2
2,934
0
python,jasper-reports
Is this scenario plausible with current jasper reports software (open source or similar), Yes. could it be done Yes. and what would be steps in the right direction ? Write a web server in Python. Your web server will allow a user to enter information on a web site and after submitting, data would be transfered...
0
0
0
0
2011-05-04T18:59:00.000
3
1.2
true
5,888,515
0
0
1
1
I would like to generate reports in pdf format with following scenario: people would enter information on a web site and after submitting, data would be transfered to jasper reports server and pdf would be created. Python would be language of choice for my task. Is this scenario plausible with current jasper reports so...
Delete duplicates from GoogleAppEngine Model?
5,890,205
3
4
453
0
python,google-app-engine,google-cloud-datastore,duplicates
Quick? Probably not. If you did want to delete dupes, my approach would be to write a remote_api script. Query the model for all entities, sort by title, and fetch batches of 100. Keep a local Python dictionary of titles. If you encounter a new title, add it to the dictionary. If you encounter a known title, add the en...
0
1
0
0
2011-05-04T21:21:00.000
1
1.2
true
5,890,023
0
0
1
1
I have two Google App Engine Models. I ran my cron's a few times and now there are duplicate entries in my datastore. If it was easy to just delete my entire datastore and upload my data again I would. BUT it took 4 hours to upload last time so I am wondering is there a quick way of deleting entries with duplicate n...
how to combine django and wordpress based on ubuntu and nginx
5,914,160
1
1
1,879
0
python,django,wordpress
If you can get away with running Django and Wordpress as separate apps, you can just use nginx to handle which requests go to which app. For example, if the CMS portion you'd like Wordpress for is only a blog, you could have nginx send example.com/blog/ to wordpress, and anything else to django.
0
0
0
0
2011-05-05T09:50:00.000
4
0.049958
false
5,895,707
0
0
1
1
now I have a site which based on django(the python framework) which can run stable. in this site we need to use wordpress as a cms. the server config on ubuntu and nginx, but i don't know how to combine the django and wordpress together.any tips is wonderful. thanks in advance!
Wrong encoding with Python BeautifulSoup + MySql
5,903,100
2
2
693
1
python,mysql,encoding,urllib2,beautifulsoup
BeautifulSoup returns all data as unicode strings. First triple check that the unicode strings are ccorrect. If not then there is some issue with the encoding of the input data.
0
0
0
0
2011-05-05T19:12:00.000
2
0.197375
false
5,902,914
0
0
1
1
I'm working with the BeautifulSoup python library. I used the urllib2 library to download the HTML code from a page, and then I have parsed it with BeautifulSoup. I want to save some of the HTML content into a MySql table, but I'm having some problems with the encoding. The MySql table is encoded with 'utf-8' charset. ...
How to set up Apache server via an FTP account
5,907,442
1
1
347
0
django,apache,apache2,mod-python
If you only have user level access to the machine (ie: you don't have root), then you won't be able to control what web server runs and you can only control its settings to a limited regard. You will have to consider contacting your provider or looking for a different hosting package if the server doesn't meet you need...
0
0
0
0
2011-05-06T05:51:00.000
1
1.2
true
5,907,312
0
0
1
1
I have developed a web application in Django and would like to go online i have an FTP access to the hosting server I am a beginner to "setting up a website" i would like to know how to install apache on that server and have my application working Kindly provide detailed info as i am newbie, any links or tutorials woul...
Load form data in JavaScript and run something client side
5,922,070
0
1
248
0
javascript,python
It's very unclear what you are looking for. If the question is about server push keywords are WebSockets,Socket.io,Ajax,Comet,Bayeux to start with
0
0
0
0
2011-05-07T15:29:00.000
1
1.2
true
5,922,032
0
0
1
1
The original framework of my app (using Python) is below: user key in keywords in forms. App use the data in forms as parameter to get some results from third-party website. The result which is from third-party website will be analyzed in my app. Then show the result of analyze to user. But there are some problems be...
Python + Django or PHP + Zend Framework
5,932,770
3
3
3,066
0
php,python,django,performance,zend-framework
There is no direct one-to-one step or howto available for migrating PHP+Zend to Python+Django as both are different, different languages and different design models. So, migration is not easy. For other comparison questions you have asked, the answer is it depends upon the use case. But just in case you are comparing ...
0
0
0
0
2011-05-09T05:07:00.000
1
1.2
true
5,932,747
0
0
1
1
when building a web 2.0 application, which one is superior in terms of performance availability of features documentation ease of use Python + Django combination or PHP + Zend combination? Also how easy it is to migrate one to another, so if I have written stuff for PHP + Zend combination how easy is it to move them...
How to call a javascript method from python on SL4A?
5,939,196
2
1
618
0
javascript,android,python,sl4a
You'll need to wait for a refresh event (this would be a custom event) in your JavaScript that is waiting for an event posted from your Python script. The only communication layer between JavaScript and Python is via events.
0
0
0
0
2011-05-09T08:20:00.000
1
1.2
true
5,934,326
0
0
1
1
I am writing an Android app using Python and SL4A. The app uses a webview that I wish to refresh. I plan on doing this by utilising javascript location.replace() within a wrapping doRefresh() javascript function. The problem I have is that I do not know how to call the javascript function from within my main event loop...
Google App Engine : alternate method of get_by_id()
5,989,456
1
1
814
0
python,google-app-engine
The problem disappear by itself after the 2011-05-10, which is the v1.5 launch date. Not sure this problem is related. I didn't change any code, as the get_by_id() was fine all the while and on this few days. Beside, I added a cron job to run the get_by_id() every minutes and try to get the instance alive. From my obse...
0
1
0
0
2011-05-10T06:41:00.000
4
1.2
true
5,946,170
0
0
1
3
By given an entity ID , I will query by models = Model.get_by_id(id). However, I find out that some time it will not return result collectly. Is there any alternative or recommended method to query by entity ID in Google App Engine, python?
Google App Engine : alternate method of get_by_id()
5,949,477
3
1
814
0
python,google-app-engine
If Model.get_by_id(id) returns None, this indicates that you've supplied an invalid ID, not that the method itself is unreliable. It's not inconceivable that this method could fail in the event of a system outage, but if it did, your call would throw a datastore exception, not return an empty result.
0
1
0
0
2011-05-10T06:41:00.000
4
0.148885
false
5,946,170
0
0
1
3
By given an entity ID , I will query by models = Model.get_by_id(id). However, I find out that some time it will not return result collectly. Is there any alternative or recommended method to query by entity ID in Google App Engine, python?
Google App Engine : alternate method of get_by_id()
5,946,313
0
1
814
0
python,google-app-engine
get_by_id() always get the object, if the passed object is a valid id of object and if the objects exists in the datastore. id can be got by object.key.id in the templat else you always have the object.get(key).
0
1
0
0
2011-05-10T06:41:00.000
4
0
false
5,946,170
0
0
1
3
By given an entity ID , I will query by models = Model.get_by_id(id). However, I find out that some time it will not return result collectly. Is there any alternative or recommended method to query by entity ID in Google App Engine, python?
Send Data From Flex to Python (GAE)
5,948,044
1
0
181
0
python,apache-flex,google-app-engine,google-cloud-datastore
Have flex send a request to the Python server. COuld be a form post or JSON data or whatever.
0
1
0
0
2011-05-10T09:05:00.000
3
1.2
true
5,947,727
0
0
1
1
I'm working on a project that runs off Google App Engine (Python) which stores various user details inside GAE's datastore. I have Flex content which users can use and once done the Flex app needs to send data to the Python backend to 'mark' the user off for that task. Any suggestions?
Secure python web app
5,947,923
0
0
517
0
python,security,web-applications
Easiest and most secure: Put Apache or Nginx in front of it with an HTTPS proxy. Update: Or VPN access as suggested by Jakob. Good idea.
0
1
0
1
2011-05-10T09:16:00.000
2
1.2
true
5,947,849
0
0
1
2
i have python web app build on top of BaseHTTPServer, which runs on specyfic port. It runs system commands and shows output. I want do limit access to this app. What are posible ways to do it? Requirements: it must not be limited to LAN simple to implement/deploy
Secure python web app
5,947,916
0
0
517
0
python,security,web-applications
Common methods: VPN access. Firewalls, logging, denyhosts style defences, complicated root passwords, no su, run as its own user. (if it was my personal server) Logic bombs
0
1
0
1
2011-05-10T09:16:00.000
2
0
false
5,947,849
0
0
1
2
i have python web app build on top of BaseHTTPServer, which runs on specyfic port. It runs system commands and shows output. I want do limit access to this app. What are posible ways to do it? Requirements: it must not be limited to LAN simple to implement/deploy
determining URL that forwarded
5,951,213
1
1
199
0
python,google-app-engine,url
If by forwarding you mean HTTP redirection, you can check the Referer header. If you mean DNS resolving (e.g. distinguishing between your application being invoked via your own domain and .appspot.com one), there is SERVER_NAME environment variable (os.environ["SERVER_NAME"]) that stores the domain (e.g. www.example.co...
0
1
0
0
2011-05-10T13:44:00.000
3
0.066568
false
5,951,035
0
0
1
1
I have a series of different domain names that I would like to all point (via URL forwarding from my domain host) to a google app engine application that reads what the forwarding URL is. So if the domain typed in was original XYZ.com, then when I am forwarded to my application, I can return what that original domain n...
What does INSTALLED_APPS setting in Django actually do?
5,958,915
10
8
7,298
0
python,django
yes. INSTALLED_APPS helps django to sync the database, run tests, get the urls to work and more related issues. Maybe your installed apps still works because the main one calls the others with imports, a django app is nothing more that a simple python module that is imported when called in the settings file, that's why...
0
0
0
0
2011-05-11T03:23:00.000
1
1.2
true
5,958,882
0
0
1
1
What does this actually do? I recently branched out my project from 1 app into 6 different apps and forgot to update the INSTALLED_APPS part of my settings file. Everything still works even though I didn't list the new apps in. Is that supposed to happen? Do I need to include all my apps in INSTALLED_APPS?
Django: saving data from user input and display
5,959,856
3
0
579
0
python,django
Use the safe filter only if you html-escape the data first. Otherwise you should use escape. If you want your users to be able to input data with html tags you could try to sanitize the input to prevent users from using <iframe>, <script>, etc, but allow other tags to be white-listed, and then mark it as safe.
0
0
0
0
2011-05-11T05:12:00.000
1
1.2
true
5,959,553
0
0
1
1
I have a form with a jwysiwyg editor. Looking at it, it can use basic-formatting html tags using the formatting buttons like SO's. Upon submitting the form, I notice its saved into the database as-is, whereas if I enter stuff like <iframe> ... </iframe> into the editor I notice that it is html-encoded inside the table....
Uninstalling a python module in ubuntu
5,959,706
10
5
6,576
0
python,django,uninstallation
go to the python shell >> import django django.__path__ copy the path on the shell sudo rm -r path
0
0
0
0
2011-05-11T05:25:00.000
2
1.2
true
5,959,647
1
0
1
1
I have to delete a python module named "django" (a popular one), because I installed the wrong version (1.3 - beta in py-2.6). How to uninstall this module? Please explain, because I've used python only in Windows and never in Ubuntu.
Scraping ASP.NET with Python and urllib2
5,974,002
1
2
1,706
0
asp.net,python,asp.net-ajax,screen-scraping,urllib2
When scraping a web application, I use either: 1) WireShark ... or... 2) A logging proxy server (that logs headers as well as payload) I then compare what the real application does (in this case, how your browser interacts with the site) with the scraper's logs. Working through the differences will bring you to a work...
0
0
1
1
2011-05-12T04:17:00.000
2
0.099668
false
5,973,245
0
0
1
2
I've been trying (unsuccessfully, I might add) to scrape a website created with the Microsoft stack (ASP.NET, C#, IIS) using Python and urllib/urllib2. I'm also using cookielib to manage cookies. After spending a long time profiling the website in Chrome and examining the headers, I've been unable to come up with a w...
Scraping ASP.NET with Python and urllib2
6,035,498
2
2
1,706
0
asp.net,python,asp.net-ajax,screen-scraping,urllib2
For anyone else that might be in a similar predicament in the future: I'd just like to note that I've had a lot of success with a Greasemonkey user script in Chrome to do all of my scraping and automation. I found it to be a lot easier than Python + urllib2 (at least for this particular case). The user scripts are w...
0
0
1
1
2011-05-12T04:17:00.000
2
1.2
true
5,973,245
0
0
1
2
I've been trying (unsuccessfully, I might add) to scrape a website created with the Microsoft stack (ASP.NET, C#, IIS) using Python and urllib/urllib2. I'm also using cookielib to manage cookies. After spending a long time profiling the website in Chrome and examining the headers, I've been unable to come up with a w...
asynchronous file upload with ajaxupload to a tornado web server
5,989,216
2
3
1,836
1
python,file-upload,tornado,ajax-upload
I got the answer. I need to use self.request.body to get the raw post data. I also need to pass in the correct _xsrf token, otherwise tornado will fire a 403 exception. So that's about it.
0
1
0
0
2011-05-12T19:00:00.000
1
1.2
true
5,983,032
0
0
1
1
I'm using this javascript library (http://valums.com/ajax-upload/) to upload file to a tornado web server, but I don't know how to get the file content. The javascript library is uploading using XHR, so I assume I have to read the raw post data to get the file content. But I don't know how to do it with Tornado. Their ...
ImportError: cannot import name signals
5,986,697
3
7
16,619
0
python,django,unit-testing,importerror
I had the same problem just a minute ago. Investigating I realized the problem was with my settings.py* file. Check if you are having problems with Django finding your settings file correctly. This error message is totally non-sense. * IIRC Django looks for settings.py file, if not found, it looks for environment varia...
0
0
0
0
2011-05-12T19:06:00.000
3
0.197375
false
5,983,100
0
0
1
3
I'm using Django 1.3.0 with Python 2.7.1. In every test I write the following imports I get the importError above: from django.utils import unittest from django.test.client import Client The full stack trace: File "C:\Program Files (x86)\j2ee\plugins\org.python.pydev.debug_1.6.3.2010100513\pysrc\runfiles.py", line...
ImportError: cannot import name signals
6,003,401
5
7
16,619
0
python,django,unit-testing,importerror
@Hugo was right in that it was a settings.py problem. But I didn't had that problem when running through the Django environment. But when I wanted to run unit tests one by one (By using Pydev's run as unittest) it failed to run. What I needed to do was to add the Django settings module information, so for now what I'm ...
0
0
0
0
2011-05-12T19:06:00.000
3
1.2
true
5,983,100
0
0
1
3
I'm using Django 1.3.0 with Python 2.7.1. In every test I write the following imports I get the importError above: from django.utils import unittest from django.test.client import Client The full stack trace: File "C:\Program Files (x86)\j2ee\plugins\org.python.pydev.debug_1.6.3.2010100513\pysrc\runfiles.py", line...