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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Internal Server Error on Django Deploy | 3,322,601 | 3 | 1 | 2,142 | 0 | python,django,apache,django-admin,deployment | Set DEBUG = True so that you can see the Django traceback | 0 | 0 | 0 | 0 | 2010-07-23T20:19:00.000 | 2 | 0.291313 | false | 3,322,052 | 0 | 0 | 1 | 2 | Im getting 500 internal server error everytime I try access my admin or login page. There's nothing in my error.log
Any ideas ? |
Internal Server Error on Django Deploy | 3,391,645 | 3 | 1 | 2,142 | 0 | python,django,apache,django-admin,deployment | My DEBUG was set True. I found the error on my apache_log. The problem was that my sqlite3 database was a read only file. | 0 | 0 | 0 | 0 | 2010-07-23T20:19:00.000 | 2 | 1.2 | true | 3,322,052 | 0 | 0 | 1 | 2 | Im getting 500 internal server error everytime I try access my admin or login page. There's nothing in my error.log
Any ideas ? |
Am I supposed to directly modify User models in auth modules in frameworks? | 3,323,179 | 1 | 0 | 56 | 0 | python,django,frameworks,turbogears | The latter: build a model with a one to one relationship to the User. Don't modify the django one directly or you'll likely run into trouble sooner or later. The django team won't be taking your changes into account after all and you could be adversely impacted if any internal changes are made. (Though you needn't w... | 0 | 0 | 0 | 0 | 2010-07-23T23:43:00.000 | 1 | 1.2 | true | 3,323,139 | 0 | 0 | 1 | 1 | I am new to using Frameworks for web development and I have noticed that frameworks like django, turbogears etc come with auth packages which contains user models. Am I supposed to directly modify these and use them as my User models or am I supposed to associate my own user models to these and use them just for authen... |
Maven equivalent for python | 4,560,558 | 6 | 162 | 113,883 | 0 | python,deployment,dependency-management | It's good to use virtualenv to create standalone project environment and use pip/easy_install to management dependencies. | 0 | 1 | 0 | 0 | 2010-07-24T06:41:00.000 | 5 | 1 | false | 3,324,108 | 0 | 0 | 1 | 1 | I'm a java developer/python beginner, and I'm missing my maven features, particularly dependency management and build automation (I mean you don't build, but how to create a package for deployment?)
Is there a python equivalent to achieve these features?
Note: I use python 2.x
Thanks. |
Which technology should I use to develop a high performance web application | 3,324,710 | 1 | 0 | 3,428 | 0 | c#,java,python | I kinda think this is almost more like a religious problem, than a real technical issue. For almost every programming language you can find a big website that's using it.
.NET -> Microsoft
Ruby -> Twitter (yes, they have a few issues, but still)
PHP -> Facebook
Java -> Lots of finance companies
Don't know about Phyton,... | 0 | 0 | 0 | 1 | 2010-07-24T10:16:00.000 | 5 | 0.039979 | false | 3,324,683 | 0 | 0 | 1 | 2 | I have couple of ideas in my brain which I would like to bring out before it's too late. Basically I want to develop a web application which I could sell it to clients. So which technology shall I use to accomplish this? I have been a C and C++ software developer but it's been a very long time since I have developed on... |
Which technology should I use to develop a high performance web application | 3,324,720 | 6 | 0 | 3,428 | 0 | c#,java,python | Usually the programming language doesn't really matter. All have their own strengths and weaknesses. All come up with their own best-practices and frameworks.
It's really up to you what's your preference. If you are coming from Microsoft C/C++ I'd use .NET, if you are from Linux world I'd use Java.
Back in the 90s Jav... | 0 | 0 | 0 | 1 | 2010-07-24T10:16:00.000 | 5 | 1 | false | 3,324,683 | 0 | 0 | 1 | 2 | I have couple of ideas in my brain which I would like to bring out before it's too late. Basically I want to develop a web application which I could sell it to clients. So which technology shall I use to accomplish this? I have been a C and C++ software developer but it's been a very long time since I have developed on... |
Python: Detecting the actual text paragraphs in a string | 3,325,874 | 2 | 2 | 2,958 | 0 | python,html,text,screen-scraping | A general solution to this problem is a non-trivial problem to solve.
To put this in context, a large part of Google's success with search has come from their ability to automatically discern some semantic meaning from arbitrary Web pages, namely figuring out where the "content" is.
One idea that springs to mind is if ... | 0 | 0 | 1 | 0 | 2010-07-24T16:15:00.000 | 4 | 0.099668 | false | 3,325,817 | 0 | 0 | 1 | 1 | The big mission: I am trying to get a few lines of summary of a webpage. i.e. I want to have a function that takes a URL and returns the most informative paragraph from that page. (Which would usually be the first paragraph of actual content text, in contrast to "junk text", like the navigation bar.)
So I managed to re... |
GAE - Sharing Authentication Across Apps | 3,325,984 | 1 | 0 | 263 | 0 | python,google-app-engine,authentication,openid | Not using the built in authentication support - users have to authenticate separately with each application. | 0 | 1 | 0 | 0 | 2010-07-24T16:36:00.000 | 2 | 0.099668 | false | 3,325,906 | 0 | 0 | 1 | 1 | Let's say I had a root app and multiple sub-apps. Would it be possible to share authenticated sessions across them?
I'm using Google App Engine (Python). |
Facebook wall writing application | 3,327,259 | 4 | 3 | 1,795 | 0 | php,python,facebook | Check out the Facebook API. It will more than likely show that the wall post came from your application. As far as the language you implement in, I think you could use Python. | 0 | 0 | 0 | 1 | 2010-07-24T22:55:00.000 | 6 | 0.132549 | false | 3,327,244 | 0 | 0 | 1 | 2 | I was wondering if i could possible write an app, that could be a list of all my friends and just simply posting a message to their walls on the friends i select. Not a message, a wall post. So it appears that i went to their wall and wrote a message, they have no idea that an app is pushing the message to them.
also c... |
Facebook wall writing application | 3,327,248 | 3 | 3 | 1,795 | 0 | php,python,facebook | There are a couple of Facebook APIs that could tie in to. I'm at work and any website that makes mention of facebook is blocked so I can't provide links, but Google 'Facebook API'. | 0 | 0 | 0 | 1 | 2010-07-24T22:55:00.000 | 6 | 0.099668 | false | 3,327,244 | 0 | 0 | 1 | 2 | I was wondering if i could possible write an app, that could be a list of all my friends and just simply posting a message to their walls on the friends i select. Not a message, a wall post. So it appears that i went to their wall and wrote a message, they have no idea that an app is pushing the message to them.
also c... |
Control access to parts of a system, but also to certain pieces of information | 3,327,313 | 2 | 2 | 214 | 1 | python,access-control | This problem is not really new; it's basically the general problem of authorization and access rights/control.
In order to avoid having to model and maintain a complete graph of exactly what objects each user can access in each possible way, you have to make decisions (based on what your application does) about how to ... | 0 | 0 | 0 | 0 | 2010-07-24T23:11:00.000 | 4 | 0.099668 | false | 3,327,279 | 0 | 0 | 1 | 3 | This is a tricky question, we've been talking about this for a while (days) and haven't found a convincingly good solution. This is the situation:
We have users and groups. A user can belong to many groups (many to many relation)
There are certain parts of the site that need access control, but:
There are certain ROWS... |
Control access to parts of a system, but also to certain pieces of information | 3,327,325 | 0 | 2 | 214 | 1 | python,access-control | It's hard to be specific without knowing more about your setup and about why exactly you need different users to have different permissions on different rows. But generally, I would say that whenever you access any data in the database in your code, you should precede it by an authorization check, which examines the cu... | 0 | 0 | 0 | 0 | 2010-07-24T23:11:00.000 | 4 | 0 | false | 3,327,279 | 0 | 0 | 1 | 3 | This is a tricky question, we've been talking about this for a while (days) and haven't found a convincingly good solution. This is the situation:
We have users and groups. A user can belong to many groups (many to many relation)
There are certain parts of the site that need access control, but:
There are certain ROWS... |
Control access to parts of a system, but also to certain pieces of information | 3,327,726 | 0 | 2 | 214 | 1 | python,access-control | Add additional column "category" or "type" to the table(s), that will categorize the rows (or if you will, group/cluster them) - and then create a pivot table that defines the access control between (rowCategory, userGroup). So for each row, by its category you can pull which userGroups have access (and what kind of ac... | 0 | 0 | 0 | 0 | 2010-07-24T23:11:00.000 | 4 | 0 | false | 3,327,279 | 0 | 0 | 1 | 3 | This is a tricky question, we've been talking about this for a while (days) and haven't found a convincingly good solution. This is the situation:
We have users and groups. A user can belong to many groups (many to many relation)
There are certain parts of the site that need access control, but:
There are certain ROWS... |
How to modify django cms multilingual middleware | 3,356,666 | 2 | 2 | 444 | 0 | python,django,django-cms | Sounds like you need to modify your urls.py, not your settings or middleware. | 0 | 0 | 0 | 0 | 2010-07-25T01:12:00.000 | 1 | 0.379949 | false | 3,327,590 | 0 | 0 | 1 | 1 | hey guys, im trying to internationalize my site, so i have the django cms multilingual middleware class in my settings.py , when viewed from brasil, the url changes to
www.ashtangayogavideo.com/pt/ash/homepage/ resulting in a 404, because my site is in www.ashtangayogavideo.com/ash/en/homepage, how can i configure the ... |
What's the best way to get a description of the website, in Python? | 3,332,528 | 1 | 6 | 519 | 0 | python,html,string,templates,parsing | It's very hard to come up with a rule that works 100% of the time, obviously, but my suggestion as a starting point would be to look for the first <h1> tag (or <h2>, <h3>, etc - the highest one you can find) then the bit of text after that can be used as the description. As long as the site is semantically marked-up, t... | 0 | 0 | 1 | 0 | 2010-07-26T05:59:00.000 | 3 | 0.066568 | false | 3,332,494 | 0 | 0 | 1 | 1 | Suppose I downloaded the HTML code, and I can parse it.
How do I get the "best" description of that website, if that website does not have meta-description tag? |
Google app engine parsing xml more then 1 mb | 3,334,425 | 2 | 1 | 485 | 0 | python,google-app-engine,parsing | The 1MB limit doesn't apply to parsing; however, you can't fetch more than 1MB from URLfetch; you'll only get the first 1MB from the API.
It's probably not going to be possible to get the XML into your application using the URLfetch API. If the data is smaller than 10MB, you can arrange for an external process to POST... | 0 | 1 | 1 | 0 | 2010-07-26T07:14:00.000 | 1 | 0.379949 | false | 3,332,897 | 0 | 0 | 1 | 1 | Hi i need to parse xml file which is more then 1 mb in size, i know GAE can handle request and response up to 10 MB but as we need to use SAX parser API and API GAE has limit of 1 MB so is there way we can parse file more then 1 mb any ways. |
Python/Web: What's the best way to run Python on a web server? | 3,339,594 | 4 | 2 | 5,769 | 0 | python,webserver,mod-wsgi | Don't get carried away with trying to work out what is the fastest web server. All you will do in doing that is waste your time. This is because the web server is nearly never the bottleneck if you set them up properly. The real bottleneck is your web application, database access etc.
As such, choose whatever web hosti... | 0 | 0 | 0 | 1 | 2010-07-26T16:21:00.000 | 6 | 0.132549 | false | 3,336,787 | 0 | 0 | 1 | 2 | I am leasing a dedicated web server.
I have a Python web-application.
Which configuration option (CGI, FCGI, mod_python, Passenger, etc) would result in Python being served the fastest on my web server and how do I set it up that way?
UPDATE:
Note, I'm not using a Python framework such as Django or Pylons. |
Python/Web: What's the best way to run Python on a web server? | 3,336,816 | -1 | 2 | 5,769 | 0 | python,webserver,mod-wsgi | You don't usually just serve Python, you serve a specific web server or framework based on Python. eg. Zope, TurboGears, Django, Pylons, etc. Although they tend to be able to operate on different web server back-ends (and some provide an internal web server themselves), the best solution will depend on which one you us... | 0 | 0 | 0 | 1 | 2010-07-26T16:21:00.000 | 6 | -0.033321 | false | 3,336,787 | 0 | 0 | 1 | 2 | I am leasing a dedicated web server.
I have a Python web-application.
Which configuration option (CGI, FCGI, mod_python, Passenger, etc) would result in Python being served the fastest on my web server and how do I set it up that way?
UPDATE:
Note, I'm not using a Python framework such as Django or Pylons. |
Big picture questions regarding Django, Java, Python, HTML and web-site development in general | 3,346,150 | 10 | 6 | 1,807 | 0 | java,python,html,django,mobile | Django wasn't trying to innovate in how web sites are displayed in the browser. Their goal was to simplify the process of building a web site. They could have taken on new ways of creating widgets in the browser as part of that goal, but they didn't. There was plenty of pain to relieve in the classic construction of ... | 0 | 0 | 0 | 0 | 2010-07-27T16:49:00.000 | 8 | 1 | false | 3,345,916 | 0 | 0 | 1 | 5 | I am trying to get a handle on the state of the art regarding web site development and have several questions. Maybe I'll end up finding most of the answers on my own. I come from a background of C++ and Windows development, and generally I am befuddled by what seems to be the ad-hoc nature of web development.
I focus... |
Big picture questions regarding Django, Java, Python, HTML and web-site development in general | 3,346,994 | 7 | 6 | 1,807 | 0 | java,python,html,django,mobile | All the innovation would concern database issues, business logic, reusability of code, etc - but not actually anything new regarding innovative visual controls or graphics for a web-site
Correct. Good assessment. Is that a problem?
html might be analagous to assembler, so a conventional application developer from y... | 0 | 0 | 0 | 0 | 2010-07-27T16:49:00.000 | 8 | 1 | false | 3,345,916 | 0 | 0 | 1 | 5 | I am trying to get a handle on the state of the art regarding web site development and have several questions. Maybe I'll end up finding most of the answers on my own. I come from a background of C++ and Windows development, and generally I am befuddled by what seems to be the ad-hoc nature of web development.
I focus... |
Big picture questions regarding Django, Java, Python, HTML and web-site development in general | 3,452,710 | 1 | 6 | 1,807 | 0 | java,python,html,django,mobile | And I would have thought previously that html might be analagous to assembler, so a conventional application developer from years past might know and occasionally even use a little assembler, but generally would hardly ever use it, whereas from what I can see, html (and also CSS and javascript) still have to be mastere... | 0 | 0 | 0 | 0 | 2010-07-27T16:49:00.000 | 8 | 0.024995 | false | 3,345,916 | 0 | 0 | 1 | 5 | I am trying to get a handle on the state of the art regarding web site development and have several questions. Maybe I'll end up finding most of the answers on my own. I come from a background of C++ and Windows development, and generally I am befuddled by what seems to be the ad-hoc nature of web development.
I focus... |
Big picture questions regarding Django, Java, Python, HTML and web-site development in general | 3,347,792 | 1 | 6 | 1,807 | 0 | java,python,html,django,mobile | From what I read, ROR tries to do everything for you behind the scenes and so therefore is slow and unscalable (and overhyped and not ready for prime time).
Well, first of all, you shouldn't believe everything you read on the Internet:
I wouldn't say RoR isn't ready for primetime. RoR, like any tool, has its uses. If... | 0 | 0 | 0 | 0 | 2010-07-27T16:49:00.000 | 8 | 0.024995 | false | 3,345,916 | 0 | 0 | 1 | 5 | I am trying to get a handle on the state of the art regarding web site development and have several questions. Maybe I'll end up finding most of the answers on my own. I come from a background of C++ and Windows development, and generally I am befuddled by what seems to be the ad-hoc nature of web development.
I focus... |
Big picture questions regarding Django, Java, Python, HTML and web-site development in general | 3,347,103 | 2 | 6 | 1,807 | 0 | java,python,html,django,mobile | And I would have thought previously that html might be analagous to assembler, so a conventional application developer from years past might know and occasionally even use a little assembler, but generally would hardly ever use it, whereas from what I can see, html (and also CSS and javascript) still have to be mastere... | 0 | 0 | 0 | 0 | 2010-07-27T16:49:00.000 | 8 | 0.049958 | false | 3,345,916 | 0 | 0 | 1 | 5 | I am trying to get a handle on the state of the art regarding web site development and have several questions. Maybe I'll end up finding most of the answers on my own. I come from a background of C++ and Windows development, and generally I am befuddled by what seems to be the ad-hoc nature of web development.
I focus... |
Starting with Android: Java or Python (SL4A) | 3,347,032 | 2 | 12 | 11,760 | 0 | java,python,android,sl4a | More likely will depend what type of applications you will develop.
I would start with Java to become familiar with Android SDK. Anyway first you need to look into some examples, tutorials. Most of them are done in Java, and only a few, probably on the dev site of SL4A for that.
Also there is native development Androi... | 0 | 0 | 0 | 0 | 2010-07-27T19:04:00.000 | 5 | 0.07983 | false | 3,346,970 | 0 | 0 | 1 | 1 | I just ordered an Android smartphone and want to start playing around with creating my own applications. Now the question is which language to use, the native Java or Python using SL4A (former ASE).
I tend to Python, as I know it much better than Java, but I'm wondering what I would be missing using a "second class" la... |
Sending data to django site | 33,887,695 | 0 | 0 | 2,883 | 0 | python,django,web-applications | Try Django Rest Framework with angular.
You can have the Django/Django Rest as backend.
For frontend you can have angular or react.js with nodejs or python simplehttp server or grunt or gulp running.
So front end will communicate to django server to get data. For logging in, you could use auth-token and angular cooki... | 0 | 0 | 0 | 0 | 2010-07-27T23:59:00.000 | 3 | 0 | false | 3,348,912 | 0 | 0 | 1 | 1 | I am trying to build a django service to which numerous clients will send data. Each client will represent an authenticated user, who might be connected to the internet or not, so the client will aggregate the data and send them when a connection is available. The data should also be persisted locally so that they are ... |
Duplicate key-value pairs returned by memcached | 3,349,680 | 0 | 0 | 757 | 0 | python,concurrency,memcached | Which is a bigger problem: having redundant data, or getting more than one result back for a query?
If the former is the problem, then you've got a nasty concurrency issue to solve on your hands.
If the latter is the problem, however, why not just give each host that's storing values in memcache a unique identifier, an... | 0 | 0 | 0 | 0 | 2010-07-28T03:07:00.000 | 2 | 0 | false | 3,349,614 | 0 | 0 | 1 | 1 | We are using a cluster of memcached servers for caching purpose, in a Django(Python) production, having tried both cmemcache and python-memcache as the API. The problem is under high concurrency, we started to have duplicate key-value pairs, that is to say we are having multi values for a single key. Is there anyone ha... |
On the google app engine, why do updates not reflect in a transaction? | 3,350,082 | 0 | 2 | 215 | 1 | python,google-app-engine | Looks like you are not doing a commit on the transaction before querying
start a db transaction
update entityX by setting entityX.flag = True
save entityX
COMMIT TRANSACTION
query for entity where flag == True. BUT, here is the problem. This query does NOT return any results. It should have returned entityX, but it d... | 0 | 1 | 0 | 0 | 2010-07-28T05:06:00.000 | 2 | 0 | false | 3,350,068 | 0 | 0 | 1 | 1 | I store groups of entities in the google app engine Data Store with the same ancestor/parent/entityGroup. This is so that the entities can be updated in one atomic datastore transaction.
The problem is as follows:
I start a db transaction
I update entityX by setting entityX.flag = True
I save entityX
I query for entit... |
Getting started with Pylons and MVC - Need some guidance on design | 3,410,261 | 0 | 0 | 155 | 0 | python,model-view-controller,design-patterns,pylons | Model is for your db-related code. All queries go there, including adding new records/updating existing ones.
Controllers are somewhat ambigous, different projects use different approaches to it. Reddit for example does fair bit of what should be View in controllers.
I, for one, prefer to limit my controllers to reques... | 0 | 0 | 0 | 0 | 2010-07-28T08:06:00.000 | 2 | 0 | false | 3,350,972 | 0 | 0 | 1 | 1 | I've been getting more and more interested in using Pylons as my Python web framework and I like the idea of MVC but, coming from a background of never using 'frameworks/design patterns/ what ever it\'s called', I don't really know how to approach it.
From what I've read in the Pylons Book, so far, it seems I do the fo... |
Getting BeautifulSoup to catch tags in a non-case-sensitive way | 3,352,681 | 2 | 4 | 3,331 | 0 | python,html,parsing,beautifulsoup,case-insensitive | BeautifulSoup standardises the parse tree on input. It converts tags to lower-case. You don't have anything to worry about IMO. | 0 | 0 | 0 | 0 | 2010-07-28T11:58:00.000 | 2 | 0.197375 | false | 3,352,563 | 0 | 0 | 1 | 1 | I want to catch some tags with BeautifulSoup: Some <p> tags, the <title> tag, some <meta> tags. But I want to catch them regardless of their case; I know that some sites do meta like this: <META> and I want to be able to catch that.
I noticed that BeautifulSoup is case-sensitive by default. How do I catch these tags in... |
IPC (inter process communication) between python and java | 35,616,834 | 0 | 17 | 16,516 | 0 | java,python,ipc,multiprocessing,multiple-processes | I had a similar situation where I had to communicate between a Java process and a Linux process. I used named pipes.
Try mkfifo() implementation in python. | 0 | 0 | 0 | 0 | 2010-07-28T19:16:00.000 | 6 | 0 | false | 3,356,554 | 0 | 0 | 1 | 1 | First, a little explanation of why I'm asking this question in the first place:
I'm writing a python program (with a wxPython gui) that needs to call a Java AWT program from python and extract data from it. I have an in-process working solution on Windows. I also have an in-process solution on OSX so long as I run the ... |
How can I get the current language in Django? | 3,359,880 | 101 | 110 | 85,439 | 0 | python,django,internationalization | Or you can also get this in your views
request.LANGUAGE_CODE | 0 | 0 | 0 | 0 | 2010-07-28T20:01:00.000 | 6 | 1 | false | 3,356,964 | 0 | 0 | 1 | 2 | How can I get the current language in the current thread in a model or in the admin? |
How can I get the current language in Django? | 19,680,511 | 9 | 110 | 85,439 | 0 | python,django,internationalization | Just to add that if you do use django.utils.translation.get_language() then you should bear in mind that if that section of code will be called asynchronously (e.g. as a celery task) then this approach won't work due to it running in a different thread. | 0 | 0 | 0 | 0 | 2010-07-28T20:01:00.000 | 6 | 1 | false | 3,356,964 | 0 | 0 | 1 | 2 | How can I get the current language in the current thread in a model or in the admin? |
How do I choose a task_id using celery? | 3,379,809 | 4 | 4 | 604 | 0 | python,django,celery | You can certainly use "natural ids", but then to be really useful they would have to
be reverseable, which doesn't work if you add that timestamp. Also the ids are unique, so two tasks can't have the same id (the behavior then is undefined)
If you have a task to refresh the timeline of a twitter user, then you know tha... | 0 | 1 | 0 | 0 | 2010-07-28T21:06:00.000 | 1 | 1.2 | true | 3,357,489 | 0 | 0 | 1 | 1 | For now I get a task_id from the async_result and have to save it the get it back later.
Would be better if I knew what the task_id what made of so I can calculate it back instead of pulling from the DB. E.G: set a task with task_id=("%s-%s" % (user_id, datetime)). |
Django Admin "Helper" Functionality Not Working on Server | 3,357,805 | 0 | 0 | 78 | 0 | python,django,django-admin | You are probably not serving javascript files properly. To have this functionality, proper javascript must loaded. | 0 | 0 | 0 | 0 | 2010-07-28T21:46:00.000 | 1 | 1.2 | true | 3,357,779 | 0 | 0 | 1 | 1 | In my localhost Django administrator I am able to fill-in Date and Time fields by clicking on the little "Date" and "Time" helper icons next to my pub_date field. However, the same administrator on my Server does NOT show these icons. The server-side admin also doesn't pop open a pop-up window for the little "+" plus s... |
Dynamically Created Top Articles List in Django? | 3,359,618 | 0 | 2 | 117 | 0 | python,mysql,django | An index wouldn't help as them main problem I believe is not so much getting the sorted list as having a DB write with every page view of an article. Another index actually makes that problem worse, albeit only a little.
So I'd go with the cache. I think django's cache shim is a problem here because it requires timeout... | 0 | 0 | 0 | 0 | 2010-07-29T03:04:00.000 | 4 | 0 | false | 3,359,214 | 0 | 0 | 1 | 3 | I'm creating a Django-powered site for my newspaper-ish site. The least obvious and common-sense task that I have come across in getting the site together is how best to generate a "top articles" list for the sidebar of the page.
The first thing that came to mind was some sort of database column that is updated (based... |
Dynamically Created Top Articles List in Django? | 3,359,569 | 0 | 2 | 117 | 0 | python,mysql,django | If you do something like sort by top views, it would be fast if you index the view column in the DB. Another option is to only collect the top x articles every hour or so, and toss that value into Django's cache framework.
The nice thing about caching the list is that the algorithm you use to determine top articles ... | 0 | 0 | 0 | 0 | 2010-07-29T03:04:00.000 | 4 | 0 | false | 3,359,214 | 0 | 0 | 1 | 3 | I'm creating a Django-powered site for my newspaper-ish site. The least obvious and common-sense task that I have come across in getting the site together is how best to generate a "top articles" list for the sidebar of the page.
The first thing that came to mind was some sort of database column that is updated (based... |
Dynamically Created Top Articles List in Django? | 3,361,120 | 1 | 2 | 117 | 0 | python,mysql,django | Premature optimization, first try the db way and then see if it really is too database sensitive. Any decent database has so good caches it probably won't matter very much. And even if it is a problem, take a look at the other db/cache suggestions here.
It is most likely by the way is that you will have many more inte... | 0 | 0 | 0 | 0 | 2010-07-29T03:04:00.000 | 4 | 0.049958 | false | 3,359,214 | 0 | 0 | 1 | 3 | I'm creating a Django-powered site for my newspaper-ish site. The least obvious and common-sense task that I have come across in getting the site together is how best to generate a "top articles" list for the sidebar of the page.
The first thing that came to mind was some sort of database column that is updated (based... |
Scraping websites with Javascript enabled? | 3,364,608 | 6 | 17 | 23,351 | 0 | javascript,python,screen-scraping | I would actually suggest using Selenium. Its mainly designed for testing Web-Applications from a "user perspective however it is basically a "FireFox" driver. I've actually used it for this purpose ... although I was scraping an dynamic AJAX webpage. As long as the Javascript form has a recognizable "Anchor Text" th... | 0 | 0 | 1 | 0 | 2010-07-29T13:18:00.000 | 6 | 1 | false | 3,362,859 | 0 | 0 | 1 | 1 | I'm trying to scrape and submit information to websites that heavily rely on Javascript to do most of its actions. The website won't even work when i disable Javascript in my browser.
I've searched for some solutions on Google and SO and there was someone who suggested i should reverse engineer the Javascript, but i ha... |
E-mail traceback on errors in Bottle framework | 3,393,377 | 3 | 2 | 894 | 0 | python,error-handling,bottle | in the error500 function written after the @error decorator to serve my customized error page, wrote error.exception and error.traceback, these two give the exception and complete traceback of the error message. | 0 | 0 | 0 | 1 | 2010-07-29T13:47:00.000 | 2 | 0.291313 | false | 3,363,167 | 0 | 0 | 1 | 1 | I am using the Bottle framework. I have set the @error decorator so I am able to display my customized error page, and i can also send email if any 500 error occurs, but I need the complete traceback to be sent in the email. Does anyone know how to have the framework include that in the e-mail? |
pyqt, webkit and facebook authentication? | 5,099,848 | 0 | 4 | 640 | 0 | python,facebook,webkit,pyqt | I don't believe you can open an "authentication page" in a separate window under Facebook's terms (I used to work for Zynga, and we couldn't then, so I don't know how you'd achieve this now legally).
Second, you're looking into the QWebkit backwards I believe. From a UI perspective this is supposed to provide access t... | 1 | 0 | 0 | 0 | 2010-07-30T12:51:00.000 | 1 | 1.2 | true | 3,371,549 | 0 | 0 | 1 | 1 | Are there any examples how to authenticate your desktop Facebook application using PyQT and embedded webkit?
This is to provide better user experience than opening Facebook authentication page in a separate browser window. |
When to thread? | 3,372,837 | 2 | 5 | 189 | 0 | python,multithreading | Usual approach for handling HTTP requests synchronously is to spawn (or re-use one in the pool) new thread for each request as soon as it comes.
However, python threads are not very good for HTTP, due to GIL and some i/o and other calls blocking whole app, including other threads.
You should look into multiprocessing ... | 0 | 0 | 0 | 0 | 2010-07-30T15:07:00.000 | 2 | 1.2 | true | 3,372,774 | 1 | 0 | 1 | 1 | I have never written any code that uses threads.
I have a web application that accepts a POST request, and creates an image based on the data in the body of the request.
Would I want to spin off a thread for the image creation, as to prevent the server from hanging until the image is created? Is this an appropriate us... |
Django object extension / one to one relationship issues | 3,376,487 | 0 | 2 | 709 | 0 | python,django,inheritance,inline,admin | All fields in the superclass also exist on the subclass, so having an explicit relation is unnecessary.
Model inheritance in Django is terrible. Don't use it. Python doesn't need it anyway. | 0 | 0 | 0 | 0 | 2010-07-31T02:08:00.000 | 2 | 0 | false | 3,376,479 | 0 | 0 | 1 | 2 | Howdy. I'm working on migrating an internal system to Django and have run into a few wrinkles.
Intro
Our current system (a billing system) tracks double-entry bookkeeping while allowing users to enter data as invoices, expenses, etc.
Base Objects
So I have two base objects/models:
JournalEntry
JournalEntryItems
defin... |
Django object extension / one to one relationship issues | 3,396,991 | 1 | 2 | 709 | 0 | python,django,inheritance,inline,admin | First, inheriting from a model creates an automatic OneToOneField in the inherited model towards the parents so you don't need to add them. Remove them if you really want to use this form of model inheritance.
If you only want to share the member of the model, you can use Meta inheritance which will create the inherit... | 0 | 0 | 0 | 0 | 2010-07-31T02:08:00.000 | 2 | 1.2 | true | 3,376,479 | 0 | 0 | 1 | 2 | Howdy. I'm working on migrating an internal system to Django and have run into a few wrinkles.
Intro
Our current system (a billing system) tracks double-entry bookkeeping while allowing users to enter data as invoices, expenses, etc.
Base Objects
So I have two base objects/models:
JournalEntry
JournalEntryItems
defin... |
Django MySql setup | 3,377,350 | 1 | 0 | 5,039 | 1 | python,mysql,django | syncdb will not create a database for you -- it only creates tables that don't already exist in your schema. You need to:
Create a user to 'own' the database (root is a bad choice).
Create the database with that user.
Update the Django database settings with the correct database name, user, and password. | 0 | 0 | 0 | 0 | 2010-07-31T03:34:00.000 | 2 | 0.099668 | false | 3,376,673 | 0 | 0 | 1 | 1 | I set up Mysql5, mysql5-server and py26-mysql using Macports. I then started the mysql server and was able to start the prompt with mysql5
In my settings.py i changed database_engine to "mysql" and put "dev.db" in database_name.
I left the username and password blank as the database doesnt exist yet.
When I ran python ... |
A scalable solution for server side push? | 3,378,244 | 2 | 3 | 651 | 0 | php,python,linux,server-push,publish-subscribe | If you know in advance you'll have a lot of subscribers (people/applications) that want notifications on a certain subject while on other hand you'll have few different subjects consider a pull technology anyway.
RSS, Atom are quite successful even though they use pull. The reason: no need to have an administration on ... | 0 | 1 | 0 | 0 | 2010-07-31T11:50:00.000 | 3 | 0.132549 | false | 3,377,951 | 0 | 0 | 1 | 1 | I would like to implement a mechanism which will provide a RESTful API that allows a client to register interest in a subject with a sever, and receive asynchronous notifications from the server after the interest is registered. In enterprise (messaging) architecture, this is known as publish/subscribe 'pattern'.
With ... |
Can Python be good alternative for web app that would otherwise be done in Java EE? | 3,379,488 | 3 | 8 | 1,841 | 0 | java,python,jakarta-ee | Any language/framework is a good choice, if it is used properly by competent developers. Sometimes the best choice is the one with which your team is most familiar.
Given your client space though, if you want to move to a "higher productivity" framework, I suggest Grails. Its implemented in Groovy, which Java develop... | 0 | 0 | 0 | 0 | 2010-07-31T19:01:00.000 | 4 | 0.148885 | false | 3,379,440 | 0 | 0 | 1 | 1 | Can Python be a good alternative to a web app that would otherwise be developed with Java EE? If so, which Python web app framework(s) may be a good choice? Please see details about the app below. I've asked a few people individually about this, who have worked for a good amount of time on either or both of Java EE and... |
Combining static HTML, a Django backend and a PHP forum on one server? | 3,382,449 | 2 | 1 | 1,097 | 0 | php,python,html,django | I see no problem with such setup, using lightweight frontend is recommended for django (or any other wsgi app) anyway. Although you should serve static html with nginx itself, not django. | 0 | 0 | 0 | 0 | 2010-08-01T14:36:00.000 | 2 | 1.2 | true | 3,382,390 | 0 | 0 | 1 | 1 | I have a project coming up for client who is basically happy with how he manages his website. It's lots of HTML files (around 300 of them) that he insists on keeping flat HTML files so can easily edit and manage them using Dreamweaver. His site has a lot of traffic and so I'm looking into options of keeping things simp... |
Django with huge mysql database | 3,389,840 | 0 | 4 | 2,045 | 0 | python,django,csv | Depending upon the data format (you said CSV) and the database, you'll probably be better off loading the data directly into the database (either directly into the Django-managed tables, or into temp tables). As an example, Oracle and SQL Server provide custom tools for loading large amounts of data. In the case of M... | 0 | 0 | 0 | 0 | 2010-08-02T06:08:00.000 | 5 | 0 | false | 3,385,400 | 0 | 0 | 1 | 3 | What would be the best way to import multi-million record csv files into django.
Currently using python csv module, it takes 2-4 days for it process 1 million record file. It does some checking if the record already exists, and few others.
Can this process be achieved to execute in few hours.
Can memcache be used some... |
Django with huge mysql database | 3,385,550 | 3 | 4 | 2,045 | 0 | python,django,csv | I'm not sure about your case, but we had similar scenario with Django where ~30 million records took more than one day to import.
Since our customer was totally unsatisfied (with the danger of losing the project), after several failed optimization attempts with Python, we took a radical strategy change and did the impo... | 0 | 0 | 0 | 0 | 2010-08-02T06:08:00.000 | 5 | 0.119427 | false | 3,385,400 | 0 | 0 | 1 | 3 | What would be the best way to import multi-million record csv files into django.
Currently using python csv module, it takes 2-4 days for it process 1 million record file. It does some checking if the record already exists, and few others.
Can this process be achieved to execute in few hours.
Can memcache be used some... |
Django with huge mysql database | 4,772,823 | 0 | 4 | 2,045 | 0 | python,django,csv | Like Craig said, you'd better fill the db directly first.
It implies creating django models that just fits the CSV cells (you can then create better models and scripts to move the data)
Then, db feedding : a tool of choice for doing this is Navicat, you can grab a functional 30 days demo on their site. It allows you t... | 0 | 0 | 0 | 0 | 2010-08-02T06:08:00.000 | 5 | 0 | false | 3,385,400 | 0 | 0 | 1 | 3 | What would be the best way to import multi-million record csv files into django.
Currently using python csv module, it takes 2-4 days for it process 1 million record file. It does some checking if the record already exists, and few others.
Can this process be achieved to execute in few hours.
Can memcache be used some... |
logout from command prompt to uploading application on google app | 3,388,313 | 3 | 1 | 556 | 0 | python,google-app-engine,command-prompt | You can run appcfg.py with --no_cookies to tell it not to store authentication cookies, or -e EMAIL to specify an email address that differs from the one in the current cookie. | 0 | 1 | 0 | 0 | 2010-08-02T12:15:00.000 | 1 | 0.53705 | false | 3,387,605 | 0 | 0 | 1 | 1 | I am uploading google app engine application with the help of appcfg.py command from command prompt in windows.
But after one login I want to upload another application from the same command prompt but i cannot because this second application has no rights with the current login so i want to logout from this session o... |
What purpose does a python backend serve? | 3,388,948 | 2 | 1 | 4,068 | 0 | php,python,backend | A "Python backend" is simply server-side software written in Python, no different in general terms than server-side software written in PHP. It does all the same things, just with a different programming language. | 0 | 0 | 0 | 0 | 2010-08-02T14:43:00.000 | 2 | 0.197375 | false | 3,388,829 | 0 | 0 | 1 | 2 | I am primarily a PHP developer, and I have been browsing the source code of a few open-source applications recently(Mozilla Bespin in particular), to find that some of them use a Python "back-end." I was just wondering what the purpose of this back-end is. I am assuming it is the same thing as the model in an MVC fra... |
What purpose does a python backend serve? | 3,388,977 | 1 | 1 | 4,068 | 0 | php,python,backend | It looks like Bespin uses Python in the same way it would use PHP, if the autors chose PHP and not Python.
If you are a PHP developer, you already are a "back-end" programmer and you already know what it does, the only difference is the programming language that was used to do that.
Some web sites, mostly the huge ones... | 0 | 0 | 0 | 0 | 2010-08-02T14:43:00.000 | 2 | 0.099668 | false | 3,388,829 | 0 | 0 | 1 | 2 | I am primarily a PHP developer, and I have been browsing the source code of a few open-source applications recently(Mozilla Bespin in particular), to find that some of them use a Python "back-end." I was just wondering what the purpose of this back-end is. I am assuming it is the same thing as the model in an MVC fra... |
Flash video record on website tutorial | 3,393,137 | 1 | 1 | 549 | 0 | python,flash,video-capture,html5-video | There are many video solutions. Here are two:
Take a look at Flash Media Server (FMS). You will need to some server-side code to place the video into a folder as it streams up.
Also, if you're looking into free open-source take a look at Red5. | 0 | 0 | 0 | 1 | 2010-08-02T19:49:00.000 | 1 | 1.2 | true | 3,391,222 | 0 | 0 | 1 | 1 | I wanted to make a website that would let users record a small video message through their broswer and save it to my website.
As I have never used flash, i wanted to know what softwares would be required and what programming languages would I need? I mean, what should I go about learning to implement such a site. I wou... |
Python Path import problems | 3,391,404 | 0 | 0 | 252 | 0 | python | Fixed it. Sorry Santa for not including the console print out. Windows was dumb and added an extra .py to the file when I created it. So everything was actually "pythonfile.py.py". Awesome. | 0 | 0 | 0 | 0 | 2010-08-02T20:11:00.000 | 1 | 1.2 | true | 3,391,368 | 0 | 0 | 1 | 1 | I added a folder to my PYTHONPATH where I can put all of my Django Apps. I print sys.path, and everything looks good, the folder I want is there. However, when I go to import a module, it tells me that there's no module by that name. All the site-packages modules work fine. In all of my Django apps, there's an "_____in... |
In Django, how to get django-storages, boto and easy_thumbnail to work nicely? | 5,262,932 | 17 | 5 | 1,958 | 0 | python,django,amazon-s3,thumbnails | easy_thumbnails will do S3-based image thumbnailing for you - you just need to set settings.THUMBNAIL_DEFAULT_STORAGE, so that easy_thumbnails knows which storage to use (in your case, you probably want to set it to the same storage you're using for your ImageFields). | 0 | 0 | 0 | 0 | 2010-08-03T14:38:00.000 | 2 | 1 | false | 3,397,599 | 0 | 0 | 1 | 1 | I'm making a website where files are uploaded through the admin and this will then store them on Amazon S3. I'm using django-storages and boto for this, and it seems to be working just fine.
Thing is, I'm used to use my easy_thumbnails (the new sorl.thumbnail) on the template side to create thumbnails on the fly. I pre... |
how can i verify all links on a page as a black-box tester | 3,397,887 | 0 | 2 | 412 | 0 | python,testing,black-box | What exactly is "Testing links"?
If it means they lead to non-4xx URIs, I'm afraid You must visit them.
As for existence of given links (like "Contact"), You may look for them using xpath. | 0 | 0 | 1 | 0 | 2010-08-03T15:05:00.000 | 4 | 0 | false | 3,397,850 | 0 | 0 | 1 | 2 | I'm tryng to verify if all my page links are valid, and also something similar to me if all the pages have a specified link like contact. i use python unit testing and selenium IDE to record actions that need to be tested.
So my question is can i verify the links in a loop or i need to try every link on my own?
i trie... |
how can i verify all links on a page as a black-box tester | 3,399,490 | 0 | 2 | 412 | 0 | python,testing,black-box | You could (as yet another alternative), use BeautifulSoup to parse the links on your page and try to retrieve them via urllib2. | 0 | 0 | 1 | 0 | 2010-08-03T15:05:00.000 | 4 | 0 | false | 3,397,850 | 0 | 0 | 1 | 2 | I'm tryng to verify if all my page links are valid, and also something similar to me if all the pages have a specified link like contact. i use python unit testing and selenium IDE to record actions that need to be tested.
So my question is can i verify the links in a loop or i need to try every link on my own?
i trie... |
having to run multiple instances of a web service for ruby/python seems like a hack to me | 3,399,696 | 1 | 1 | 584 | 0 | python,ruby-on-rails | Even if Ruby/Python interpreters were perfect, and could utilize all avail CPU with single process, you would still reach maximal capability of single server sooner or later and have to scale across several machines, going back to running several instances of your app. | 0 | 0 | 0 | 1 | 2010-08-03T18:06:00.000 | 6 | 0.033321 | false | 3,399,367 | 1 | 0 | 1 | 5 | Is it just me or is having to run multiple instances of a web server to scale a hack?
Am I wrong in this?
Clarification
I am referring to how I read people run multiple instances of a web service on a single server. I am not talking about a cluster of servers. |
having to run multiple instances of a web service for ruby/python seems like a hack to me | 3,399,437 | 1 | 1 | 584 | 0 | python,ruby-on-rails | With no details, it is very difficult to see what you are getting at. That being said, it is quite possible that you are simply not using the right approach for your problem.
Sometimes multiple separate instances are better. Sometimes, your Python services are actually better deployed behind a single Apache instance (u... | 0 | 0 | 0 | 1 | 2010-08-03T18:06:00.000 | 6 | 0.033321 | false | 3,399,367 | 1 | 0 | 1 | 5 | Is it just me or is having to run multiple instances of a web server to scale a hack?
Am I wrong in this?
Clarification
I am referring to how I read people run multiple instances of a web service on a single server. I am not talking about a cluster of servers. |
having to run multiple instances of a web service for ruby/python seems like a hack to me | 3,402,337 | 0 | 1 | 584 | 0 | python,ruby-on-rails | Your assumption that Tomcat's and IIS's single process per server is superior is flawed. The choice of a multi-threaded server and a multi-process server depends on a lot of variables.
One main thing is the underlying operating system. Unix systems have always had great support for multi-processing because of the cop... | 0 | 0 | 0 | 1 | 2010-08-03T18:06:00.000 | 6 | 0 | false | 3,399,367 | 1 | 0 | 1 | 5 | Is it just me or is having to run multiple instances of a web server to scale a hack?
Am I wrong in this?
Clarification
I am referring to how I read people run multiple instances of a web service on a single server. I am not talking about a cluster of servers. |
having to run multiple instances of a web service for ruby/python seems like a hack to me | 3,399,409 | 4 | 1 | 584 | 0 | python,ruby-on-rails | Not really, people were running multiple frontends across a cluster of servers before multicore cpus became widespread
So there has been all the infrastructure for supporting sessions properly across multiple frontends for quite some time before it became really advantageous to run a bunch of threads on one machine.
In... | 0 | 0 | 0 | 1 | 2010-08-03T18:06:00.000 | 6 | 1.2 | true | 3,399,367 | 1 | 0 | 1 | 5 | Is it just me or is having to run multiple instances of a web server to scale a hack?
Am I wrong in this?
Clarification
I am referring to how I read people run multiple instances of a web service on a single server. I am not talking about a cluster of servers. |
having to run multiple instances of a web service for ruby/python seems like a hack to me | 3,399,416 | 4 | 1 | 584 | 0 | python,ruby-on-rails | Since we are now moving towards more cores, rather than faster processors - in order to scale more and more, you will need to be running more instances.
So yes, I reckon you are wrong.
This does not by any means condone brain-dead programming with the excuse that you can just scale it horizontally, that just seems re... | 0 | 0 | 0 | 1 | 2010-08-03T18:06:00.000 | 6 | 0.132549 | false | 3,399,367 | 1 | 0 | 1 | 5 | Is it just me or is having to run multiple instances of a web server to scale a hack?
Am I wrong in this?
Clarification
I am referring to how I read people run multiple instances of a web service on a single server. I am not talking about a cluster of servers. |
need to selectively escape html entities (&) | 3,405,525 | 0 | 1 | 576 | 0 | python,escaping,html-entities | You shouldn't use an XML parser to parse data that isn't XML. Find an HTML parser instead, you'll be happier in the long run. The standard library has a few (HTMLParser and htmllib), and BeautifulSoup is a well-loved third-party package. | 0 | 0 | 1 | 0 | 2010-08-04T06:40:00.000 | 4 | 0 | false | 3,403,168 | 0 | 0 | 1 | 1 | I'm scraping a html page, then using xml.dom.minidom.parseString() to create a dom object.
however, the html page has a '&'. I can use cgi.escape to convert this into & but it also converts all my html <> tags into <> which makes parseString() unhappy.
how do i go about this? i would rather not just hack it... |
djangoproject access fields of object dynamically | 3,404,200 | 0 | 0 | 53 | 0 | python,django | setattr(obj, fieldname, fieldvalue)
(see also getattr to retrieve at runtime) | 0 | 0 | 0 | 0 | 2010-08-04T09:05:00.000 | 2 | 0 | false | 3,404,055 | 0 | 0 | 1 | 1 | Can anyone help me?
I have list of fields called 'allowed_fields' and I have object called 'individual'.
allowed_fields is sub set of individual. Now I want to run loop like this
for field in allowed_fields:
obj.field = individual.field
obj have same fields like individual. Do you have solution of my pro... |
Finding the user who uses my django web application | 3,404,772 | 1 | 0 | 206 | 0 | python,django | You can look in the admin to see how many usernames are there, assuming everyone who likes it creates one. Or you can look at your server logs and count the unique IPs. | 0 | 0 | 0 | 0 | 2010-08-04T10:48:00.000 | 3 | 0.066568 | false | 3,404,759 | 0 | 0 | 1 | 2 | I have developed a small django web application. It still runs in the django development web server.
It has been decided that if more than 'n' number of users like the application, it will be approved.
I want to find out all the users who view my application.
How can find the user who views my application?
Since I was ... |
Finding the user who uses my django web application | 3,405,077 | 1 | 0 | 206 | 0 | python,django | Step 1. Add a model -- connected users. Include an FK to username and a datetime stamp.
Step 2. Write a function to log each user's activity.
Step 3. Write your own version of login that will call the Django built-in login and also call your function to log each user's activity.
Step 4. Write a small application -... | 0 | 0 | 0 | 0 | 2010-08-04T10:48:00.000 | 3 | 0.066568 | false | 3,404,759 | 0 | 0 | 1 | 2 | I have developed a small django web application. It still runs in the django development web server.
It has been decided that if more than 'n' number of users like the application, it will be approved.
I want to find out all the users who view my application.
How can find the user who views my application?
Since I was ... |
How to make a Django passthrough view? | 3,407,020 | 1 | 2 | 523 | 0 | python,ajax,django | None.
You'll have to code your own wrapper utility, using one of httplib / urllib / urllib2 libs to connect to the other server.
Most likely you will have to extract all the relevant info from the HttpRequest object and use that to manually construct your own request in said util function.
Regarding receiving the respo... | 0 | 0 | 0 | 0 | 2010-08-04T14:58:00.000 | 1 | 0.197375 | false | 3,406,800 | 0 | 0 | 1 | 1 | I want to make a Django view that does the following:
Receive an HttpRequest on api/some/url/or/other
Passes this through to another server at some/url/or/other (rewrite the URL, basically)
Adding a cookie based on session data in Django
Using the same method, data, params, et al, that were in the original request
... |
Appengine Blobstore - Video Streaming | 3,409,743 | 5 | 6 | 1,334 | 0 | python,google-app-engine | I would say the blobstore is suitable for this. While datastore entities are limited to 1MB and standard HTTP responses are limited to 10MB, with the blobstore you can upload, store, and serve files up to 2GB. The 30 second limit refers to how long your handler can execute; time spent downloading (or uploading) doesn't... | 0 | 1 | 0 | 0 | 2010-08-04T20:27:00.000 | 1 | 0.761594 | false | 3,409,549 | 0 | 0 | 1 | 1 | I'm trying to setup a video streaming app via the Google Appengine Blobstore. Just wanted to know if this was possible, as there isn't too much regarding this in the Appengine Documentation. Basically I want to serve these videos through a flash player.
Thanks |
Where does django dev server (manage.py runserver) get its path from? | 3,411,300 | 1 | 0 | 2,351 | 0 | python,django,path,django-manage.py,devserver | manage.py imports settings.py from the current directory and pass settings as parameter to execute_manager. You probably defined project root in settings.py. | 0 | 0 | 0 | 0 | 2010-08-05T01:30:00.000 | 2 | 1.2 | true | 3,411,131 | 0 | 0 | 1 | 1 | I recently moved a django app from c:\Users\user\django-projects\foo\foobar to c:\Python25\Lib\site-packages\foo\foobar (which is on the python path). I started a new app in the django-projects directory, and added foo.foobar to the INSTALLED_APPS setting. When I try to run the dev server (manage.py runserver) for my n... |
Python vs C#/.NET -- what are the key differences to consider for using one to develop a large web application? | 22,076,548 | 6 | 58 | 86,003 | 0 | .net,python,sql-server,django,asp.net-mvc-2 | I would also suggest we must compare runtimes and not limit to language features before making such moves. Python runs via interpreter CPython where C# runs on CLR in their default implementations.
Multitasking is very important in any large scale project; .NET can easily handle this via threads... and also it can tak... | 0 | 0 | 0 | 0 | 2010-08-06T02:18:00.000 | 4 | 1 | false | 3,420,594 | 0 | 0 | 1 | 1 | My organization currently delivers a web application primarily based on a SQL Server 2005/2008 back end, a framework of Java models/controllers, and ColdFusion-based views. We have decided to transition to a newer framework and after internal explorations and mini projects have narrowed the choice down to between Pyth... |
Simple protocols (like twisted.pb) vs messaging (AMQP/JMS) vs web services (REST/SOAP) | 3,426,017 | 12 | 4 | 2,230 | 0 | python,web-services,twisted,network-protocols,amqp | As always, "it depends". First, let's clear up the terminology.
Twisted's Perspective Broker basically is a system you can use when you have control over both ends of a distributed action (both client and server ends). It provides a way to copy objects from one end to the other and to call methods on remote objects. Co... | 0 | 0 | 0 | 0 | 2010-08-06T05:27:00.000 | 1 | 1.2 | true | 3,421,200 | 0 | 0 | 1 | 1 | I'm currently using twisted's perspective broker on python and I have considered in the past switching to something like RabbitMQ but I'm not sure it could just replace pb - I feel like I might be comparing apples to oranges here.
I've been reading a lot about REST lately and the inevitable debate with SOAP, which led ... |
Is there a way to automate restarting the python process after every change I make to Django models? | 3,428,960 | 2 | 1 | 205 | 0 | python,django,passenger,wsgi | My advice would be to test locally using Django's builtin server.
It does precisely auto-reload, so that any change to your code will be available.
I'm not familiar with Dreamhost, but if modwsgi is on embedded mode this is not possible.
In Daemon mode, you could write some code to detect file changes and restart the p... | 0 | 0 | 0 | 0 | 2010-08-06T19:56:00.000 | 1 | 1.2 | true | 3,427,287 | 0 | 0 | 1 | 1 | I am using Django with Passenger on Dreamhost.
Every time I make a change to models, settings or views I need to pkill python from a terminal session. Does anyone know of a way to automate this? Is this something that Passenger can do? |
django shell triggering Postgres idle transaction problems | 3,428,147 | 1 | 2 | 437 | 0 | python,django,postgresql,ipython | You may always run a cron job, that will call pg_cancel_backend() within the database, for the backends that are idle for longer than e.g. 1 day (of course that depends on the nagios settings). | 0 | 0 | 0 | 0 | 2010-08-06T20:24:00.000 | 1 | 0.197375 | false | 3,427,505 | 0 | 0 | 1 | 1 | It's not the fault of the django (iPython) shell, actually. The problem is developers who open the django shell ./manage.py shell run through some queries (it often only generates selects), and then either leave the shell running or somehow kill their (ssh) session (actually, I'm not sure if the latter case leaves the ... |
What language (Java or Python) + framework for mid sized web project? | 3,428,411 | 2 | 2 | 492 | 0 | java,python,google-app-engine,web-applications,stripes | As many things in life, this depends on what your goals are. If you intend to learn a web framework that is used in corporate environments, then choose a Java solution. If not, don't. Python is certainly more elegant and generally more fun in pretty much every way.
As to which framework to use, django has the most mind... | 0 | 1 | 0 | 0 | 2010-08-06T21:31:00.000 | 9 | 0.044415 | false | 3,427,946 | 0 | 0 | 1 | 5 | I plan to start a mid sized web project, what language + framework would you recommend?
I know Java and Python. I am looking for something simple.
Is App Engine a good option? I like the overall simplicity and free hosting, but I am worried about the datastore (how difficult is it to make it similarly fast as a standar... |
What language (Java or Python) + framework for mid sized web project? | 3,428,479 | 0 | 2 | 492 | 0 | java,python,google-app-engine,web-applications,stripes | It depends on your personality. There's no right answer to this question any more than there's a right answer to "what kind of car should I drive?"
If you're artistic and believe code should be beautiful, use Rails.
If you're a real hacker type, I think you'll find a full-stack framework such as Rails or Django to be u... | 0 | 1 | 0 | 0 | 2010-08-06T21:31:00.000 | 9 | 0 | false | 3,427,946 | 0 | 0 | 1 | 5 | I plan to start a mid sized web project, what language + framework would you recommend?
I know Java and Python. I am looking for something simple.
Is App Engine a good option? I like the overall simplicity and free hosting, but I am worried about the datastore (how difficult is it to make it similarly fast as a standar... |
What language (Java or Python) + framework for mid sized web project? | 3,428,497 | 0 | 2 | 492 | 0 | java,python,google-app-engine,web-applications,stripes | Google App Engine + GWT and you have a pretty powerful combination for developing web applications. The datastore is quite fast, and it has so far done the job quite nicely for me.
In my project I had to do a lot of redesigning of my database model, because it was made for a traditional relational database, and some t... | 0 | 1 | 0 | 0 | 2010-08-06T21:31:00.000 | 9 | 0 | false | 3,427,946 | 0 | 0 | 1 | 5 | I plan to start a mid sized web project, what language + framework would you recommend?
I know Java and Python. I am looking for something simple.
Is App Engine a good option? I like the overall simplicity and free hosting, but I am worried about the datastore (how difficult is it to make it similarly fast as a standar... |
What language (Java or Python) + framework for mid sized web project? | 3,428,141 | 0 | 2 | 492 | 0 | java,python,google-app-engine,web-applications,stripes | I don't think the datastore is a problem. Many people will reject it out of hand because they want a standard relational database; if you are willing to consider a datastore in general then I doubt you will have any problems with the GAE datastore. Personally, I quite like it.
The thing that might trip you up is the ... | 0 | 1 | 0 | 0 | 2010-08-06T21:31:00.000 | 9 | 0 | false | 3,427,946 | 0 | 0 | 1 | 5 | I plan to start a mid sized web project, what language + framework would you recommend?
I know Java and Python. I am looking for something simple.
Is App Engine a good option? I like the overall simplicity and free hosting, but I am worried about the datastore (how difficult is it to make it similarly fast as a standar... |
What language (Java or Python) + framework for mid sized web project? | 3,430,891 | 0 | 2 | 492 | 0 | java,python,google-app-engine,web-applications,stripes | I've built several apps on GAE (with Python) over the last year. It's hard to beat the ease with which you can get an app up and running quickly. Don't discount the value in that alone.
While you may not understand the datastore yet, it is extremely well documented and there are great resources - including this one - ... | 0 | 1 | 0 | 0 | 2010-08-06T21:31:00.000 | 9 | 0 | false | 3,427,946 | 0 | 0 | 1 | 5 | I plan to start a mid sized web project, what language + framework would you recommend?
I know Java and Python. I am looking for something simple.
Is App Engine a good option? I like the overall simplicity and free hosting, but I am worried about the datastore (how difficult is it to make it similarly fast as a standar... |
How to organize Eclipse - Workspace VS Programming languages | 3,430,003 | 3 | 4 | 741 | 0 | python,android,eclipse,workspace,eclipse-pdt | The plug-ins are stored in the Eclipse installation, not in the workspace folder. So one solution would be to different Eclipse installations for every task, in this case only the required plug-ins would load (and the others not available), on the other hand, you have to maintain at least three parallel Eclipse install... | 0 | 0 | 0 | 1 | 2010-08-07T09:23:00.000 | 2 | 1.2 | true | 3,429,887 | 0 | 0 | 1 | 1 | I use Eclipse for programming in PHP (PDT), Python and sometimes Android. Each of this programming languages requires to run many things after Eclipse start.
Of course I do not use all of them at one moment, I have different workspace for each of those. Is there any way, or recommendation, how to make Eclipse to run on... |
Django - how to extend 3rd party models without modifying | 3,433,146 | 10 | 10 | 3,026 | 0 | python,django,django-models,model | You can use ModelName.add_to_class (or .contribute_to_class), but if you have already run syncdb, then there is no way to automatically have it add the columns you need.
For maintainable code, you will probably want to extend by sub-classing the desired model in your own app, and use something like south to handle the ... | 0 | 0 | 0 | 0 | 2010-08-08T04:58:00.000 | 2 | 1.2 | true | 3,433,131 | 0 | 0 | 1 | 1 | I want to add a column to a database table but I don't want to modify the 3rd party module in case I need/decide to upgrade the module in the future. Is there a way I can add this field within my code so that with new builds I don't have to add the field manually? |
The "next" parameter, redirect, django.contrib.auth.login | 3,441,476 | 0 | 29 | 42,969 | 0 | python,django,django-forms | create your own view for logging in, with it's own url, don't use the admin's one.
you can store the next page in the session, or pass it as a GET parameter to the login view
(i.e. /login?next=gallery) just don't forget to sanitize and validate that value before redirecting to it. | 0 | 0 | 0 | 0 | 2010-08-09T15:12:00.000 | 6 | 0 | false | 3,441,436 | 0 | 0 | 1 | 3 | I'm trying to redirect users to custom url "/gallery/(username)/" after successfully logging in. It currently redirects to the default "/account/profile/" url While I know what I can override the redirect url in my settings.py, my url is dynamic thus it will not work.
Documentation states that I need to use the "next... |
The "next" parameter, redirect, django.contrib.auth.login | 5,787,355 | 43 | 29 | 42,969 | 0 | python,django,django-forms | Django's login view django.contrib.auth.views.login accepts a dictionary named extra_context. The values in the dictionary are directly passed to the template. So you can use that to set the next parameter. Once that is done, you can set a hidden field with name next and value {{ next }} so that it gets rendered in the... | 0 | 0 | 0 | 0 | 2010-08-09T15:12:00.000 | 6 | 1 | false | 3,441,436 | 0 | 0 | 1 | 3 | I'm trying to redirect users to custom url "/gallery/(username)/" after successfully logging in. It currently redirects to the default "/account/profile/" url While I know what I can override the redirect url in my settings.py, my url is dynamic thus it will not work.
Documentation states that I need to use the "next... |
The "next" parameter, redirect, django.contrib.auth.login | 3,442,128 | 2 | 29 | 42,969 | 0 | python,django,django-forms | You can use a static redirect to /loggedin/ and then associate the url to a view that makes the correct redirect.
Login takes an extra step but if you want to use django's view it does the job. | 0 | 0 | 0 | 0 | 2010-08-09T15:12:00.000 | 6 | 0.066568 | false | 3,441,436 | 0 | 0 | 1 | 3 | I'm trying to redirect users to custom url "/gallery/(username)/" after successfully logging in. It currently redirects to the default "/account/profile/" url While I know what I can override the redirect url in my settings.py, my url is dynamic thus it will not work.
Documentation states that I need to use the "next... |
Image management on Django | 3,444,601 | 5 | 1 | 462 | 0 | django,python-imaging-library,imagekit,django-imagekit,photologue | Photologue is a Django application to manage photos. It uses PIL for the image processing.
ImageKit is a Django Application for image processing. It is meant for adding images to existing models.
PIL is the underlying library for both of these (and actually, most if not all image processing scripts in Python). | 0 | 0 | 0 | 0 | 2010-08-09T21:53:00.000 | 1 | 1.2 | true | 3,444,504 | 1 | 0 | 1 | 1 | I'm trying to figure out which image management library to use on django. What is the difference between photologue, image-kit, and pil(python imaging library)? |
How to build a computationally intensive webservice? | 3,444,821 | 1 | 9 | 1,140 | 0 | python | I think you can build it however you like, as long as you can make it an asynchronous service so that the users don't have to wait.
Unless, of course, the users don't mind waiting in this context. | 0 | 0 | 0 | 0 | 2010-08-09T22:56:00.000 | 4 | 0.049958 | false | 3,444,804 | 0 | 0 | 1 | 1 | I need to build a webservice that is very computationally intensive, and I'm trying to get my bearings on how best to proceed.
I expect users to connect to my service, at which point some computation is done for some amount of time, typically less than 60s. The user knows that they need to wait, so this is not really a... |
Can Cherokee serve a fallback/default page when a reverse proxy is unavailable? | 3,452,793 | 0 | 0 | 218 | 0 | python,web-services,reverse-proxy,cherokee | You could set a custom 504 error page. | 0 | 1 | 0 | 0 | 2010-08-10T13:54:00.000 | 1 | 1.2 | true | 3,449,673 | 0 | 0 | 1 | 1 | I have a Cherokee installation that I'm using to serve a few web applications - one blog/calendar/etc. and two CPU-intensive web applications (1 stable version and 1 development version). All of them are Django or Pylons webservices served with CherryPy. I'm using the reverse-proxy handler in Cherokee to handle the ma... |
Get_by_key_name doesn't work with unicode key names of several characters | 3,467,698 | 0 | 0 | 351 | 0 | python,google-app-engine | Actually, I made some stupid encoding error when testing yesterday, which made me think the error came from the function.
The problem doesnt come from the keys. It is just an error in my algorithm that won't check for keys of 2 characters if there is no object which the 1st character as keyname. | 0 | 0 | 0 | 0 | 2010-08-10T18:03:00.000 | 1 | 1.2 | true | 3,451,983 | 0 | 0 | 1 | 1 | I'm using unicode strings for non latin characters as key names for my models.
I can create objects without problems, and the appengine admin shows key name correctly (I'm using chinese characters, and the right characters)
However, MyModel.get_by_key_name() returns None if the key_name is made of several characters.
F... |
What's the difference of ContentType and MimeType | 3,452,438 | 0 | 115 | 40,506 | 0 | python,django,content-type,mime-types | Why we use 2 different naming for (almost the same) thing?
Backwards compatibility, based on your quote from the documentation. | 0 | 0 | 0 | 0 | 2010-08-10T18:54:00.000 | 4 | 0 | false | 3,452,381 | 0 | 0 | 1 | 2 | As far as I know, they are absolute equal. However, browsing some django docs, I've
found this piece of code:
HttpResponse.__init__(content='', mimetype=None, status=200, content_type='text/html')
which surprise me the two getting along each other. The official docs was able to solve the issue in a pratical manner:
co... |
What's the difference of ContentType and MimeType | 17,949,292 | 63 | 115 | 40,506 | 0 | python,django,content-type,mime-types | I've always viewed contentType to be a superset of mimeType. The only difference being the optional character set encoding. If the contentType does not include an optional character set encoding then it is identical to a mimeType. Otherwise, the mimeType is the data prior to the character set encoding sequence.
E.G.... | 0 | 0 | 0 | 0 | 2010-08-10T18:54:00.000 | 4 | 1 | false | 3,452,381 | 0 | 0 | 1 | 2 | As far as I know, they are absolute equal. However, browsing some django docs, I've
found this piece of code:
HttpResponse.__init__(content='', mimetype=None, status=200, content_type='text/html')
which surprise me the two getting along each other. The official docs was able to solve the issue in a pratical manner:
co... |
What are the use cases of Node.js vs Twisted? | 3,461,640 | 79 | 65 | 20,135 | 0 | javascript,python,twisted,node.js | Twisted is more mature -- it's been around for a long, long time, and has so many bells and whistles as to make your head spin (implementations of the fanciest protocols, integration of the reactor with a large variety of other event loops, and so forth).
Node.js is said to be faster (I have not measured it myself) and... | 0 | 0 | 0 | 0 | 2010-08-11T18:21:00.000 | 2 | 1.2 | true | 3,461,549 | 1 | 0 | 1 | 1 | Assuming a team of developers are equally comfortable with writing Javascript on the server side as they are with Python & Twisted, when is Node.js going to be more appropriate than Twisted (and vice versa)? |
In Python, how do I check that a file is a text file? | 3,463,019 | 0 | 0 | 114 | 0 | python,django | Not all sequences of bytes are valid for ex. UTF-8, maybe you should check this? | 0 | 0 | 0 | 0 | 2010-08-11T21:21:00.000 | 2 | 0 | false | 3,462,951 | 0 | 0 | 1 | 1 | The file is uploaded through a Django form. The contents of the file need to be saved into a models.TextField(), for editors to review it before publication.
I am already checking UploadedFile.content_type. I have considered using a regular input field, but as the text is going to be quite long, it would be unwieldy fo... |
Is there any language which is just "perfect" for web scraping? | 3,469,962 | 1 | 7 | 2,443 | 0 | php,python,ruby,web-scraping | Short answer is no.
The problem is that HTML is a large family of formats - and only the more recent variants are consistent (and XML based). If you're going to use PHP then I would recommend using the DOM parser as this can handle a lot of html which does not qualify as well-formed XML.
Reading between the lines of yo... | 0 | 0 | 1 | 0 | 2010-08-12T13:18:00.000 | 4 | 0.049958 | false | 3,468,028 | 0 | 0 | 1 | 1 | I have used 3 languages for Web Scraping - Ruby, PHP and Python and honestly none of them seems to perfect for the task.
Ruby has an excellent mechanize and XML parsing library but the spreadsheet support is very poor.
PHP has excellent spreadsheet and HTML parsing library but it does not have an equivalent of WWW:Me... |
How can I benchmark different languages / frameworks? | 3,468,630 | 2 | 1 | 463 | 0 | php,asp.net,python,frameworks,benchmarking | What I have done is to write many unit tests so you can test the layers.
For example, write a SOAP web service in PHP, Python and C#.
Write a REST web service in the same languages (same web services, just two ways to get to them). This one should be able to return JSON and XML as a minimum.
Write unit tests in C# an... | 0 | 0 | 0 | 1 | 2010-08-12T13:37:00.000 | 4 | 1.2 | true | 3,468,227 | 0 | 0 | 1 | 2 | I'd like to compare the performance of different languages and/or different frameworks within the same language. This is aimed at server-side languages used for web development. I know an apples to apples comparison is not possible, but I'd like it to be as unbiased as possible. Here are some ideas :
Simple "Hello Wor... |
How can I benchmark different languages / frameworks? | 3,468,464 | 0 | 1 | 463 | 0 | php,asp.net,python,frameworks,benchmarking | You will spend a lot of time and come to realization that it was all wasted.
After you complete your tests you will learn that loops of 1000000 empty iterations are far from the real life and come to apache benchmark.
Then you come no know of opcode cachers which will ruin all your previous results.
Then you will learn... | 0 | 0 | 0 | 1 | 2010-08-12T13:37:00.000 | 4 | 0 | false | 3,468,227 | 0 | 0 | 1 | 2 | I'd like to compare the performance of different languages and/or different frameworks within the same language. This is aimed at server-side languages used for web development. I know an apples to apples comparison is not possible, but I'd like it to be as unbiased as possible. Here are some ideas :
Simple "Hello Wor... |
Python doesn't have opcode cacher? | 3,468,276 | 9 | 2 | 2,395 | 0 | python,opcode,opcode-cache | It's automatic in Python -- a compiled .pyc file will appear magically. | 0 | 0 | 0 | 1 | 2010-08-12T13:40:00.000 | 3 | 1 | false | 3,468,243 | 0 | 0 | 1 | 2 | I'm currently using PHP. I plan to start using Django for some of my next project.
But I don't have any experience with Python. After some searching, I still can't find a Python opcode cacher.
(There are lots of opcode cacher for PHP: APC, eAccelerator, Xcache, ...) |
Python doesn't have opcode cacher? | 3,468,296 | 2 | 2 | 2,395 | 0 | python,opcode,opcode-cache | Python doesn't need one the same way PHP needs it. Python doesn't throw the bytecode away after execution, it keeps it around (as .pyc files). | 0 | 0 | 0 | 1 | 2010-08-12T13:40:00.000 | 3 | 0.132549 | false | 3,468,243 | 0 | 0 | 1 | 2 | I'm currently using PHP. I plan to start using Django for some of my next project.
But I don't have any experience with Python. After some searching, I still can't find a Python opcode cacher.
(There are lots of opcode cacher for PHP: APC, eAccelerator, Xcache, ...) |
virtualenv, sys.path and site-packages | 3,470,317 | 1 | 4 | 1,443 | 0 | python,django,virtualenv,pip | it seems that the pip process quit prematurely due to a package in requirements that could not be found. this left things in limbo, stuck in the temp-like "build" folder before having a chance to complete the process which gets them into the proper "site-packages" location. | 0 | 0 | 0 | 0 | 2010-08-12T15:52:00.000 | 1 | 1.2 | true | 3,469,551 | 1 | 0 | 1 | 1 | i am setting up a virtualenv for django deployment. i want an isolated env without access to the global site-packages. i used the option --no-site-packages, then installed a local pip instance for that env.
after using pip and a requirements.txt file i noticed that most packages were installed in a "build" folder tha... |
What's the easiest/cleanest way to get the MessageID of a sent email? | 3,471,052 | 12 | 7 | 2,548 | 0 | python,django,email-headers | Ok, I see I was browsing tragically old code. I should be able to call django.core.mail.message.make_msgid() and populate the header myself before calling send. | 0 | 0 | 0 | 1 | 2010-08-12T18:54:00.000 | 2 | 1.2 | true | 3,470,989 | 0 | 0 | 1 | 1 | I want to save the MessageID of a sent email, so I can later use it in a References: header to facilitate threading.
I see in root/django/trunk/django/core/mail.py (line ~55) where the MessageID is created.
I'm trying to think of the best way to collect this value, other than just copy/pasting into a new backend module... |
About pyjamas maturity vs GWT maturity (with short dead lines) for a web application | 4,886,045 | 4 | 6 | 1,811 | 0 | java,python,gwt,pyjamas | I've managed to deploy a couple of medium sized webapps using pyjamas and believe me, it was very smooth sailing. It's a slimmed-down version of GWT too so it is easier to learn. Most of the UI widgets are 100 lines ish! Also the pythonic use of OO is pretty exemplary. | 0 | 0 | 0 | 0 | 2010-08-12T22:23:00.000 | 2 | 0.379949 | false | 3,472,493 | 0 | 0 | 1 | 2 | I love both, python and Java and I have this first 'serious' web application project that I would like to carry out.
I find it hard to choose between pyjamas + django and GWT + Hibernate.
In fact, from my beginner point of view, it seems like the python world is more suitable for a quickly-developed and fun web applic... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.