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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Netbeans 7 not starting up after python plugin installation | 19,486,580 | 0 | 1 | 2,129 | 0 | python,macos,netbeans | I have the same problem afther installing the python plguin. To solve this problem i deleted the file: org-openide-awt.jar from C:\Users\MYUSERNAME.netbeans\7.0\modules
Regards!
Martín.
PD: I'm using Netbeans 7.0.1 anda Windows 7 64bit. | 0 | 1 | 0 | 0 | 2011-09-19T17:31:00.000 | 6 | 0 | false | 7,474,887 | 0 | 0 | 1 | 5 | I went to tools, plugins. Then chose to install the three python items that show up. After installation. I choose the restart netbeans option. But instead of restarting, netbeans just closed. And now it is not opening. Any ideas how to fix this? I normally develop Java on my netbeans 7 install.
I am using a mac osx
I s... |
Netbeans 7 not starting up after python plugin installation | 7,478,399 | 1 | 1 | 2,129 | 0 | python,macos,netbeans | I had the same issue. Netbeans would die before opening at all. I could not fix it, and had to revert back to 6.9.1. | 0 | 1 | 0 | 0 | 2011-09-19T17:31:00.000 | 6 | 0.033321 | false | 7,474,887 | 0 | 0 | 1 | 5 | I went to tools, plugins. Then chose to install the three python items that show up. After installation. I choose the restart netbeans option. But instead of restarting, netbeans just closed. And now it is not opening. Any ideas how to fix this? I normally develop Java on my netbeans 7 install.
I am using a mac osx
I s... |
Netbeans 7 not starting up after python plugin installation | 8,088,729 | 1 | 1 | 2,129 | 0 | python,macos,netbeans | I had the same problem, but with Windows 7. I deleted the .netbeans directory located in my home folder. That fixed my problem, hope it fixes yours. | 0 | 1 | 0 | 0 | 2011-09-19T17:31:00.000 | 6 | 0.033321 | false | 7,474,887 | 0 | 0 | 1 | 5 | I went to tools, plugins. Then chose to install the three python items that show up. After installation. I choose the restart netbeans option. But instead of restarting, netbeans just closed. And now it is not opening. Any ideas how to fix this? I normally develop Java on my netbeans 7 install.
I am using a mac osx
I s... |
Netbeans 7 not starting up after python plugin installation | 7,475,990 | -1 | 1 | 2,129 | 0 | python,macos,netbeans | I know I'm not answering your question directly, but I too was considering installing the Python plugin in Netbeans 7 but saw that it was still in Beta.
I use WingIDE from wingware for Python development. I'm a Python newbie but I'm told by the pros that Wing is the best IDE for Python. The "101" version is free an... | 0 | 1 | 0 | 0 | 2011-09-19T17:31:00.000 | 6 | -0.033321 | false | 7,474,887 | 0 | 0 | 1 | 5 | I went to tools, plugins. Then chose to install the three python items that show up. After installation. I choose the restart netbeans option. But instead of restarting, netbeans just closed. And now it is not opening. Any ideas how to fix this? I normally develop Java on my netbeans 7 install.
I am using a mac osx
I s... |
Using Django Caching with Mod_WSGI | 7,482,454 | 0 | 1 | 707 | 0 | python,django,performance | I had a similar problem with an app using memcached. The solution was running mod_wsgi in daemon mode instead of embeded mode, and Apache in mpm_worker mode. After that, application is working much faster. | 0 | 0 | 0 | 1 | 2011-09-19T20:57:00.000 | 3 | 0 | false | 7,477,211 | 0 | 0 | 1 | 3 | Is anyone aware of any issues with Django's caching framework when deployed to Apache/Mod_WSGI?
When testing with the caching framework locally with the dev server, using the profiling middleware and either the FileBasedCache or LocMemCache, Django's very fast. My request time goes from ~0.125 sec to ~0.001 sec. Fantas... |
Using Django Caching with Mod_WSGI | 18,531,552 | 0 | 1 | 707 | 0 | python,django,performance | Same thing happened to me and was wondering what is that is taking so much time.
each cache get was taking around 100 millisecond.
So I debugged the code django locmem code and found out that pickle was taking a lot of time (I was caching a whole table in locmemcache).
I wrapped the locmem as I didn't wanted anything ... | 0 | 0 | 0 | 1 | 2011-09-19T20:57:00.000 | 3 | 0 | false | 7,477,211 | 0 | 0 | 1 | 3 | Is anyone aware of any issues with Django's caching framework when deployed to Apache/Mod_WSGI?
When testing with the caching framework locally with the dev server, using the profiling middleware and either the FileBasedCache or LocMemCache, Django's very fast. My request time goes from ~0.125 sec to ~0.001 sec. Fantas... |
Using Django Caching with Mod_WSGI | 7,477,678 | 0 | 1 | 707 | 0 | python,django,performance | Indeed django is slow. But I must say most of the slowness goes from app itself.. django just forces you (bu providing bad examples in docs) to do lazy thing that are slow in production.
First of: try nginx + uwsgi. it is just the best.
To optimize you app: you need to find you what is causing slowness, it can be:
slo... | 0 | 0 | 0 | 1 | 2011-09-19T20:57:00.000 | 3 | 1.2 | true | 7,477,211 | 0 | 0 | 1 | 3 | Is anyone aware of any issues with Django's caching framework when deployed to Apache/Mod_WSGI?
When testing with the caching framework locally with the dev server, using the profiling middleware and either the FileBasedCache or LocMemCache, Django's very fast. My request time goes from ~0.125 sec to ~0.001 sec. Fantas... |
Create dynamic URLs in Flask with url_for() | 67,442,944 | 0 | 241 | 402,348 | 0 | python,flask | You need to add function means that the page you want to render that function whould be added inside the url_for(function name).
It will redirect to that function and the page will render accordingly. | 0 | 0 | 0 | 0 | 2011-09-19T23:11:00.000 | 5 | 0 | false | 7,478,366 | 0 | 0 | 1 | 1 | Half of my Flask routes requires a variable say, /<variable>/add or /<variable>/remove. How do I create links to those locations?
url_for() takes one argument for the function to route to but I can't add arguments? |
Python on website to connect to phone connected to computer | 7,478,626 | 1 | 0 | 271 | 0 | javascript,android,python,django | What you're looking for isn't possible and should not be possible for security concerns. Do you want someone knowing what devices you have connected to your computer? You're essentially wanting a device sniffer but a website would not be capable of accessing the client's machine in this manner to access the desired i... | 0 | 0 | 1 | 0 | 2011-09-19T23:46:00.000 | 2 | 0.099668 | false | 7,478,590 | 0 | 0 | 1 | 2 | I know the title is a bit off, but what I'm asking is if it is possible to have a python script on my website that can detect if my Android phone is connected to the computer Im using to view the page. I don't know if this is possible since I think python is server-side, but maybe this is possible to do with JavaScript... |
Python on website to connect to phone connected to computer | 7,479,646 | 1 | 0 | 271 | 0 | javascript,android,python,django | What you're looking for is not TOTALLY ABSOLUTELY impossible, but you may need some help from the computer you connect the device to, from the browser you're visiting your site with or from the device itself. Some possible options:
have a program running on your computer which checks if the device is connected and pin... | 0 | 0 | 1 | 0 | 2011-09-19T23:46:00.000 | 2 | 1.2 | true | 7,478,590 | 0 | 0 | 1 | 2 | I know the title is a bit off, but what I'm asking is if it is possible to have a python script on my website that can detect if my Android phone is connected to the computer Im using to view the page. I don't know if this is possible since I think python is server-side, but maybe this is possible to do with JavaScript... |
Python Parallel Processing Amazon EC2 or Alternatives? | 7,478,918 | 1 | 0 | 384 | 0 | python,multithreading,amazon-ec2,cloud,parallel-processing | Your requirements are too vague for a specific response. It is unlikely you are going to be able to elaborate them sufficiently for anybody to provide an authoritative answer.
Fortunately for you, many Infrastructure as a Service platforms like AWS and Rackspace let you test things out extremely inexpensively (literal... | 0 | 1 | 0 | 1 | 2011-09-20T00:21:00.000 | 1 | 1.2 | true | 7,478,803 | 0 | 0 | 1 | 1 | I'm working on running a Memory/CPU intensive project on a cloud service, from my Googling and research it looks like I should use Amazon EC2 as there are guides it using MPI - however, reading up on stackoverflow about people's comparison of EC2 with rackspace, joyent, etc, I was wondering if this is really the best c... |
DJANGO_SETTINGS_MODULE is undefined | 15,087,670 | 5 | 5 | 30,612 | 0 | python,django,python-idle | Don't run django-admin.py for anything other than the initial project creation. For everything after that, use manage.py, which takes care of the finding the settings. | 0 | 0 | 0 | 0 | 2011-09-20T02:41:00.000 | 4 | 0.244919 | false | 7,479,493 | 0 | 0 | 1 | 2 | when i input from django.db import models into IDLE,the result throw a exception named Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
why does this exception occur and how i can fix it |
DJANGO_SETTINGS_MODULE is undefined | 14,872,658 | 8 | 5 | 30,612 | 0 | python,django,python-idle | You can use python manage.py shell instead of using IDLE.
manage.py reads and uses django settings including DJANGO_SETTINGS_MODULE. | 0 | 0 | 0 | 0 | 2011-09-20T02:41:00.000 | 4 | 1 | false | 7,479,493 | 0 | 0 | 1 | 2 | when i input from django.db import models into IDLE,the result throw a exception named Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
why does this exception occur and how i can fix it |
How do I properly install django registration on localhost? | 7,498,096 | 1 | 3 | 1,876 | 0 | python,django | i'd also add that there is a set of default templates somewhere that make the usage of registration vastly easier. think they were on ubernostrums google code last time i needed them. | 0 | 0 | 0 | 0 | 2011-09-20T20:41:00.000 | 4 | 0.049958 | false | 7,491,507 | 0 | 0 | 1 | 2 | I have a directory for a django project on my localhost
/MyDjangoList/
In this folder I have a django application called PK
I downloaded django-registration and unzipped the folder into the /MyDjangoList/
I went into terminal and went to the django-registration folder and ran
python setup.py install.
It did a bunch of ... |
How do I properly install django registration on localhost? | 7,491,553 | 1 | 3 | 1,876 | 0 | python,django | Do you need more permission? As in you need to do: sudo python setup.py install | 0 | 0 | 0 | 0 | 2011-09-20T20:41:00.000 | 4 | 0.049958 | false | 7,491,507 | 0 | 0 | 1 | 2 | I have a directory for a django project on my localhost
/MyDjangoList/
In this folder I have a django application called PK
I downloaded django-registration and unzipped the folder into the /MyDjangoList/
I went into terminal and went to the django-registration folder and ran
python setup.py install.
It did a bunch of ... |
Why did Google choose Java for the Android Operating System? | 7,497,322 | 10 | 19 | 9,975 | 0 | java,android,python | Google, as a company, uses Java a lot. The search features are written in Java. As far as I can tell from the outside, Google likes Java.
For most tasks, Java is faster than Python. I would rather work in Python, and I know how to write reasonably efficient Python, and yes PyPy is really shaking things up, but Googl... | 1 | 0 | 0 | 1 | 2011-09-21T09:02:00.000 | 2 | 1 | false | 7,497,199 | 0 | 0 | 1 | 1 | Full question
Why did Google choose Java for the Android Operating System and not the X language?
Where X would be one of the below:
Python version 2.7 or version 3
which is equally as powerful as Java
has a lot of useful third party libraries
is faster to develop in thanks to it's dynamic nature
C/C++ or ObjC
wh... |
Getting error: AttributeError: class has no attribute '' | 7,503,299 | 1 | 0 | 1,839 | 0 | python | class Check_jira ends on line 25 and has only one method. Then you have an if block, and CheckForJiraIssueRecord is just a function defined in this block (that is, the function is defined if __name__ == '__main__'.
Just put the if block outside after the whole class definition. | 0 | 0 | 0 | 0 | 2011-09-21T16:18:00.000 | 1 | 1.2 | true | 7,503,149 | 0 | 0 | 1 | 1 | Here is the code:
1 #!/usr/bin/env python
2
3 import re, os, sys, jira, subprocess
4
5 class Check_jira:
6
7 def verify_commit_text(self, tags):
8 for line in tags:
9 if re.match('^NO-TIK',line):
10 return True
11 elif re.match('^NO-REVIEW', lin... |
App Engine problems using the command line | 7,507,801 | 2 | 1 | 219 | 0 | python,django,google-app-engine,command-line,google-cloud-datastore | If you're using Django 0.96 templates within a 'normal' App Engine app, then manage.py isn't involved at all.
/path/to/dev_appserver.py --clear_datastore .
is what you want, assuming you're CD'd to the root of your app. | 0 | 1 | 0 | 0 | 2011-09-21T21:24:00.000 | 1 | 1.2 | true | 7,506,854 | 0 | 0 | 1 | 1 | I am developing an App Engine project on Windows using Eclipse and Python 2.5 and Django 0.96. Everything in my app, including Django, is working nicely.
My problems arise when I try to use command line. For example, I'm told that if I want to clear the local datastore I can enter "python manage.py reset" but when I do... |
BrowserID without Javascript (preferably in Python) - is it possible? | 7,508,068 | -1 | 3 | 490 | 0 | python,graceful-degradation,noscript,browserid | One solution, use OpenID or hand-rolled email verification, but then I have 2 problems. :( | 0 | 0 | 1 | 0 | 2011-09-21T23:50:00.000 | 3 | -0.066568 | false | 7,508,016 | 0 | 0 | 1 | 1 | BrowserID currently uses a Javascript shim, while browsers are still (hopefully) developing support for it. Is it possible to use BrowserID for clients that don't run javascript?
I could read the 600 line JS shim, and figure out what navigator.id.getVerifiedEmail is meant to do, then replicate it on a server, but I was... |
Inexplicable Urllib2 problem between virtualenv's. | 7,681,165 | 0 | 5 | 397 | 0 | python,http,cookies,urllib2,mechanize | Well, it looks like I know why the problem was happening, but I'm not 100% the reason for it.
I simply had to make the server wait (time.sleep()) after it sent the 2nd request (Move to another page) before doing the 3rd request (Perform a POST by filling in a form).
I don't know is it because of a condition with the ... | 0 | 0 | 1 | 0 | 2011-09-22T01:51:00.000 | 4 | 1.2 | true | 7,508,686 | 0 | 0 | 1 | 2 | I have some test code (as a part of a webapp) that uses urllib2 to perform an operation I would usually perform via a browser:
Log in to a remote website
Move to another page
Perform a POST by filling in a form
I've created 4 separate, clean virtualenvs (with --no-site-packages) on 3 different machines, all with dif... |
Inexplicable Urllib2 problem between virtualenv's. | 7,550,771 | 1 | 5 | 397 | 0 | python,http,cookies,urllib2,mechanize | This is a total shot in the dark, but are your VPSs 64-bit and your home computer 32-bit, or vice versa? Maybe a difference in default sizes or accuracies of something could be freaking out the server.
Barring that, can you try to find out any information on the software stack the web server is using? | 0 | 0 | 1 | 0 | 2011-09-22T01:51:00.000 | 4 | 0.049958 | false | 7,508,686 | 0 | 0 | 1 | 2 | I have some test code (as a part of a webapp) that uses urllib2 to perform an operation I would usually perform via a browser:
Log in to a remote website
Move to another page
Perform a POST by filling in a form
I've created 4 separate, clean virtualenvs (with --no-site-packages) on 3 different machines, all with dif... |
local_import function does not work | 7,525,938 | 0 | 2 | 642 | 0 | python,apache,wsgi,web2py,web2py-modules | Add testapp to your PYTHONPATH. | 0 | 0 | 0 | 1 | 2011-09-23T07:40:00.000 | 3 | 0 | false | 7,525,761 | 0 | 0 | 1 | 2 | local_import function randomly does not import my modules from modules
directory. The Error is:
ImportError: No module named testapp.modules.mymodule
I have this problem when i use web2py with apache (with wsgi). I have no problem when i run locally with "python web2py.py" command.
Any suggestion? |
local_import function does not work | 7,582,872 | 1 | 2 | 642 | 0 | python,apache,wsgi,web2py,web2py-modules | I will answer my own question :)
I started using mod_proxy and everything is ok. | 0 | 0 | 0 | 1 | 2011-09-23T07:40:00.000 | 3 | 0.066568 | false | 7,525,761 | 0 | 0 | 1 | 2 | local_import function randomly does not import my modules from modules
directory. The Error is:
ImportError: No module named testapp.modules.mymodule
I have this problem when i use web2py with apache (with wsgi). I have no problem when i run locally with "python web2py.py" command.
Any suggestion? |
Is it necessary to explicitly free memory in Google App Engine's Python environment? | 7,526,870 | 6 | 2 | 617 | 0 | python,google-app-engine | Python has it's own garbage collection so there's no need to release memory manually. | 0 | 1 | 0 | 0 | 2011-09-23T09:15:00.000 | 2 | 1.2 | true | 7,526,746 | 0 | 0 | 1 | 1 | Is there a way to free memory in google's app engine? Is there a garbage collector in python? |
Encrypting passwords on POST Django | 7,533,960 | 5 | 6 | 2,645 | 0 | python,django,encryption | SSL is a de facto solution, but if for some reason you can't have it, then you'll find shelter in some javascript libraries that encrypt post data. And there are plenty of them if you search.. But I don't believe that any of them can achieve maximum security. | 0 | 0 | 0 | 0 | 2011-09-23T17:52:00.000 | 1 | 1.2 | true | 7,532,972 | 0 | 0 | 1 | 1 | aside from using SSL, is there any way to encrypt a password in the Django framework on the first POST to the server? For example, if I have a form that accepts a username and password, then send it to another view, aren't the passwords sent to the backend unencrypted? If so, is there a way to encrypt the passwords bef... |
What is a pythonic webserver equivalent to IIS and ASP? | 7,534,361 | 0 | 0 | 394 | 0 | python,webserver | WSGI setups are fairly easy to get started, but in no anyway turn key. django MVC has a simple built in development server if you plan on using a more comprehensive framework. | 0 | 0 | 0 | 1 | 2011-09-23T20:07:00.000 | 4 | 0 | false | 7,534,244 | 0 | 0 | 1 | 4 | For very simple, internal web-apps using ASP I was able to just switch IIS 'on' and then write some ASP scripts in the www directory that would start working immediately.
Is there an equivalent webserver app for Python scripts that I can run that will automatically start serving dynamic pages (python scripts) in a cert... |
What is a pythonic webserver equivalent to IIS and ASP? | 7,534,379 | 4 | 0 | 394 | 0 | python,webserver | There's always CGI. Add a script mapping of .py to "C:\Python27\python.exe" -u "%s" then drop .py files in a folder and IIS will execute them.
I'd not generally recommend it for real work—in the longer term you would definitely want to write apps to WSGI, and then deploy them through any number of interfaces including ... | 0 | 0 | 0 | 1 | 2011-09-23T20:07:00.000 | 4 | 0.197375 | false | 7,534,244 | 0 | 0 | 1 | 4 | For very simple, internal web-apps using ASP I was able to just switch IIS 'on' and then write some ASP scripts in the www directory that would start working immediately.
Is there an equivalent webserver app for Python scripts that I can run that will automatically start serving dynamic pages (python scripts) in a cert... |
What is a pythonic webserver equivalent to IIS and ASP? | 7,534,417 | 0 | 0 | 394 | 0 | python,webserver | My limited experience with Python web frameworks has taught me that most go to one extreme or the other: Django on one end is a full-stack MVC framework, that will do pretty much everything for you. On the other end, there are Flask, web.py, CherryPy, etc., which do much less, but stay out of your way.
CherryPy, for ex... | 0 | 0 | 0 | 1 | 2011-09-23T20:07:00.000 | 4 | 0 | false | 7,534,244 | 0 | 0 | 1 | 4 | For very simple, internal web-apps using ASP I was able to just switch IIS 'on' and then write some ASP scripts in the www directory that would start working immediately.
Is there an equivalent webserver app for Python scripts that I can run that will automatically start serving dynamic pages (python scripts) in a cert... |
What is a pythonic webserver equivalent to IIS and ASP? | 7,534,970 | 1 | 0 | 394 | 0 | python,webserver | For development or just to play around, here's an example using the standard Python library that I have used to help friend who wanted to get a basic CGI server up and running. It will serve python scripts from cgi-bin and files from the root folder. I'm not near a Windows computer at the moment to make sure that this ... | 0 | 0 | 0 | 1 | 2011-09-23T20:07:00.000 | 4 | 0.049958 | false | 7,534,244 | 0 | 0 | 1 | 4 | For very simple, internal web-apps using ASP I was able to just switch IIS 'on' and then write some ASP scripts in the www directory that would start working immediately.
Is there an equivalent webserver app for Python scripts that I can run that will automatically start serving dynamic pages (python scripts) in a cert... |
Check for Event Daily, and Send Notification Messages | 8,426,091 | 1 | 0 | 150 | 0 | php,python,google-app-engine | If you are using Google App Engine with Python you could use "Cron" to schedule a task to automatically run each day.
GAE also allows you to send emails, just a little tip: make sure that you 'invite' the email address used to send mail to the application as an administrator so that you can programatically send emails ... | 0 | 0 | 1 | 1 | 2011-09-23T22:41:00.000 | 1 | 0.197375 | false | 7,535,544 | 0 | 0 | 1 | 1 | What is the best way to set up a system that checks for events daily and sends messages via email, Twitter, SMS, and possibly Facebook? Keep in mind, that I do not have access to a web server with root access (Using Rackspace Cloud). Would PHP have a solution for this? Would there be any drawbacks to using Google App E... |
Need recommendation for templating configuration files and auditing | 7,537,437 | 1 | 1 | 275 | 0 | python,templates | Let's take the simplest approach.
Use whatever language and templating engine you want, write a script that generates a config by e.g. a device name.
To check, generate a config for a device, download the actual config from that device, run diff. Mail the differences, if any, to people in charge of auditing.
The temp... | 0 | 0 | 0 | 0 | 2011-09-24T05:09:00.000 | 1 | 0.197375 | false | 7,537,169 | 0 | 0 | 1 | 1 | I am looking for a template engine for pushing and pulling data from configuration files. To be more specific, Cisco router configuration files. My goal has two parts
1) To be able to template my router config and insert unique data (hostname, interface IP's, ...etc) from an authoritative source (Mysql). Afterwards,... |
Google App Engine Live Updates (Python) | 7,540,983 | 0 | 0 | 410 | 0 | python,ajax,google-app-engine | To make a calculator in a browser that does not involve a page refresh, your best bet is to learn javascript. Searching google or stackoverflow for javascript tutorials will give you lots of options to work from. You don't need to learn python or App Engine to create the calculator. You could use app engine to serve... | 0 | 0 | 0 | 0 | 2011-09-24T06:17:00.000 | 2 | 0 | false | 7,537,397 | 0 | 0 | 1 | 1 | I was wondering if it would be possible to write an application using the Google App Engine and Python to create a basic calculator? However, the real question is would it be possible to have the calculator do the math without having to refresh the page?
To be more specific, I mean if there is an input box that a formu... |
Django seamless upgrades with CDN | 7,540,281 | 0 | 3 | 570 | 0 | python,django,amazon-web-services,cdn,fabric | Seems to me the last part (change all templates and python code to use the new names) is easy. Store the current style "version number" in your settings. Make sure this version number is passed to your templates using the template context. Then, use that when rendering the templates to select the real URL to static ... | 0 | 0 | 0 | 0 | 2011-09-24T16:07:00.000 | 4 | 0 | false | 7,540,147 | 0 | 0 | 1 | 1 | [I'm using AWS but I think this question is relevant to all CDNs]
I'm looking to seamless deploy my Django server to the AWS cloud.
All static content (e.g. images, javascript, etc.) go to the Amazon Cloudfront CDN.
The problem is that I'm trying to make the upgrade as "atomic" as possible, while I have very little con... |
Serve Django project on local WiFi Network | 47,001,073 | 0 | 4 | 10,959 | 0 | python,django | add 192.168.0.8 (or whatever your router ip is) as a string to ALLOWED_HOSTS list in settings then run server using python manage.py runserver 192.168.0.8:8000 | 0 | 0 | 0 | 0 | 2011-09-24T20:49:00.000 | 6 | 0 | false | 7,541,834 | 0 | 0 | 1 | 2 | I used
python manage runserver 0.0.0.0:8000
to start the server so that I can access the project from other computers on my wifi network, but when i browse to internet-ipaddress:8000 on an another computer, the project doesn't load. Am I missing a setting? |
Serve Django project on local WiFi Network | 7,541,893 | 6 | 4 | 10,959 | 0 | python,django | What do you mean by internet-ipaddress? That sounds like you're using the external IP of your router. You should be using the IP of the particular machine you're serving from, which will be an internal address like 192.168.0.2. | 0 | 0 | 0 | 0 | 2011-09-24T20:49:00.000 | 6 | 1 | false | 7,541,834 | 0 | 0 | 1 | 2 | I used
python manage runserver 0.0.0.0:8000
to start the server so that I can access the project from other computers on my wifi network, but when i browse to internet-ipaddress:8000 on an another computer, the project doesn't load. Am I missing a setting? |
How is rate_limit enforced in Celery? | 11,125,501 | 16 | 6 | 1,119 | 0 | python,django,asynchronous,queue,celery | Rate limited tasks are never dropped, they are queued internally in the worker so that they execute as soon as they are allowed to run.
The token bucket algorithm does not specify anything about dropping packets (it is an option, but Celery does not do that). | 0 | 1 | 0 | 0 | 2011-09-24T21:06:00.000 | 1 | 1.2 | true | 7,541,931 | 0 | 0 | 1 | 1 | I'm running a Django website where I use Celery to implement preventive caching - that is, I calculate and cache results even before they are requested by the user.
However, one of my Celery tasks could, in some situation, be called a lot (I'd say sightly quicker than it completes on average, actually). I'd like to rat... |
How can I log all outgoing email in Django? | 7,552,429 | 2 | 13 | 7,599 | 0 | python,django,logging,django-email | I do not know if there exists a module that works this way, but writing a custom one is a piece of cake. Just create a separate model and every time you send an email, create a new instance ( use a custom method for email sending ). Then, link this model with the admin and bingo.. | 0 | 0 | 0 | 1 | 2011-09-26T08:11:00.000 | 4 | 0.099668 | false | 7,552,283 | 0 | 0 | 1 | 1 | My Django application sends out quite a bit of emails and I've tried testing it thoroughly. However, for the first few months, I'd like to log all outgoing emails to ensure that everything is working smoothly. Is there a Django module that allows me to do this and makes the outgoing emails visible through the administr... |
How do I serialize a Java object such that it can be deserialized by pickle (Python)? | 7,558,455 | 1 | 10 | 8,413 | 0 | java,python,serialization | You can use a Java JSON serializer like GSON or Jackson to serilaise quite easily and use a python json pickle to deserialize | 0 | 0 | 1 | 0 | 2011-09-26T16:47:00.000 | 2 | 0.099668 | false | 7,558,389 | 0 | 0 | 1 | 1 | I'm using a Python service that uses pickled messages as part of its protocol. I'd like to query this service from Java, but to do so, I need to pickle my message on the client (Java). Are there any implementations of pickle that run on the JVM (ideally with minimal dependencies)?
Clarification: Modifying the server ... |
Use Python Framework or Build Own | 7,562,586 | 1 | 0 | 481 | 0 | python,frameworks | Learn from existing frameworks, I think. The Python web stack (wsgi, sqlalchemy, template engines, full stack frameworks, microframeworks) has spent a lot of time maturing. You'll have the opportunity to develop fast and learn from existing design. | 0 | 0 | 0 | 1 | 2011-09-26T23:18:00.000 | 1 | 0.197375 | false | 7,562,454 | 1 | 0 | 1 | 1 | I am an experienced PHP developer (10 years) who has built 3 different custom frameworks for extreme high traffic sites. I have recently started to get into programming a lot of python, usually just for fun (algorithms). I am starting to develop a new site as my side project and wanted to know if I should use a pre-exi... |
How to control Apache via Django to connect to mongoose(another HTTP server)? | 7,567,682 | 0 | 0 | 320 | 1 | python,django,apache,mod-wsgi,mod-python | If you have control over what runs on the device side, consider using XML-RPC to talk from client to server. | 0 | 0 | 0 | 0 | 2011-09-27T07:52:00.000 | 2 | 0 | false | 7,565,812 | 0 | 0 | 1 | 1 | I have been doing lots of searching and reading to solve this.
The main goal is let a Django-based web management system connecting to a device which runs a http server as well. Django will handle user request and ask device for the real data, then feedback to user.
Now I have a "kinda-work-in-concept" solution:
Brows... |
Don't display .pyc files in the Xcode 4 project navigator | 11,637,636 | 1 | 1 | 423 | 0 | python,xcode | The best I can come with is the way I do it: By dragging only the .py files into the XCode project at the start. It's not ideal; there should be a way to filter out build files. This method also isn't great for sub-folders, since you have to create each folder and then drag the .py files in for each folder by hand. But... | 0 | 0 | 0 | 0 | 2011-09-27T09:46:00.000 | 2 | 0.099668 | false | 7,567,157 | 0 | 0 | 1 | 1 | I'm working on a fairly large django-project in Xcode 4. I prefer not to see all the automatically generated .pyc files in the project navigator.
Does anyone know a way to hide the .pyc files from the interface?
I don't necessarily want to remove them from disk.
Thanks.
-
What fails:
Checking "Show only files with sou... |
Why are there no Makefiles for automation in Python projects? | 7,581,531 | 2 | 34 | 12,445 | 0 | python,automation,makefile,rake | Any decent test tool has a way of running the entire suite in a single command, and nothing is stopping you from using rake, make, or anything else, really.
There is little reason to invent a new way of doing things when existing methods work perfectly well - why re-invent something just because YOU didn't invent it? (... | 0 | 0 | 0 | 1 | 2011-09-28T09:16:00.000 | 8 | 0.049958 | false | 7,580,939 | 0 | 0 | 1 | 3 | As a long time Python programmer, I wonder, if a central aspect of Python culture eluded me a long time: What do we do instead of Makefiles?
Most ruby-projects I've seen (not just rails) use Rake, shortly after node.js became popular, there was cake. In many other (compiled and non-compiled) languages there are classic... |
Why are there no Makefiles for automation in Python projects? | 7,581,523 | -3 | 34 | 12,445 | 0 | python,automation,makefile,rake | Is there nothing to automate?
Not really. All but two of the examples are one-line commands.
tl;dr Very little of this is really interesting or complex. Very little of this seems to benefit from "automation".
Due to documentation, I don't have to remember the commands to do this.
Do most programmers prefer to r... | 0 | 0 | 0 | 1 | 2011-09-28T09:16:00.000 | 8 | 1.2 | true | 7,580,939 | 0 | 0 | 1 | 3 | As a long time Python programmer, I wonder, if a central aspect of Python culture eluded me a long time: What do we do instead of Makefiles?
Most ruby-projects I've seen (not just rails) use Rake, shortly after node.js became popular, there was cake. In many other (compiled and non-compiled) languages there are classic... |
Why are there no Makefiles for automation in Python projects? | 53,604,587 | 2 | 34 | 12,445 | 0 | python,automation,makefile,rake | The make utility is an optimization tool which reduces the time spent building a software image. The reduction in time is obtained when all of the intermediate materials from a previous build are still available, and only a small change has been made to the inputs (such as source code). In this situation, make is able ... | 0 | 0 | 0 | 1 | 2011-09-28T09:16:00.000 | 8 | 0.049958 | false | 7,580,939 | 0 | 0 | 1 | 3 | As a long time Python programmer, I wonder, if a central aspect of Python culture eluded me a long time: What do we do instead of Makefiles?
Most ruby-projects I've seen (not just rails) use Rake, shortly after node.js became popular, there was cake. In many other (compiled and non-compiled) languages there are classic... |
Convert HTML into PDF using Python | 7,584,807 | 0 | 3 | 9,230 | 0 | python,html,django,wkhtmltopdf,html2pdf | A possible, but not so elegant solution, is to run a small scripts which renders the html via a headless browser component (webkit/xvfb on Linux) and then saves it as a pdf. | 0 | 0 | 0 | 0 | 2011-09-28T14:05:00.000 | 3 | 0 | false | 7,584,546 | 0 | 0 | 1 | 2 | I am trying to convert HTML into a PDF document in Django and haven't been successful.
I have tried using wkhtmltopdf 0.9.9, however Apache throws an error that wkhtmltopdf cannot connect to server. When I use wkhtmltopdf directly, it runs perfectly fine and converts the HTML into a PDF document.
I have also tried usin... |
Convert HTML into PDF using Python | 7,584,643 | 0 | 3 | 9,230 | 0 | python,html,django,wkhtmltopdf,html2pdf | I suggest you to use pisa, pypdf and html5lib combination, it worked for me. | 0 | 0 | 0 | 0 | 2011-09-28T14:05:00.000 | 3 | 0 | false | 7,584,546 | 0 | 0 | 1 | 2 | I am trying to convert HTML into a PDF document in Django and haven't been successful.
I have tried using wkhtmltopdf 0.9.9, however Apache throws an error that wkhtmltopdf cannot connect to server. When I use wkhtmltopdf directly, it runs perfectly fine and converts the HTML into a PDF document.
I have also tried usin... |
XSS With MongoDB / Django Forms | 7,585,077 | 1 | 0 | 1,441 | 0 | python,django,xss | XSS is a Javascript vulnerability, it is unrelated to SQL injection. To prevent XSS, you need to do the same sensitization, regardless of how your data is stored.
Based on its description, using that library and a CSRF token should be sufficient.
EDIT
While you do not need to worry about SQL injection with MongoDB. If... | 0 | 0 | 0 | 0 | 2011-09-28T14:42:00.000 | 2 | 0.099668 | false | 7,585,027 | 0 | 0 | 1 | 1 | I am running a 100% NoSQL backend (MongoDB) and developing using Django. The application I am building has a lot of different forms, and for a variety of reasons, I am trying to avoid using Django.Forms because they are complicated and do not seem to be very flexible.
How worried do I need to be about XSS (as far as I ... |
Setup for high volume of database writing | 7,587,624 | 0 | 0 | 324 | 1 | python,django,database-design,amazon-web-services | You should actually be okay with low hundreds of writes per minute through SQLAlchemy (thats only a couple a second); if you're talking more like a thousand a minute, yeah that might be problematic.
What kind of data do you have? If it's fairly flat (few tables, few relations), you might want to investigate a non-rela... | 0 | 0 | 0 | 0 | 2011-09-28T17:14:00.000 | 3 | 0 | false | 7,586,999 | 0 | 0 | 1 | 2 | I am researching a project that would require hundreds of database writes per a minute. I have never dealt with this level of data writes before and I am looking for good scalable techniques and technologies.
I am a comfortable python developer with experience in django and sql alchemy. I am thinking I will build the d... |
Setup for high volume of database writing | 7,587,774 | 0 | 0 | 324 | 1 | python,django,database-design,amazon-web-services | If it's just a few hundred writes you still can do with a relational DB. I'd pick PostgreSQL (8.0+),
which has a separate background writer process. It also has tuneable serialization levels so you
can enable some tradeoffs between speed and strict ACID compliance, some even at transaction level.
Postgres is well docum... | 0 | 0 | 0 | 0 | 2011-09-28T17:14:00.000 | 3 | 0 | false | 7,586,999 | 0 | 0 | 1 | 2 | I am researching a project that would require hundreds of database writes per a minute. I have never dealt with this level of data writes before and I am looking for good scalable techniques and technologies.
I am a comfortable python developer with experience in django and sql alchemy. I am thinking I will build the d... |
Should you hold a HTTP request while the server performs a time consuming operation? Or let the request go? | 7,588,103 | 2 | 2 | 489 | 0 | python,http,request | For requests that you know will take a long time (more than a few seconds) to process, you must assume at minimum that the connection may be forcibly severed by a firewall.
I would say you should implement a queue system on the backend. The request to perform the operation becomes a request to queue the operation. Wh... | 0 | 0 | 1 | 0 | 2011-09-28T18:42:00.000 | 3 | 0.132549 | false | 7,587,939 | 0 | 0 | 1 | 2 | Lets say an operation could take 2 to 10 minutes on the server to perform, for example to update an index which is time consuming.
Would you perform the operation while holding the request? ie not sending a HTTP Response until the operation has finished? And if the client/browser drops the request, just continue with ... |
Should you hold a HTTP request while the server performs a time consuming operation? Or let the request go? | 7,588,099 | 3 | 2 | 489 | 0 | python,http,request | You might also use a chunked response. First, push a chunk with some code that would display the “please wait” screen, flush the response and start the work. Then you can either push and flush chunks with periodical progress updates or just push one at the end with a “completed” information. Obviously you can employ Ja... | 0 | 0 | 1 | 0 | 2011-09-28T18:42:00.000 | 3 | 1.2 | true | 7,587,939 | 0 | 0 | 1 | 2 | Lets say an operation could take 2 to 10 minutes on the server to perform, for example to update an index which is time consuming.
Would you perform the operation while holding the request? ie not sending a HTTP Response until the operation has finished? And if the client/browser drops the request, just continue with ... |
What back end tech to use for a 2-player, turn based, ajax web game?: Python or Java, FastCGI or app server? | 7,595,177 | 0 | 0 | 253 | 0 | java,python,ajax,web-applications | Some direct benefits of using Django instead of rolling your own
Database ORM
Templating
User authentication
Pluggable applications (use other people's stuff, yay!)
Also, Django can be deployed as a FCGI application. | 0 | 0 | 0 | 0 | 2011-09-29T09:20:00.000 | 1 | 1.2 | true | 7,595,124 | 0 | 0 | 1 | 1 | I'm building a web based 2 player game, client side interface will all be done in an ajax manor with html/css/javascript. I want clients to be able to initiate games and join others, chat etc, but I'm stuck on what the best way to code and communicate with the server is, I would like to use either Java or Python.
Pytho... |
Downloading files in background with Python | 7,595,902 | 2 | 3 | 751 | 0 | python,web-applications,background | Timout duration is up to you, you could just make it longer.
Anyway there are plenty of flash or AJAX uploaders out there, nothing you can do only server side AFAIK | 0 | 0 | 1 | 0 | 2011-09-29T10:14:00.000 | 1 | 1.2 | true | 7,595,809 | 0 | 0 | 1 | 1 | I have got a working web application in Python that downloads a file into the web server upon a user's request. This works fine for small file downloads but when the user requests a larger file, the connection times out. So, I think I need to process the download in the background but I'm not sure what tool is most sui... |
dependency resolution pip virtualenv | 7,602,082 | 1 | 0 | 512 | 0 | python,dependencies,virtualenv,pip | Using pip + virtualenv you can't have two versions of a library installed at the same time.
And, unfortunately, I don't know of any good ways of handling this situation. Sorry. | 0 | 0 | 0 | 0 | 2011-09-29T17:31:00.000 | 1 | 1.2 | true | 7,601,098 | 1 | 0 | 1 | 1 | I have 2 local libraries which are dependent on different version of suds.
Example -
Module-A-1.0's setup.py has a requirement of suds ==0.3.9.
Module-B-1.0's setup.py has a requirement of suds ==0.4.0.
Both these modules are required by Module-C, which has the following its setup.py
django
Module-A-1.0
Module-B... |
How do I override the default session timeout with pyramid + pyramid-beaker + beaker | 7,608,095 | 2 | 3 | 2,326 | 0 | python,pyramid,beaker | Changing the timeout isn't supported by beaker. If you are trying to make a session stick around that long, you should probably just put it into a separate cookie. A common use-case is the "remember me" checkbox on login. This helps you track who the user is, but generally the actual session shouldn't be sticking aroun... | 0 | 0 | 0 | 0 | 2011-09-29T21:36:00.000 | 2 | 1.2 | true | 7,603,674 | 0 | 0 | 1 | 1 | I am using pyramid to create a web application. I am then using pyramid-beaker to interface beaker into pyramid's session management system.
Two values affect the duration of a user's session.
The session cookie timeout
The actual session's life time on either disk/memcache/rdbms/etc
I currently have to cookie defau... |
Having an issue with setting up MySQLdb on Mac OS X Lion in order to support Django | 7,605,229 | 1 | 2 | 3,834 | 1 | python,mysql,django,macos,mysql-python | Install pip if you haven't already, and run
pip install MySQL-Python | 0 | 0 | 0 | 0 | 2011-09-30T01:53:00.000 | 3 | 0.066568 | false | 7,605,212 | 0 | 0 | 1 | 2 | So I am pretty sure that I have managed to dork up my MySQLdb installation. I have all of the following installed correctly on a fresh install of OS X Lion:
phpMyAdmin
MySQL 5.5.16
Django 1.3.1
And yet when I try to run "from django.db import connection" in a django console, I get the following:
from django.db im... |
Having an issue with setting up MySQLdb on Mac OS X Lion in order to support Django | 12,027,574 | 5 | 2 | 3,834 | 1 | python,mysql,django,macos,mysql-python | I found the following solution for this issue. It worked for me. I have encountered this problem when I was running python console from PyCharm.
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib | 0 | 0 | 0 | 0 | 2011-09-30T01:53:00.000 | 3 | 0.321513 | false | 7,605,212 | 0 | 0 | 1 | 2 | So I am pretty sure that I have managed to dork up my MySQLdb installation. I have all of the following installed correctly on a fresh install of OS X Lion:
phpMyAdmin
MySQL 5.5.16
Django 1.3.1
And yet when I try to run "from django.db import connection" in a django console, I get the following:
from django.db im... |
Python Audio Transfer Through Lasers | 7,632,584 | 1 | 5 | 1,017 | 0 | python,audio,signal-processing,frequency | I would tackle the receiving end using two FIR filters, one for each frequency that you are trying to detect. The coefficients of the filters are just a copy of the signal you are looking for (i.e. 250Hz in one case and 450Hz in the other). You would have to look at the output of your solar panel to decide whether that... | 0 | 0 | 0 | 1 | 2011-09-30T04:57:00.000 | 4 | 0.049958 | false | 7,606,111 | 0 | 0 | 1 | 2 | I'm currently working on a project that has been relatively easy, up until now. The underlying project is to transmit data/messages over lasers using audio transformation.
In a nutshell the process is currently like this
The user enters a message
Message is turned into binary
For each 1 and 0 in the binary message, it... |
Python Audio Transfer Through Lasers | 7,614,995 | 1 | 5 | 1,017 | 0 | python,audio,signal-processing,frequency | Did you do a sanity check by listening to the sound files (both transmit and receive), or viewing the waveforms with an audio editor, to see if they roughly sound or look the same? That way you can narrow down the problem to channel induced errors versus your software analysis.
Your decoding/demodulation software will... | 0 | 0 | 0 | 1 | 2011-09-30T04:57:00.000 | 4 | 0.049958 | false | 7,606,111 | 0 | 0 | 1 | 2 | I'm currently working on a project that has been relatively easy, up until now. The underlying project is to transmit data/messages over lasers using audio transformation.
In a nutshell the process is currently like this
The user enters a message
Message is turned into binary
For each 1 and 0 in the binary message, it... |
Django ImageField "Upload a valid image. The file you uploaded was either not an image or a corrupted image." | 7,611,630 | 7 | 5 | 5,678 | 0 | python,django,virtualenv | This issue was solved by using pip to install "pillow" instead of "pil" which allows easy deployment to virtualenv. | 0 | 0 | 0 | 0 | 2011-09-30T06:18:00.000 | 3 | 1 | false | 7,606,614 | 0 | 0 | 1 | 1 | I have PIL installed, however whenever I try to upload a .png file to an image field through the Django Admin for my model, I get this error:
"Upload a valid image. The file you uploaded was either not an image or a corrupted image."
Other image types work fine. I have tried several different PNG files.
I have tried r... |
Do I need to use a web framework for a simple website? | 11,603,886 | 1 | 4 | 1,425 | 0 | python,frameworks,pyramid | As RonakG first pointed, it all depends on the kind of website you intend to have up and running. Actually, your question is too general for a single, definitive answer. There are more aspects to consider other than just being in python. For example, deadlines. This means considering the learning curve to achieve your ... | 0 | 0 | 0 | 0 | 2011-09-30T14:21:00.000 | 4 | 0.049958 | false | 7,611,759 | 0 | 0 | 1 | 4 | The site won't be that complicated and will resemble a modern blog (users, messages, news and other similar features).
Do I need to use a framework for this, and if so, which is best?
Pyramid, Django? |
Do I need to use a web framework for a simple website? | 7,612,176 | 3 | 4 | 1,425 | 0 | python,frameworks,pyramid | It depends on what kind of website you are planning to come up with. If the website is going to be just a set of static HTML files, then you don't really need a framework. But if your website will have lots of dynamic content that will get updated on regular basis, you should go with some framework. That will make y... | 0 | 0 | 0 | 0 | 2011-09-30T14:21:00.000 | 4 | 1.2 | true | 7,611,759 | 0 | 0 | 1 | 4 | The site won't be that complicated and will resemble a modern blog (users, messages, news and other similar features).
Do I need to use a framework for this, and if so, which is best?
Pyramid, Django? |
Do I need to use a web framework for a simple website? | 7,611,778 | 2 | 4 | 1,425 | 0 | python,frameworks,pyramid | Go with Django - 10,000 Elvis fans can't be wrong.
Or roll your own from scratch. You'll learn a lot, know everything about how you site works, and better appreciate what a framework does for you. | 0 | 0 | 0 | 0 | 2011-09-30T14:21:00.000 | 4 | 0.099668 | false | 7,611,759 | 0 | 0 | 1 | 4 | The site won't be that complicated and will resemble a modern blog (users, messages, news and other similar features).
Do I need to use a framework for this, and if so, which is best?
Pyramid, Django? |
Do I need to use a web framework for a simple website? | 7,612,742 | 8 | 4 | 1,425 | 0 | python,frameworks,pyramid | You certainly don't need a webframework to create a simple website. Given that you're new to python and interested in building a python website, I imagine this implies: you're interested in learning python. If you're exclusively interested in learning django-python, there's no reason you can't jump in to django, as R... | 0 | 0 | 0 | 0 | 2011-09-30T14:21:00.000 | 4 | 1 | false | 7,611,759 | 0 | 0 | 1 | 4 | The site won't be that complicated and will resemble a modern blog (users, messages, news and other similar features).
Do I need to use a framework for this, and if so, which is best?
Pyramid, Django? |
What are your best practices for working with test data in Django? | 7,613,691 | 0 | 2 | 199 | 0 | python,django,testing,tdd | Make sure you use sqlite for testing purposes. There's a considerable difference in speed compared to other db engines. | 0 | 0 | 0 | 0 | 2011-09-30T16:57:00.000 | 2 | 0 | false | 7,613,616 | 0 | 0 | 1 | 1 | I currently use a single fixtures file per application, but as projects grow, the tests are taking far too long and I believe that the (now large) fixtures being loaded for each test class are at fault.
I've avoided having lots of smaller fixtures because of concerns about duplication and maintenance, but I know think ... |
Flask's @before_request executes more than once | 7,615,352 | 6 | 4 | 1,899 | 0 | python,flask | If you run with app.debug = True and serve media files (images, css, js etc.) from Flask, they also count as full requests. If that is not the case, then please provide some more information about your setup. | 0 | 0 | 0 | 0 | 2011-09-30T19:45:00.000 | 1 | 1.2 | true | 7,615,317 | 0 | 0 | 1 | 1 | I added an app.logger.error('test') inside my @app.before_request and noticed that there are up to 8 lines of test in my log per request, even if it's just abort(500). I just can't seem to find out why, what could cause this? |
Is there any loss of functionality with streaming jobs in hbase/hadoop versus using java? | 7,707,068 | 1 | 3 | 758 | 0 | java,python,hadoop,hbase,thrift | Yes, you should get data local code execution with streaming. You do not push the data to where the program is, you push the program to where the data is. Streaming simply takes the local input data and runs it through stdin to your python program. Instead of each map running inside of a java task, it spins up and ins... | 0 | 1 | 0 | 0 | 2011-10-02T00:27:00.000 | 2 | 0.099668 | false | 7,623,858 | 0 | 0 | 1 | 1 | Sorry in advance if this is a basic question. I'm reading a book on hbase and learing but most of the examples in the book(and well as online) tend to be using Java(I guess because hbase is native to java). There are a few python examples and I know I can access hbase with python(using thrift or other modules), but I'... |
Secure authentication system in python? | 7,627,865 | 1 | 5 | 6,817 | 0 | python,security,web-applications,authentication,login | It's hard to be specific without knowing your setup. However, the one thing you should not do is reinventing the wheel. Security is tricky, if your wheel is lacking something you may not know until it's too late.
I wouldn't be surprised if your web framework came with a module/library/plugin for handling users, logins ... | 0 | 0 | 0 | 0 | 2011-10-02T16:48:00.000 | 2 | 0.099668 | false | 7,627,752 | 0 | 0 | 1 | 1 | I am making a web application in python and I would like to have a secure login system.
I have done login systems many times before by having the user login and then a random string is saved in a cookie which is also saved next to that user in a database which worked fine but it was not very secure.
I believe understan... |
Python/C Raw Socket Operations using Django, Mod_WSGI, Apache | 7,630,026 | 1 | 2 | 344 | 0 | python,django,sockets,mod-wsgi,freebsd | Use Celery or some other back end service which runs as root. Having a web application process run as root is a security problem waiting to happen. This is why mod_wsgi blocks you running daemon processes as root. Sure you could hack the code to disable the exclusion, but I am not about to tell you how to do that. | 0 | 1 | 0 | 0 | 2011-10-02T20:07:00.000 | 1 | 0.197375 | false | 7,628,889 | 0 | 0 | 1 | 1 | I'm currently writing a web application using Django, Apache, and mod_wsgi that provides some FreeBSD server management and configuration features, including common firewall operations.
My Python/C library uses raw sockets to interact directly with the firewall and works perfectly fine when running as root, but raw so... |
Can Gstreamer be used server-side to stream audio to multiple clients on demand? | 7,634,531 | 1 | 2 | 1,045 | 0 | python,audio,stream,gstreamer | You might want to look at Flumotion (www.flumotion.org). It is a python based streaming server using GStreamer, you might be able to get implementation ideas from that in terms of how you do your application. It relies heavily on the python library Twisted for its network handling. | 0 | 1 | 0 | 0 | 2011-10-03T02:17:00.000 | 1 | 0.197375 | false | 7,630,548 | 0 | 0 | 1 | 1 | I'm working on an audio mixing program (DAW) web app, and considering using Python and Python Gstreamer for the backend. I understand that I can contain the audio tracks of a single music project in a gst.Pipeline bin, but playback also appears to be controlled by this Pipeline.
Is it possible to create several "views... |
How can I test the validity of a ReferenceProperty in Appengine? | 7,637,063 | 3 | 2 | 199 | 0 | python,google-app-engine,google-cloud-datastore | This will test key existence without returning an entity:
db.Query(keys_only=True).filter('__key__ =', test_key).count(1) == 1
I'm not certain that it's computationally cheaper than fetching the entity. | 0 | 1 | 0 | 0 | 2011-10-03T15:02:00.000 | 1 | 1.2 | true | 7,636,806 | 0 | 0 | 1 | 1 | I am currently testing a small application I have written. I have not been sufficiently careful in ensuring the data in my datastore is consistent and now I have an issue that I have some records referencing objects which no longer exist. More specifially, I have some objects which have ReferenceProperty's which have b... |
HAML or Jade template syntax available for Python? | 20,442,720 | 6 | 18 | 7,585 | 0 | python,haml,pug | I really love jade. Pyjade made it possible to use jade in some python project with jinja or django.
But I have to say that pyjade is not 100% compatible with jade.
For example, ternary operator is not supported in pyjade. You can use some python syntax to do the same thing, But that will make the template only can be ... | 0 | 0 | 0 | 0 | 2011-10-03T16:25:00.000 | 4 | 1 | false | 7,637,789 | 1 | 0 | 1 | 1 | Are there any template engines for Python with a syntax similar to Jade or HAML? |
What are the different options for social authentication on Appengine - how do they compare? | 7,662,946 | 11 | 6 | 552 | 0 | python,google-app-engine,oauth,openid,facebook-authentication | In my research on this question I found that there are essentially three options:
Use Google's authentication mechanisms (including their federated login via OpenID)
Pros:
You can easily check who is logged in via the Users service provided with Appengine
Google handles the security so you can be quite sure it's wel... | 0 | 1 | 0 | 1 | 2011-10-05T10:42:00.000 | 1 | 1.2 | true | 7,660,059 | 0 | 0 | 1 | 1 | [This question is intended as a means to both capture my findings and sanity check them - I'll put up my answer toute suite and see what other answers and comments appear.]
I spent a little time trying to get my head around the different social authentication options for (python) Appengine. I was particularly confused ... |
App Engine memcache speed "dict" vs "Class Object" | 7,661,286 | 1 | 0 | 409 | 0 | python,google-app-engine | You need to measure but for all intended purposes the results should be that its about the same speed.
If any method tend to be faster I don't really think its going to impact you overall performance that much.
Your main latency will be the RPC call to the memache which might be two factor slower then the slowest seria... | 0 | 1 | 0 | 0 | 2011-10-05T10:57:00.000 | 3 | 1.2 | true | 7,660,231 | 0 | 0 | 1 | 1 | I have page handler with 95% traffic, it fetches model from DB using its key and then uses fields in the fetched model to fill a django template.
I want to memcache the fetched model so as to avoid DB reads. Not all fields of the model are used in template so i want to cache it with just the required feilds so as to i... |
python non-web application pattern | 7,681,882 | 3 | 1 | 230 | 0 | python,parsing,user-interface | MVC is just as applicable to non-web applications. The only things that change are the View (GUI controls instead of web controls) and the types of input the Controller can/must deal with. | 0 | 0 | 0 | 0 | 2011-10-07T00:08:00.000 | 2 | 1.2 | true | 7,681,871 | 1 | 0 | 1 | 1 | In web design I use MVC pattern, but sometimes I need to create non-web application.
This may be some parser or GUI utility program.
What pattern is a classic solution for this kind of application? |
Getting Apache cgi to send json in Python | 7,683,660 | 1 | 1 | 1,336 | 0 | python,ajax,apache,cgi | You need to send a Content-Type header to tell the browser what type of data you're sending it. Without that you'll get the 500 error you're experiencing. | 0 | 0 | 0 | 1 | 2011-10-07T06:05:00.000 | 2 | 0.099668 | false | 7,683,597 | 0 | 0 | 1 | 1 | I have an apache server that I am using for cgi. I am writing my cgis in Python.
As long as my responses are of the form "Content-Type: text/html\n #" it works.
But if I send anything else, I get a 500 error and my logs say "malformed header from script. Bad header" Can I change my configurations to make it work? Is... |
django/python: screen sharing api | 7,683,885 | 4 | 4 | 2,038 | 0 | python,django,api | Django is a web development framework; remote desktop viewing is a client-side task. It may be possible to integrate screen sharing into a web site that is built using Django, but Django itself will likely have no involvement with the "guts" of the task. | 0 | 0 | 0 | 0 | 2011-10-07T06:31:00.000 | 1 | 0.664037 | false | 7,683,769 | 0 | 0 | 1 | 1 | I am looking for a screen sharing functionality api in django/python which allows remote users to view your desktop in real time.
Any recommendations on a library/api to use?
Thanks. |
Python self contained web application and server? | 7,721,670 | 0 | 6 | 1,744 | 0 | python,deployment | cherrypy is the easiest one to use, django is feature rich and tornado is more advanced with asynchrounous web server(in my opinion it is better than multithreaded web server).
For what you want, django is best suitable for you IMO. | 0 | 1 | 0 | 0 | 2011-10-07T14:10:00.000 | 3 | 0 | false | 7,688,442 | 0 | 0 | 1 | 1 | What is a good and easy way to distribute a web application and server bundled together, python way?
So I can say to a user "Here take this tar/whatever, unpack it and run blahblah.py" and blahblah.py will run a http/wsgi server and serve my application?
Im looking for a stable production-ready multi-threaded wsgi-serv... |
Passing variables between Python and Javascript | 7,689,717 | 6 | 15 | 18,016 | 0 | javascript,python,variables,sqlalchemy | python has a json module, which is a perfect fit for this scenario.
using a good old AJAX, with json as the data format will allow you to exchange data between javascript and your python module.
(unless your python module is running on the client side, but then i don't see how you could execute it from the browser...) | 0 | 0 | 1 | 0 | 2011-10-07T15:49:00.000 | 3 | 1 | false | 7,689,695 | 0 | 0 | 1 | 1 | Imagine that you need to write some Javascript that simply changes a set of checkboxes when a drop down list is changed.
Depending on which item is selected in the list, some of the checkboxes will become checked/unchecked.
In the back, you have Python code along with some SQLAlchemy.
The Javascript needs to identify t... |
Processing a HTML file using Python | 7,694,645 | 1 | 0 | 278 | 0 | python,regex | Parse the HTML using BeautifulSoup, then only retrieve the text. | 0 | 0 | 0 | 0 | 2011-10-08T03:34:00.000 | 5 | 0.039979 | false | 7,694,637 | 1 | 0 | 1 | 2 | I wanted to remove all the tags in HTML file. For that I used re module of python.
For example, consider the line <h1>Hello World!</h1>.I want to retain only "Hello World!". In order to remove the tags, I used re.sub('<.*>','',string). For obvious reasons the result I get is an empty string (The regexp identifies the ... |
Processing a HTML file using Python | 7,694,658 | 1 | 0 | 278 | 0 | python,regex | You can make the match non-greedy: '<.*?>'
You also need to be careful, HTML is a crafty beast, and can thwart your regexes. | 0 | 0 | 0 | 0 | 2011-10-08T03:34:00.000 | 5 | 1.2 | true | 7,694,637 | 1 | 0 | 1 | 2 | I wanted to remove all the tags in HTML file. For that I used re module of python.
For example, consider the line <h1>Hello World!</h1>.I want to retain only "Hello World!". In order to remove the tags, I used re.sub('<.*>','',string). For obvious reasons the result I get is an empty string (The regexp identifies the ... |
Openerp Unable to Show more then 100 Meetings in Calendar View? | 7,842,932 | 0 | 1 | 270 | 0 | python,openerp | I just experimented with the calendar view for the CRM cases screen. (I don't have the meetings module installed.) It looks like the calender view doesn't update itself right away, and you can force it by moving to the next month and then back.
Here's what I did, maybe you can do something similar:
Open the list view.... | 0 | 0 | 0 | 0 | 2011-10-08T11:45:00.000 | 2 | 0 | false | 7,696,565 | 0 | 0 | 1 | 2 | When I create meetings in openerp for any user.. I can see them on both Calendar View and List View.. How ever When My meetings exceeds 100 for a single user it doesn't show newly created meetings in calendar view. How ever I can see all of them in my list view... Have any one faced this problem before.. Please Help |
Openerp Unable to Show more then 100 Meetings in Calendar View? | 8,137,529 | 0 | 1 | 270 | 0 | python,openerp | Yes,even I encountered the same problem.This is actually a limitation in OpenERP.So I created a new class called Meeting_history.So when meetings exceeds more than 90,the first 10 meetings or the older ten meetings gets removed from crm_meeting table and gets stored in meeting_history class where we can view older mee... | 0 | 0 | 0 | 0 | 2011-10-08T11:45:00.000 | 2 | 0 | false | 7,696,565 | 0 | 0 | 1 | 2 | When I create meetings in openerp for any user.. I can see them on both Calendar View and List View.. How ever When My meetings exceeds 100 for a single user it doesn't show newly created meetings in calendar view. How ever I can see all of them in my list view... Have any one faced this problem before.. Please Help |
Error was: No module named Random | 7,700,751 | 3 | 0 | 9,192 | 0 | python,django,random | If the error is exactly "No module named Random", then you've written import Random when you really meant import random. There is no module in the Python standard library called Random. Module names are case sensitive in Python. If that doesn't solve your problem, please show us some code from whatever module imports r... | 0 | 0 | 0 | 0 | 2011-10-09T00:55:00.000 | 1 | 1.2 | true | 7,700,743 | 0 | 0 | 1 | 1 | Python 2.4.3, when I run python via the command line and import random, it works just fine. When I run a django based website "python manage.py runserver", the server starts up fine, but as soon as I load a page, it tosses me this error.
I really have no clue how to fix this. I've done some searching, random is core to... |
Custom TCP/IP server in django webapp? | 7,701,968 | 2 | 1 | 1,043 | 0 | python,django | What for. Make your desktop app speak HTTP and use an alternate API provided by another application. | 0 | 0 | 0 | 0 | 2011-10-09T05:28:00.000 | 4 | 1.2 | true | 7,701,633 | 0 | 0 | 1 | 1 | I was going to write this website for communicating with others and i want to implement a desktop app too so now I was wondering whether is is possible to integrate a python, maybe twisted tcp ip server within django so that both the site and the custom tcp could run alongside each other...?
Thanks in Advance |
Best way to earmark messages in an IMAP folder? | 7,793,784 | 1 | 0 | 59 | 0 | python,imap | The UID is guaranteed to be unique. Store each one locally. | 0 | 0 | 0 | 1 | 2011-10-10T12:12:00.000 | 1 | 1.2 | true | 7,712,554 | 0 | 0 | 1 | 1 | I am working on an application that is supposed to connect to IMAP account, read through emails and pick out emails sent by lets say "Mark", then it is supposed to respond to mark
with an automatic response such as "Got it mate" and then do the same tomorrow, with the only difference that tomorrow it should not respond... |
What's the cleanest way to add arbitrary data to ModelForm? | 7,715,301 | 1 | 0 | 209 | 0 | python,django,django-1.3,django-forms | Just exclude the sender field from the ModelForm and, when you instantiate the object in the view on the POST endpoint (just before saving), make sure you populate the sender field with the appropriate session or user ID.
When you exclude the field, there is no way to add the field to the post data[1], so a user can't ... | 0 | 0 | 0 | 0 | 2011-10-10T15:38:00.000 | 2 | 0.099668 | false | 7,715,263 | 0 | 0 | 1 | 1 | Imagine we're developing a message system, and each Message has a foreign key for sender.
We're using ModelForms, and there is a MessageForm that infers its fields from Message.
Of course, we don't want the user to be able to spoof sender by posting a different sender ID.
Therefore, we must exclude sender from ModelF... |
Python Audio over Network Problems | 13,102,430 | 0 | 2 | 2,438 | 0 | python,tcp,speex,pyaudio | Did you run ping or ttcp to test network performance between the 2 hosts?
If you have latency spikes or if some packets are dropped your approach to sending voice stream will suffer badly. TCP will wait for missing packet, report it being lost, wait for retransmit, etc.
You should be using UDP over lossy links and audi... | 0 | 0 | 1 | 1 | 2011-10-11T02:55:00.000 | 1 | 0 | false | 7,720,932 | 0 | 0 | 1 | 1 | Hello I am having problems with audio being sent over the network. On my local system with no distance there is no problems but whenever I test on a remote system there is audio but its not the voice input i want its choppy/laggy etc. I believe its in how I am handling the sending of the audio but I have tried now for ... |
Web mining or scraping or crawling? What tool/library should I use? | 7,723,049 | 2 | 2 | 4,419 | 0 | java,python,web-crawler,web-scraping,web-mining | If you are going to builld a crawler you need to (Java specific):
Learn how to use the java.net.URL and java.net.URLConnection classes or use the HttpClient library
Understand http request/response headers
Understand redirects (both HTTP, HTML and Javascript)
Understand content encodings (charsets)
Use a good librar... | 0 | 0 | 1 | 0 | 2011-10-11T07:48:00.000 | 6 | 0.066568 | false | 7,722,876 | 0 | 0 | 1 | 1 | I want to crawl and save some webpages as HTML. Say, crawl into hundreds popular websites and simply save their frontpages and the "About" pages.
I've looked into many questions, but didn't find an answer to this from either web crawling or web scraping questions.
What library or tool should I use to build the solution... |
Auto-Terminating Long-Running Requests in Django | 7,732,719 | 6 | 6 | 1,440 | 0 | python,django,apache,mod-wsgi | It is actually really difficult to terminate a single Python request thread in a multithread application. The best you can do is make a decision to shutdown the whole process and restart it. Because such an action will disrupt concurrent requests, you would as a result really need to restrict yourself to a single threa... | 0 | 0 | 0 | 0 | 2011-10-11T17:50:00.000 | 1 | 1.2 | true | 7,730,257 | 0 | 0 | 1 | 1 | I've got a setup with Apache + mod_wsgi running django code, and I'd like to add a layer of protection in case a non-terminating view slips in. Something that kills-off a requests exceeding, say, 30 seconds would be ideal.
For testing I've just put a time.sleep(60) in a view.
I've tried the TimeOut 30 setting in Apach... |
Channel disconnect notification in channel api in google app engine | 7,741,709 | 4 | 4 | 1,617 | 0 | javascript,python,google-app-engine,channel-api | The amount of time it takes the Channel API front-end servers to "realize" that a channel is disconnected is contingent on browser implementation.
On well-behaved browsers, we catch the beforeunload event and post a message to our front-end that says, "this client is going away." On other browsers, we may not get the e... | 0 | 1 | 1 | 0 | 2011-10-12T06:29:00.000 | 1 | 1.2 | true | 7,736,105 | 0 | 0 | 1 | 1 | Im using my GAE application on my phone. I face a problem in getting the disconnect notification to /_ah/channel/disconnected in channels api even if i manually close the socket by socket.close() function. the post occurs after a delay of say one minute. Does anyone know the way to speed things up? In my case socket.c... |
Can we create queue in rabbitmq with python | 9,051,453 | 2 | 1 | 1,697 | 0 | python,django,rabbitmq | In AMQP, you don't create a queue. Instead, you declare a queue, and if the queue doesn't already exist, then it is created.
In some cases all you need to do is to declare the queue in the processes that consume messages. But if you want persistent and durable queues then it is best to declare them beforehand with a sh... | 0 | 0 | 0 | 0 | 2011-10-12T13:24:00.000 | 2 | 0.197375 | false | 7,740,771 | 0 | 0 | 1 | 1 | I'm working on project that need to control sending queue by code. So I just curious that anybody use to create queue in rabbitmq by python/django code? :) |
AppEngine: switching to Python 2.7 | 7,744,371 | 5 | 4 | 839 | 0 | python,google-app-engine | There is no way to avoid changing the app ID, but you can request that the old ID be aliased so requests to old_appid.appspot.com will be handled by the new application. If you're serving the application on your own domain, of course, the app ID is irrelevant.
The Master/Slave datastore will almost certainly never be s... | 0 | 1 | 0 | 0 | 2011-10-12T16:54:00.000 | 1 | 1.2 | true | 7,743,653 | 0 | 0 | 1 | 1 | For tons of reasons, I would like to go ahead and switch to Python 2.7. The new python version requires using the High Replication Datastore. As far as I can see, converting to it is not really possible: the only way is to create a new app, with new ID, and copy over the datastore. Changing my app ID is something I am ... |
Python quit unexpectedly while running Django | 7,747,494 | 0 | 1 | 1,009 | 0 | python,django,crash,interpreter,osx-lion | It looks like its the mysql-extension that crashes, if you have XCode you can try to make sure you have the latest one compiled locally and installed. | 0 | 1 | 0 | 0 | 2011-10-12T20:13:00.000 | 1 | 0 | false | 7,745,997 | 0 | 0 | 1 | 1 | I'm running Python 2.7.1 on 64-bit Mac OSX Lion. Python keeps crashing while I'm running my local Django 1.3 development server. The error log is below.
This is starting to get annoying. Any ideas?
Process: Python [22917] Path:
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Co... |
Is Pro Django book still relevant? | 7,747,777 | 23 | 12 | 2,272 | 0 | python,django,metaprogramming | It's not my place to speak about its worth or recommendations, but I wrote the book with Django 1.0 in mind precisely to make sure it stayed relevant as long as possible. The aspects of Django that I documented are still present and functional, and the general aspects of Python are also still valid. They may have grown... | 0 | 0 | 0 | 0 | 2011-10-12T20:44:00.000 | 3 | 1 | false | 7,746,344 | 0 | 0 | 1 | 2 | I want to dig deeper into Django's internals and the official online documentation only goes so far toward that end.
The reviews for Marty Alchin's Pro Django are fantastic (I've read Pro Python and really enjoyed it). However, the book is from 2008 and is based on Django v1.0. My company builds off v1.3.
Is this bo... |
Is Pro Django book still relevant? | 7,746,386 | 8 | 12 | 2,272 | 0 | python,django,metaprogramming | Yes, it's definitely still relevant. Although a lot has changed in Django since version 1, the internal parts and the concepts that Pro Django deals with are mostly the same. I'd have no hesitation in recommending the book - it's a really useful insight into how Django works and teaches some very useful methods as well... | 0 | 0 | 0 | 0 | 2011-10-12T20:44:00.000 | 3 | 1.2 | true | 7,746,344 | 0 | 0 | 1 | 2 | I want to dig deeper into Django's internals and the official online documentation only goes so far toward that end.
The reviews for Marty Alchin's Pro Django are fantastic (I've read Pro Python and really enjoyed it). However, the book is from 2008 and is based on Django v1.0. My company builds off v1.3.
Is this bo... |
Running command with browser | 7,747,962 | 0 | 0 | 198 | 0 | javascript,python,macos,unix,controls | On the client side (the browser), you can do it with the simplest approach. Just an html form. javascript would make it nicer for validation and to do ajax calls so the page doesnt have to refresh. But your main focus is handling it on the server. You could receive the form request in the language of your choice. If yo... | 0 | 0 | 1 | 0 | 2011-10-12T23:43:00.000 | 3 | 0 | false | 7,747,852 | 0 | 0 | 1 | 2 | I want to have a "control panel" on a website, and when a button is pressed, I want it to run a command on the server (my computer). The panel is to run different python scripts I wrote (one script for each button), and I want to run the panel on my Mac, my iPod touch, and my wii. The best way I see for this is a web... |
Running command with browser | 7,747,896 | 0 | 0 | 198 | 0 | javascript,python,macos,unix,controls | Here are three options:
Have each button submit a form with the name of the script in a hidden field. The server will receive the form parameters and can then branch off to run the appropriate script.
Have each button hooked to it's own unique URL and use javascript on the button click to just set window.location to ... | 0 | 0 | 1 | 0 | 2011-10-12T23:43:00.000 | 3 | 1.2 | true | 7,747,852 | 0 | 0 | 1 | 2 | I want to have a "control panel" on a website, and when a button is pressed, I want it to run a command on the server (my computer). The panel is to run different python scripts I wrote (one script for each button), and I want to run the panel on my Mac, my iPod touch, and my wii. The best way I see for this is a web... |
account(s) management over multiple tenants | 7,757,039 | 2 | 2 | 126 | 0 | python,google-app-engine,namespaces,user-accounts | If 'user identity' can span tenants (your apps), then keep user entities in a common namespace (the default namespace works fine for that, and that's the default when a request begins). Anything specific to a tenant (e.g., what authorization a user identity has for a specific tenant) can be stored where it is most conv... | 0 | 1 | 0 | 0 | 2011-10-13T14:58:00.000 | 1 | 1.2 | true | 7,756,132 | 0 | 0 | 1 | 1 | i have an app with multiple tenants on GAE.
over the 'master' (which is a tenant on its own) i let people register and create a subapp/tenant where the creator is the owner of the app.
what is the best way to manage the user accounts?
lets say USER_A creates APP_A and USER_B creates APP_B.
so there are 2 users and 2 ... |
PyDev project for Google App Engine not finding webapp2 | 17,769,623 | 0 | 6 | 5,907 | 0 | python,eclipse,google-app-engine,pydev | adding ${GOOGLE_APP_ENGINE}/lib/webapp2-2.5.2 to the "External Libraries" worked for me.
App Engine SDK ver:1.8.2
Python version: 2.7 | 0 | 1 | 0 | 0 | 2011-10-13T16:00:00.000 | 5 | 0 | false | 7,756,981 | 0 | 0 | 1 | 3 | I am attempting to try out Google App Engine with python. Being familiar with Eclipse, I decided to use PyDev. After some trouble, I have a hello world program working... almost. It cannot find the webapp2 import, telling me it is unresolved. I have followed all of the instructions I can find, and have the google a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.