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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Selecting a Python Web Framework | 3,783,714 | 1 | 6 | 2,699 | 0 | python,mysql,django,pylons,cherrypy | CherryPy is the only framework I'm aware of that does real HTTP caching out of the box (but look at "beaker" for a WSGI component solution). Many of the others give you tools to store arbitrary objects in Memcached or other storage. | 0 | 0 | 0 | 0 | 2010-09-23T19:23:00.000 | 5 | 0.039979 | false | 3,781,802 | 0 | 0 | 1 | 1 | This may seem like a subjective question. But it is not (that's not the idea, at least).
I'm developing an Advertising software (like AdWords, AdBrite, etc) and i've decide to use Python. And would like to use one of those well known web frameworks (Django, Cherrypy, pylons, etc).
The question is:
Given that it will ha... |
Prepopulating a Django FileField | 3,787,861 | 2 | 1 | 669 | 0 | python,django | Well I found the answer. It was quite easy actually. you just need to set the FileField value to some string and it will point to that file.
The point is that the path specified should be correct otherwise you get a 404 error when trying to access it. | 0 | 0 | 0 | 0 | 2010-09-24T08:48:00.000 | 1 | 1.2 | true | 3,785,502 | 0 | 0 | 1 | 1 | I wanted to know how is it possible in django to bind an already uploaded file (stored in the file system of server) to a Model FileField. This way I want to have my edit page of that model to prepopulate the FileField with this file.
Thanks |
Java: Equivalent of Python's range(int, int)? | 3,790,193 | 1 | 115 | 96,489 | 0 | java,python | If you mean to use it like you would in a Python loop, Java loops nicely with the for statement, which renders this structure unnecessary for that purpose. | 0 | 0 | 0 | 0 | 2010-09-24T19:04:00.000 | 14 | 0.014285 | false | 3,790,142 | 0 | 0 | 1 | 1 | Does Java have an equivalent to Python's range(int, int) method? |
Is there any other way besides browser extensions that one could have a GUI bar hover over any website a user visits? | 3,791,545 | 1 | 1 | 115 | 0 | python,ajax,user-interface,browser | The closest you can get is using (ick) frames, with one frame for your bar and one for the page. That's what Google Image Search does. It can easily get broken by frame-busting scripts though. | 0 | 0 | 0 | 0 | 2010-09-24T22:39:00.000 | 2 | 1.2 | true | 3,791,527 | 0 | 0 | 1 | 2 | Goal
I want to create a web app with a horizontal GUI bar that floats with the user as they move from site to site. e.g. A user will sign into the web at the home page and then proceed to say Google to start searching for their topic. Once they are signed in and leave the web app homepage a horizontal GUI bar will appe... |
Is there any other way besides browser extensions that one could have a GUI bar hover over any website a user visits? | 3,791,539 | 0 | 1 | 115 | 0 | python,ajax,user-interface,browser | Is my idea possible with technologies
like AJAX and Python?
If the pages you want floating under the bar belong to a different domain than yours (it seems like that's what you want), then the answer is No. This is not possible with client-sided scripting alone (eg: Javascript) because of the same origin policy. What... | 0 | 0 | 0 | 0 | 2010-09-24T22:39:00.000 | 2 | 0 | false | 3,791,527 | 0 | 0 | 1 | 2 | Goal
I want to create a web app with a horizontal GUI bar that floats with the user as they move from site to site. e.g. A user will sign into the web at the home page and then proceed to say Google to start searching for their topic. Once they are signed in and leave the web app homepage a horizontal GUI bar will appe... |
Managing subdomains | 3,794,000 | 1 | 2 | 347 | 0 | python,django,subdomain | You may be able to do what you need with apache mod_rewrite.
Obviously I didn't read the question clearly enough.
As for how to do it in django: you could have some middleware that looks at the server name, and redirects according to that (or even sets a variable). You can't do it with the bare url routing system, as t... | 0 | 0 | 0 | 0 | 2010-09-25T10:34:00.000 | 1 | 1.2 | true | 3,793,424 | 0 | 0 | 1 | 1 | What are the best practices and solutions for managing dynamic subdomains in different technologies and frameworks? I am searching for something to implement in my Django project but those solutions that I saw, don't work. I also tried to use Apache rewrite mod to send requests from subdomain.domain.com to domain.com/s... |
How to get windows user id in web2py for an intranet application? | 3,798,630 | 1 | 3 | 996 | 0 | python,windows,web2py | If you mean you need code at the server to know the windows id of the current browser user, web2py isn't going to be able to tell you that. Windows authentication has nothing to do with web protocols. | 0 | 0 | 1 | 0 | 2010-09-26T16:04:00.000 | 3 | 0.066568 | false | 3,798,606 | 0 | 0 | 1 | 1 | I'm using web2py for an intranet site and need to get current login windows user id in my controller. Whether any function is available? |
"Zero Iteration" - end to end acceptance test in simple contact-form feature | 3,799,733 | 1 | 7 | 479 | 0 | python,django,unit-testing,tdd,bdd | You don't have to contain all possibilities in acceptance tests at all - you will still write unit tests. So I would say that a single tests "user can fill in the form, save it and load it back" is enough to start with. Then you can add more tests if you think that a particular aspect of your system is important enough... | 0 | 0 | 0 | 1 | 2010-09-26T16:09:00.000 | 2 | 1.2 | true | 3,798,629 | 0 | 0 | 1 | 2 | I was reading "Growing Object-Oriented Software, Guided by Tests" lately.
Authors of this book sugested to always start developing a feature with an end-to-end acceptance test (before starting TDD cycle) to not loose a track of progress and to make sure that you're still on the same page while unit-testing.
Ok, so I've... |
"Zero Iteration" - end to end acceptance test in simple contact-form feature | 3,799,623 | 0 | 7 | 479 | 0 | python,django,unit-testing,tdd,bdd | This use-case leads to several test-cases (every tests a dedicated possible path of execution).
When writing tests focus on one possible outcome, after a while test-suite grows. The first tests then also give you safety net as regression tests to not break anything which you already implemented successfully.
My first ... | 0 | 0 | 0 | 1 | 2010-09-26T16:09:00.000 | 2 | 0 | false | 3,798,629 | 0 | 0 | 1 | 2 | I was reading "Growing Object-Oriented Software, Guided by Tests" lately.
Authors of this book sugested to always start developing a feature with an end-to-end acceptance test (before starting TDD cycle) to not loose a track of progress and to make sure that you're still on the same page while unit-testing.
Ok, so I've... |
MongoDB for realtime ajax stuff? | 3,799,207 | 0 | 2 | 1,738 | 1 | php,python,ajax,mongodb,real-time | It depends heavily on the server running said NoSQL solution, amount of data etc... I have played around with Mongo a bit and it is very easy to setup multiple servers to run simultaneously and you would most likely be able to accomplish high concurrency by starting multiple instances on the same box and having them ac... | 0 | 0 | 0 | 0 | 2010-09-26T16:31:00.000 | 2 | 0 | false | 3,798,728 | 0 | 0 | 1 | 2 | Howdie stackoverflow people!
So I've been doing some digging regarding these NoSQL databases, MongoDB, CouchDB etc. Though I am still not sure about real time-ish stuff therefore I thought i'd ask around to see if someone have any practical experience.
Let's think about web stuff, let's say we've got a very dynamic sup... |
MongoDB for realtime ajax stuff? | 3,801,074 | 2 | 2 | 1,738 | 1 | php,python,ajax,mongodb,real-time | Let's say we have 5000 users at the
same time, every 5, 10 or 20 seconds
ajax requests that updates various
interfaces.
OK, so to get this right, you're talking about 250 to 1000 writes per second? Yeah, MongoDB can handle that.
The real key on performance is going to be whether or not these are queries, updates... | 0 | 0 | 0 | 0 | 2010-09-26T16:31:00.000 | 2 | 1.2 | true | 3,798,728 | 0 | 0 | 1 | 2 | Howdie stackoverflow people!
So I've been doing some digging regarding these NoSQL databases, MongoDB, CouchDB etc. Though I am still not sure about real time-ish stuff therefore I thought i'd ask around to see if someone have any practical experience.
Let's think about web stuff, let's say we've got a very dynamic sup... |
How can I use redis with Django? | 7,722,260 | 61 | 107 | 75,541 | 1 | python,django,redis | Just because Redis stores things in-memory does not mean that it is meant to be a cache. I have seen people using it as a persistent store for data.
That it can be used as a cache is a hint that it is useful as a high-performance storage. If your Redis system goes down though you might loose data that was not been writ... | 0 | 0 | 0 | 0 | 2010-09-27T05:48:00.000 | 5 | 1 | false | 3,801,379 | 0 | 0 | 1 | 1 | I've heard of redis-cache but how exactly does it work? Is it used as a layer between django and my rdbms, by caching the rdbms queries somehow?
Or is it supposed to be used directly as the database? Which I doubt, since that github page doesn't cover any login details, no setup.. just tells you to set some config pro... |
Themes for python e-commerce solutions | 11,260,331 | 0 | 3 | 299 | 0 | python,e-commerce | well, if that is the case, I think the only reason I can think up of is that this Satchmo is not that popular so that nobody is willing to port or design a theme for it.
I would suggest randomly grab a theme, port it here accordingly | 0 | 0 | 0 | 1 | 2010-09-27T09:33:00.000 | 1 | 0 | false | 3,802,544 | 0 | 0 | 1 | 1 | There are two good open source python e-commerce solutions exist: Satchmo and LFS. But I can't find any theme for them. Does at least one open source theme for them exist? There are thousands themes for Magento, osCommerce, OpenCart, but zero themes for Satchmo.
Thanks. |
New to google app engine ! what to do next? | 3,805,886 | 1 | 1 | 120 | 0 | python,google-app-engine | Typically when I end up doing something more than a trivial demo I need a reason. Figure out something you want to make and stumble through it, learning as you go until it's working.
I'd use the google app engine community as a place to get questions answered, they're pretty good for that.
As a first app, I'd just hav... | 0 | 1 | 0 | 0 | 2010-09-27T16:28:00.000 | 2 | 0.099668 | false | 3,805,802 | 0 | 0 | 1 | 1 | I want to develop some web apps using Google app engine. I had deployed a guest book application which was their in "gooleappengine" folder by changing its ID.and also was successful.This is simple one.But not getting how to develop complex web apps. Can anyone please suggest me any good Tutarial or example codes Or an... |
My facebook authentication is not working? | 3,806,101 | 0 | 0 | 186 | 0 | python,facebook | You probably need to update the domain in the facebook settings/api key which allow you access. | 0 | 0 | 1 | 1 | 2010-09-27T17:08:00.000 | 1 | 0 | false | 3,806,082 | 0 | 0 | 1 | 1 | I changed my domain from abc.com to xyz.com. After that my facebook authentication is not working.
It is throwing a key error KeyError: 'access_token'I am using python as my language. |
Creating a website to communicate with an embedded device | 3,811,703 | 0 | 5 | 1,776 | 0 | python,apache,embedded,beagleboard | the device will be mobile and will be moving locations every few days. So, I can't guarantee a static IP address for the device.
Your device can be a client of the web site.
Your web site has two interfaces.
HTML interface to people.
A non-HTML interface to the device. As a client of a web site, the device will nee... | 0 | 0 | 0 | 1 | 2010-09-27T23:17:00.000 | 4 | 0 | false | 3,808,581 | 0 | 0 | 1 | 1 | I'm currently working on a project where I'm trying to control an embedded device through an Internet facing website. The idea is is that a user can go to a website and tell this device to preform some kind of action. An action on the website would be translated into a series of CLI commands and then sent to the device... |
AMQP implementations with Celery | 4,311,856 | 0 | 0 | 289 | 0 | python,amqp,celery | After reading some docs and trying out a few options, I have found that RabbitMQ suffices for most purposes. | 0 | 1 | 0 | 0 | 2010-09-28T03:16:00.000 | 1 | 1.2 | true | 3,809,440 | 0 | 0 | 1 | 1 | I wanted to get your opinions on the merits of different AMQP implementations to be used with celery. I am looking particularly at message prioritization and job queue sizes.
What are your thoughts? |
Convert URL to screenshot (script) | 21,106,018 | 0 | 7 | 31,489 | 0 | php,python,django,url,screenshot | If you are family with Python, you can use PyQt4. This library supports to get screenshot from a url. | 0 | 0 | 1 | 0 | 2010-09-28T10:08:00.000 | 6 | 0 | false | 3,811,674 | 0 | 0 | 1 | 1 | There is the URL of page on the Internet. I need to get a screenshot of this page (no matter in which browser).
I need a script (PHP, Python (even Django framework)) that receives the URL (string) and output screenshot-file at the exit (file gif, png, jpg).
UPD:
I need dynamically create a page where opposite to URL w... |
Are there any basic standards and practices for making human readable code? | 3,812,833 | 2 | 6 | 407 | 0 | java,python,html,human-readable | One piece of advice is not to be lazy with names. For example, if you have a Java class which is an implementation of the Transformer interface, and it transforms String to Date, don't hesitate to name the class StringToDateTransformerImpl. | 0 | 0 | 0 | 0 | 2010-09-28T12:43:00.000 | 9 | 0.044415 | false | 3,812,778 | 1 | 0 | 1 | 7 | More specifically making HTML, Java, and python more readable? Does anyone have suggestions for this programming student? |
Are there any basic standards and practices for making human readable code? | 3,813,396 | 1 | 6 | 407 | 0 | java,python,html,human-readable | Proper indentation when writing HTML can be a lifesaver, especially when you're interacting with any sort of nested elements. Just be consistent with the indentation and be sure to update surrounding lines when you move or delete an indented element. This makes it much easier to update the page, as the level of indenta... | 0 | 0 | 0 | 0 | 2010-09-28T12:43:00.000 | 9 | 0.022219 | false | 3,812,778 | 1 | 0 | 1 | 7 | More specifically making HTML, Java, and python more readable? Does anyone have suggestions for this programming student? |
Are there any basic standards and practices for making human readable code? | 3,812,887 | 2 | 6 | 407 | 0 | java,python,html,human-readable | Well, you can always use the "ignorant test". Show your code to someone who knows absolutely nothing about programmation. If he can see more or less what a function does, the code is probably readable. | 0 | 0 | 0 | 0 | 2010-09-28T12:43:00.000 | 9 | 0.044415 | false | 3,812,778 | 1 | 0 | 1 | 7 | More specifically making HTML, Java, and python more readable? Does anyone have suggestions for this programming student? |
Are there any basic standards and practices for making human readable code? | 3,812,844 | 3 | 6 | 407 | 0 | java,python,html,human-readable | Try to read your code out loud (or at least in your head). | 0 | 0 | 0 | 0 | 2010-09-28T12:43:00.000 | 9 | 0.066568 | false | 3,812,778 | 1 | 0 | 1 | 7 | More specifically making HTML, Java, and python more readable? Does anyone have suggestions for this programming student? |
Are there any basic standards and practices for making human readable code? | 3,812,826 | 5 | 6 | 407 | 0 | java,python,html,human-readable | Use consistent casing and naming.
Use tabs (and brackets where available) to provide a visual flow.
Use comments that explain what's happening conceptually as well as technically. (e.g., //Do we have a valid user? not //Check that user_ID is not -1)
I'm sure some more seasoned developers will have more suggestions, ... | 0 | 0 | 0 | 0 | 2010-09-28T12:43:00.000 | 9 | 1.2 | true | 3,812,778 | 1 | 0 | 1 | 7 | More specifically making HTML, Java, and python more readable? Does anyone have suggestions for this programming student? |
Are there any basic standards and practices for making human readable code? | 3,812,816 | 5 | 6 | 407 | 0 | java,python,html,human-readable | Proper indention and informative comments. | 0 | 0 | 0 | 0 | 2010-09-28T12:43:00.000 | 9 | 0.110656 | false | 3,812,778 | 1 | 0 | 1 | 7 | More specifically making HTML, Java, and python more readable? Does anyone have suggestions for this programming student? |
Are there any basic standards and practices for making human readable code? | 3,812,812 | 5 | 6 | 407 | 0 | java,python,html,human-readable | Make sure your code is well structured (proper indentation, blank lines to separate sections of code, etc.) and use standard, consistent, and fully named (rather than incomprehensible abbreviated) variable names.
Others would suggest using proper comments. I would tend to disagree. If your code is well structured and v... | 0 | 0 | 0 | 0 | 2010-09-28T12:43:00.000 | 9 | 0.110656 | false | 3,812,778 | 1 | 0 | 1 | 7 | More specifically making HTML, Java, and python more readable? Does anyone have suggestions for this programming student? |
does python gives interactivity as javascript? | 3,821,323 | 5 | 1 | 128 | 0 | javascript,python | When you use Python for web development, you use it server-side (like PHP). It's not for client-side programming in the same way that JavaScript is. The vast majority of browsers only support JavaScript for client-side programming.
If you want client-side code on a site that's using Python on the server, it still has... | 0 | 0 | 0 | 0 | 2010-09-29T11:49:00.000 | 1 | 1.2 | true | 3,821,305 | 0 | 0 | 1 | 1 | I want to add interactivity like clicks, hover, onpage load() to a webpage, if i use python for generating xhtml, will python give essential flavors like javascript??
I'm bit confused and starter in python for web development, so is there need to include old javascript into python or the python only can handle interact... |
Python App Engine: Task Queues | 3,823,052 | 2 | 1 | 284 | 0 | python,google-app-engine | I've solved this in the past by keeping the status for the tasks in memcached, and polling (via Ajax) to determine when the tasks are finished.
If you go this way, it's best if you can always "manually" determine the status of the tasks without looking in memcached, since there's always the (slim) chance that memcach... | 0 | 1 | 0 | 0 | 2010-09-29T12:41:00.000 | 1 | 1.2 | true | 3,821,636 | 0 | 0 | 1 | 1 | I need to import some data to show it for user but page execution time exceeds 30 second limit. So I decided to split my big code into several tasks and try Task Queues. I add about 10-20 tasks to queue and app engine executes tasks in parallel while user is waiting for data. How can I determine that my tasks are compl... |
Django randomly order users in admin | 3,831,573 | 1 | 0 | 235 | 0 | python,django-admin,customization | If I were you (and I am), I would stop trying to integrate this functionality with the Django admin site. Speaking from experience, you'll find that what you're trying to do is much easier to implement as regular views. Sure, it isn't be as pretty, but something that works beats something that's pretty but doesn't work... | 0 | 0 | 0 | 0 | 2010-09-29T14:55:00.000 | 2 | 0.099668 | false | 3,822,857 | 0 | 0 | 1 | 1 | I am trying to create a Django admin filter that will get random groups of users. At this point, I have two problems:
Applying a custom filter to the User model, and
Displaying a random set of users.
On #1, I've tried using User.username.random_filter = True, but it comes back with an AttributeError saying that User ... |
Running Python command-line utility from Java | 3,824,363 | 0 | 3 | 2,293 | 0 | java,python,scripting | Have you considered jython? You can:
1) use it to run python scripts (allowing it to call Java classes)
2) compile python into class files, making them usable by normal Java code without jython being present at runtime
I've only used it in the first pattern, but I've seen tonnes of docs on the second. | 0 | 1 | 0 | 0 | 2010-09-29T17:26:00.000 | 3 | 0 | false | 3,824,249 | 0 | 0 | 1 | 1 | I developed a command-line utility which needs to be called from a Java GUI application. The team in charge on the Java GUI would like to bind my command-line application to a button in the GUI; the Python application is such that at the time we have no time or interest in rewriting it in Java.
I have no experience wha... |
How do I write to the apache log files when using mod_wsgi | 3,825,257 | 13 | 12 | 3,241 | 0 | python,apache,logging,mod-wsgi | Mostly, we use logging and write to sys.stderr. That seems to write to the Apache error_log. | 0 | 0 | 0 | 0 | 2010-09-29T18:59:00.000 | 1 | 1.2 | true | 3,824,923 | 0 | 0 | 1 | 1 | I have a Django project where I have been logging to a file using the standard library logging module. For a variety of reasons I would like to change it so that it writes to the Apache log files. I've seen quite a bit of discussion of how to do this with mod_python, but not mod_wsgi. How do I do this for a project ... |
Android.mk debug output | 9,443,567 | 2 | 3 | 4,399 | 0 | python,android,debugging,build,trace | I've just experienced an odd effect of using $(info) when compiling a java+C++ Android application:
I used $info) to output some informations about conditional compiling in the Android.mk of the main application and when trying to debug the native part of the program, using ndk-gdb, it failed because apparently the out... | 0 | 0 | 0 | 1 | 2010-09-29T23:23:00.000 | 2 | 0.197375 | false | 3,826,604 | 0 | 0 | 1 | 1 | I am building Froyo, is it possible that during building, make/python can output the file and the command it is calling right now.
For example, in one of the Android.mk, there is a line, says,
echo build success.
On the monitor it will show "build success",
what I want is that in addition, it shows
"Android.mk line 2... |
Problem with web code generator designer | 3,829,743 | 0 | 1 | 82 | 0 | python,code-generation,web-crawler,robot | You need to separate out the idea of what code to generate from the events triggering generation.
What code is generated is governed by the combined set of all the checkboxes that are checked.
Triggering code generation occurs each time any of them are changed. You need to regenerate everything at that time.
In detail:... | 0 | 0 | 0 | 0 | 2010-09-30T09:40:00.000 | 1 | 1.2 | true | 3,829,405 | 0 | 0 | 1 | 1 | I want to write a web-based code generator for a Python crawler. Its aim is to automatically generate code so a developer doesn't need to write it, but I've run into this problem: in one of my project's webpages, there are some checkboxes, buttons, etc. Each of them generates some Python code and writes it to a common ... |
ensuring dynamic image urls in a web-app: use a blob store? | 3,831,317 | 1 | 0 | 291 | 0 | python,sqlite,web-applications,nginx,blob | Why so complicated?
Serve the image under the name which the user supplied (i.e. http://www.mywebapp.com/images/foo1.jpg)
Save the images in a directory using a UUID as name.
Create a map of file names to UUIDs in the session.
In the handler for /images/ look up the real file name in the map. Return 404 if no such ent... | 0 | 1 | 0 | 0 | 2010-09-30T11:59:00.000 | 3 | 1.2 | true | 3,830,294 | 0 | 0 | 1 | 2 | I want to serve images in a web-app using sessions such that the links to the images expire once the session has expired.
If I show the actual links to the filesystem store of the images, say http://www.mywebapp.com/images/foo1.jpg this clearly makes stopping future requests for the image (one the user has signed out o... |
ensuring dynamic image urls in a web-app: use a blob store? | 3,830,345 | -1 | 0 | 291 | 0 | python,sqlite,web-applications,nginx,blob | A combination of your two ideas (copy to a dir, expire when session expires) could be generalized to creating a new dir (could be as simple as a symlink) every 15 minutes. When generating the new symlink, also remove the one that's an hour old by now. Always link to the newest name in your code. | 0 | 1 | 0 | 0 | 2010-09-30T11:59:00.000 | 3 | -0.066568 | false | 3,830,294 | 0 | 0 | 1 | 2 | I want to serve images in a web-app using sessions such that the links to the images expire once the session has expired.
If I show the actual links to the filesystem store of the images, say http://www.mywebapp.com/images/foo1.jpg this clearly makes stopping future requests for the image (one the user has signed out o... |
how to write a desktop application which uses HTML and CSS for user interface and python/perl/c++/java for the processing? | 3,839,449 | 0 | 11 | 4,636 | 0 | javascript,python,html,css,user-interface | update: This is an old answer, nowadays you want to go with an embedded browser in your app (*webkit projects etc.), but at the time of writing, no such technology existed. The answer is still valid if you don't want to add quite a few megabytes to your packaged app though.
Find a lightweight server, or better - embed... | 0 | 0 | 0 | 0 | 2010-10-01T12:41:00.000 | 10 | 1.2 | true | 3,839,216 | 0 | 0 | 1 | 1 | Different languages have different GUI toolkits, but it looks very difficult to achieve attractive user interfaces as good as we can using HTML and CSS with less effort.
I don't do my application in javascript as I doubt if it has all the required libraries and I want to do it in python.
How do I use rendering engines... |
Trouble importing BeautifulSoup in python | 3,840,201 | 2 | 0 | 1,900 | 0 | python,module,importerror | You might have more than one python version installed? Check the version you are running.
Also, I found using easy_install worked well for installing BeautifulSoup. | 0 | 0 | 0 | 0 | 2010-10-01T14:37:00.000 | 1 | 1.2 | true | 3,840,177 | 0 | 0 | 1 | 1 | I've unpacked BeautifulSoup into c:\python2.6\lib\site-packages, which is in sys.path, but when I enter import BeautifulSoup I get an import error saying no such module exists. Obviously I'm doing something stupid... what is it? |
Starting a web app now which will use python that later this need to embed nicely into a Drupal site? | 3,843,449 | 1 | 1 | 114 | 0 | python,drupal | If you write API calls and utilize Drupal Services module, you can hook into just about anything and send/receive JSON/XML data. | 0 | 0 | 0 | 0 | 2010-10-01T21:41:00.000 | 1 | 1.2 | true | 3,843,218 | 0 | 0 | 1 | 1 | This week, I want to start a web mapping and data visualization site for my work.
Unfortunately, I just found out my work place will be using Drupal in a few months down the road. (Most of my web development experience is with App Engine.)
My problem is that I need to make sure my web application embeds nicely into th... |
Google App Engine or Django? | 13,424,917 | 0 | 13 | 5,657 | 0 | python,django,google-app-engine | If you plan to use Django on app engine, then chances are you will want to use Djangos ORM. Which means.. you will probably be looking at Django non-rel. However there are a few things to consider:
Django non-rel runs a few versions behind the latest django release, so some modern features (such as advanced timezone s... | 0 | 1 | 0 | 0 | 2010-10-02T19:29:00.000 | 4 | 0 | false | 3,847,202 | 0 | 0 | 1 | 2 | I've been learning Python and now I'd like to learn a Python-based web framework. I'm considering Google App Engine and Django. Which one should I choose? What are their unique features and learning curves? |
Google App Engine or Django? | 14,967,904 | 1 | 13 | 5,657 | 0 | python,django,google-app-engine | I believe that Django is better because it gives more flexibility with features and also with hosts. Djangobook.com has a very good tutorial. | 0 | 1 | 0 | 0 | 2010-10-02T19:29:00.000 | 4 | 0.049958 | false | 3,847,202 | 0 | 0 | 1 | 2 | I've been learning Python and now I'd like to learn a Python-based web framework. I'm considering Google App Engine and Django. Which one should I choose? What are their unique features and learning curves? |
Deciding on RESTful Architecture for my Python code API | 3,881,996 | 0 | 1 | 643 | 0 | java,python,rest | Hmm, if you're into Python and open to a Java element, you might want to consider using the Java framework Restlet with Python code running in Jython. I'm a big fan of Restlet; its API embodies RESTful principles, so it encourages one to structure one's code and thinking according to those principles. It's also just a ... | 0 | 1 | 0 | 0 | 2010-10-02T22:41:00.000 | 1 | 0 | false | 3,847,803 | 0 | 0 | 1 | 1 | I would like to build something like this
Datastore | mycode.py | RESTful API | mywebapp.py(Django or Tornado)
I checked Piston for Django but it seems that this way I am going to be tied to Django, I would rather have a RESTful API for mycode.py that is consumable by more than one REST client and also can consume it f... |
Confusion about django app's name | 3,848,525 | 0 | 1 | 5,314 | 0 | python,django | When you deploy and app as a standalone package, it is just another Python package, which happens to implement Django views, templates, template tags, etc. Therefore, Django's search path is the Python search path itself. This is why people say "Just make sure the package structure is correct and django can run without... | 0 | 0 | 0 | 0 | 2010-10-03T03:45:00.000 | 4 | 0 | false | 3,848,490 | 0 | 0 | 1 | 4 | I learned Django following django book and the document. In the django book exmaple, the project is called mysite and there's an app called book inside this project. So in this case, the app is called "book". I've no problem with it.
My confusion arises in front of reusable apps. Reusable apps usually reside outside th... |
Confusion about django app's name | 3,848,861 | 2 | 1 | 5,314 | 0 | python,django | The name of the app is the name of the directory, capitalization and all, unless you go to the extra work to change the name in the appropriate __init__.py file. Django apps are, after all, just Python modules, and all the same rules apply.
If you ever see an app or module name with different capitalization or other mo... | 0 | 0 | 0 | 0 | 2010-10-03T03:45:00.000 | 4 | 1.2 | true | 3,848,490 | 0 | 0 | 1 | 4 | I learned Django following django book and the document. In the django book exmaple, the project is called mysite and there's an app called book inside this project. So in this case, the app is called "book". I've no problem with it.
My confusion arises in front of reusable apps. Reusable apps usually reside outside th... |
Confusion about django app's name | 3,848,948 | 0 | 1 | 5,314 | 0 | python,django | An app name is just the name of the Python module. Nothing more.
A python module name is the case name of the root folder of the module, that must contains an init.py file.
If you want to know what this name is, go to your site-packages folder and look for your module. | 0 | 0 | 0 | 0 | 2010-10-03T03:45:00.000 | 4 | 0 | false | 3,848,490 | 0 | 0 | 1 | 4 | I learned Django following django book and the document. In the django book exmaple, the project is called mysite and there's an app called book inside this project. So in this case, the app is called "book". I've no problem with it.
My confusion arises in front of reusable apps. Reusable apps usually reside outside th... |
Confusion about django app's name | 3,848,893 | 1 | 1 | 5,314 | 0 | python,django | My confusion arises in front of reusable apps. Reusable apps usually reside outside the project. For example, django-registration only has an independent folder "registration". So what's its app name? "Registration", right?
django-registration is the project name. The application name is registration:
in application ... | 0 | 0 | 0 | 0 | 2010-10-03T03:45:00.000 | 4 | 0.049958 | false | 3,848,490 | 0 | 0 | 1 | 4 | I learned Django following django book and the document. In the django book exmaple, the project is called mysite and there's an app called book inside this project. So in this case, the app is called "book". I've no problem with it.
My confusion arises in front of reusable apps. Reusable apps usually reside outside th... |
Retrieving YAML parameters during runtime in App Engine (Python) | 3,849,039 | 5 | 3 | 1,038 | 0 | python,google-app-engine,runtime,yaml | No, but some of the data is available from os.environ - for example, os.environ['APPLICATION_ID'], and os.environ['CURRENT_VERSION_ID']. | 0 | 1 | 0 | 0 | 2010-10-03T05:05:00.000 | 3 | 1.2 | true | 3,848,671 | 0 | 0 | 1 | 1 | Is it possible to programmatically retrieve any of the YAML parameters during run-time? Are they stored in the environment somewhere?
Good example would be to automatically find the application version and to add it as a comment in the landing HTML page. |
How to access lowlevel API for storing data in Google App Engine for python | 3,857,498 | 6 | 3 | 304 | 0 | python,google-app-engine,google-cloud-datastore | The 'low level' API is in google.appengine.api.datastore. There's no public documentation for it, but the module itself has fairly complete docstrings. | 0 | 0 | 0 | 0 | 2010-10-04T16:22:00.000 | 2 | 1 | false | 3,857,140 | 0 | 0 | 1 | 1 | What is the alternative for Entity.java in python version?
I do not want any data model. I want my entities without a predefined structure. I just want them to be key and value pairs as the above Entity.java is.
Can I do it in Python version? |
django.contrib.admin like application for cherrypy | 3,898,465 | 3 | 2 | 570 | 0 | python,django,cherrypy | Django admin is much more, but is bound to Models. Without them, You will not gain much and as there is no such concept in CherryPy, I doubt there is similar application.
However, Django admin is phpmyadmin for masses exploited. Don't be constrained by it and create much more usable admin apps, leveraging CherryPy simp... | 0 | 0 | 0 | 0 | 2010-10-05T05:23:00.000 | 2 | 0.291313 | false | 3,861,027 | 0 | 0 | 1 | 1 | Is there a django.contrib.admin like app / module for cherrypy?
I really like the simplicity of cherrypy, but it would be nice, to have the user authentication and password management type things taken care of...
Or is it possible to run a cherrypy application behind the django admin app ? |
Which language to use for writing an admin console à la webmin? | 3,868,363 | 2 | 0 | 155 | 0 | python,ruby,migration,administration | Have you considered writing your applications as Webmin modules?
You get a lot of stuff for free when you do so (users and groups, tons of security features, a pretty big variety of helper functions related to config files, and tons of existing code for most aspects of a UNIX/Linux system). You also get a lot of stuff ... | 0 | 0 | 0 | 1 | 2010-10-05T05:43:00.000 | 4 | 0.099668 | false | 3,861,102 | 0 | 0 | 1 | 3 | We have an in house developed web-based admin console that uses a combination of C CGI and Perl scripts to administer our mail server stack. Of late we have been thinking of cleaning up the code (well, replacing most of it), making the implementation more secure, and improving the overall behavior.
I don't have much pr... |
Which language to use for writing an admin console à la webmin? | 3,897,721 | 0 | 0 | 155 | 0 | python,ruby,migration,administration | django has a nice admin interface | 0 | 0 | 0 | 1 | 2010-10-05T05:43:00.000 | 4 | 0 | false | 3,861,102 | 0 | 0 | 1 | 3 | We have an in house developed web-based admin console that uses a combination of C CGI and Perl scripts to administer our mail server stack. Of late we have been thinking of cleaning up the code (well, replacing most of it), making the implementation more secure, and improving the overall behavior.
I don't have much pr... |
Which language to use for writing an admin console à la webmin? | 3,861,123 | 0 | 0 | 155 | 0 | python,ruby,migration,administration | If you already know a bit of ruby, then there's no reason not to use that.
If you're interested specifically in learning another language, then what you're trying to do could be done in pretty much any language/framework, it's just a matter of which one you want to learn. | 0 | 0 | 0 | 1 | 2010-10-05T05:43:00.000 | 4 | 1.2 | true | 3,861,102 | 0 | 0 | 1 | 3 | We have an in house developed web-based admin console that uses a combination of C CGI and Perl scripts to administer our mail server stack. Of late we have been thinking of cleaning up the code (well, replacing most of it), making the implementation more secure, and improving the overall behavior.
I don't have much pr... |
send commands to a backgrounded jobs stdin | 3,862,362 | 0 | 0 | 157 | 0 | php,python | You could connect its stdin to a FIFO and then have another daemon also connect to the FIFO and send commands. It might be better to have the control daemon start the Java daemon though, so that the Java daemon doesn't shut down if the control daemon does for some reason. | 0 | 1 | 0 | 0 | 2010-10-05T09:20:00.000 | 3 | 0 | false | 3,862,332 | 0 | 0 | 1 | 1 | I have a java server application that, when its running, you can interact with it sending commands via stdin. I want to write a web interface that can send these commands to it.
In order to do that I need some way of getting commands from php to the stdin for this backgrounded job. Is there a way to do this from conso... |
Agnostic automated deployment | 3,864,388 | 1 | 3 | 520 | 0 | java,python,ruby,deployment | We use Ant or Maven for different projects we have in house (depending on the need and how old the project is too...). We tend to use Jenkins (formerly known as Hudson) as our build and deployment tool.
And then we encourage developers to write code that does not hard code to DB's, URL's, etc. We try to abstract via th... | 0 | 1 | 0 | 0 | 2010-10-05T13:47:00.000 | 8 | 0.024995 | false | 3,864,223 | 0 | 0 | 1 | 8 | What do you use to automatically deploy applications for various kinds of server applications (web, socket, daemon) that uses various technologies (different DBs, languages, etc)?
Here we use Python, Java and Ruby, and may use other languages as well in the future.
Update: I ended up using Puppet to manage all server ... |
Agnostic automated deployment | 3,864,349 | 1 | 3 | 520 | 0 | java,python,ruby,deployment | you can use maven, ant, ivy along with hudson for java projects. | 0 | 1 | 0 | 0 | 2010-10-05T13:47:00.000 | 8 | 0.024995 | false | 3,864,223 | 0 | 0 | 1 | 8 | What do you use to automatically deploy applications for various kinds of server applications (web, socket, daemon) that uses various technologies (different DBs, languages, etc)?
Here we use Python, Java and Ruby, and may use other languages as well in the future.
Update: I ended up using Puppet to manage all server ... |
Agnostic automated deployment | 3,864,310 | 1 | 3 | 520 | 0 | java,python,ruby,deployment | I think the best choice you could do is using maven. Even if maven is mostly used for Java projects, you can with the right plugins (or the one you write) deploy anything anywhere. | 0 | 1 | 0 | 0 | 2010-10-05T13:47:00.000 | 8 | 0.024995 | false | 3,864,223 | 0 | 0 | 1 | 8 | What do you use to automatically deploy applications for various kinds of server applications (web, socket, daemon) that uses various technologies (different DBs, languages, etc)?
Here we use Python, Java and Ruby, and may use other languages as well in the future.
Update: I ended up using Puppet to manage all server ... |
Agnostic automated deployment | 3,864,298 | 1 | 3 | 520 | 0 | java,python,ruby,deployment | For Python you could use Fabric or Paver
For Ruby, there's capistrano and 'vlad the deployer'
For Java, it's the Ant.
For PHP/Python projects I also use Peritor Webistrano, a neat frontend for capistrano. It involves changing a few of the default recipes to remove the rails-specific stuff, but it's worth it once you ge... | 0 | 1 | 0 | 0 | 2010-10-05T13:47:00.000 | 8 | 0.024995 | false | 3,864,223 | 0 | 0 | 1 | 8 | What do you use to automatically deploy applications for various kinds of server applications (web, socket, daemon) that uses various technologies (different DBs, languages, etc)?
Here we use Python, Java and Ruby, and may use other languages as well in the future.
Update: I ended up using Puppet to manage all server ... |
Agnostic automated deployment | 3,864,289 | 3 | 3 | 520 | 0 | java,python,ruby,deployment | I use Puppet for some of the deployements / initial configuration of server. Maven and Ant for Java based projects. | 0 | 1 | 0 | 0 | 2010-10-05T13:47:00.000 | 8 | 1.2 | true | 3,864,223 | 0 | 0 | 1 | 8 | What do you use to automatically deploy applications for various kinds of server applications (web, socket, daemon) that uses various technologies (different DBs, languages, etc)?
Here we use Python, Java and Ruby, and may use other languages as well in the future.
Update: I ended up using Puppet to manage all server ... |
Agnostic automated deployment | 6,336,041 | 2 | 3 | 520 | 0 | java,python,ruby,deployment | Go for KWateeSDCM. It comes with a straightforward web GUI and does not require obscure scripting and integrates nicely with your build chain via a REST API. | 0 | 1 | 0 | 0 | 2010-10-05T13:47:00.000 | 8 | 0.049958 | false | 3,864,223 | 0 | 0 | 1 | 8 | What do you use to automatically deploy applications for various kinds of server applications (web, socket, daemon) that uses various technologies (different DBs, languages, etc)?
Here we use Python, Java and Ruby, and may use other languages as well in the future.
Update: I ended up using Puppet to manage all server ... |
Agnostic automated deployment | 3,864,283 | 1 | 3 | 520 | 0 | java,python,ruby,deployment | We use Maven and pull out to the ant-plugin when required. In turn the ant-plugin very occasionally calls out to some native scripting language/application/packager/whatever but we're finding that over time we can generally find a Maven or ANT plugin/task to do the trick.
You might want to look up Continuous Deploymen... | 0 | 1 | 0 | 0 | 2010-10-05T13:47:00.000 | 8 | 0.024995 | false | 3,864,223 | 0 | 0 | 1 | 8 | What do you use to automatically deploy applications for various kinds of server applications (web, socket, daemon) that uses various technologies (different DBs, languages, etc)?
Here we use Python, Java and Ruby, and may use other languages as well in the future.
Update: I ended up using Puppet to manage all server ... |
Agnostic automated deployment | 3,864,269 | 2 | 3 | 520 | 0 | java,python,ruby,deployment | You could use Ant, Makefile, or a batch script. Or a combination of them. | 0 | 1 | 0 | 0 | 2010-10-05T13:47:00.000 | 8 | 0.049958 | false | 3,864,223 | 0 | 0 | 1 | 8 | What do you use to automatically deploy applications for various kinds of server applications (web, socket, daemon) that uses various technologies (different DBs, languages, etc)?
Here we use Python, Java and Ruby, and may use other languages as well in the future.
Update: I ended up using Puppet to manage all server ... |
How do I replace the current working MySQL database with a .sql file? | 3,868,544 | 1 | 0 | 182 | 1 | python,mysql,django | You can't import sql dumps through django; import it through mysql directly, if you run mysql locally you can find various graphical mysql clients that can help you with doing so; if you need to do it remotely, find out if your server has any web interfaces for that installed! | 0 | 0 | 0 | 0 | 2010-10-05T19:28:00.000 | 2 | 1.2 | true | 3,866,989 | 0 | 0 | 1 | 1 | I'm trying to restore the current working database to the data stored in a .sql file from within Django. Whats the best way to do this? Does django have an good way to do this or do I need to grab the connection string from the settings.py file and send command line mysql commands to do this?
Thanks for your help. |
Strip whitespace from Mako template output (Pylons) | 3,868,737 | 0 | 7 | 4,817 | 0 | python,html,pylons,mako | If your data are not too dynamic, you could store an optimised cache of the template output and serve this to web clients. | 0 | 0 | 0 | 0 | 2010-10-06T00:24:00.000 | 5 | 0 | false | 3,868,722 | 0 | 0 | 1 | 1 | I'm using Mako + Pylons and I've noticed a horrendous amount of whitespace in my HTML output.
How would I go about getting rid of it? Reddit manage to do it. |
Pylons - Handling GET and POST requests | 3,871,201 | 2 | 1 | 1,052 | 0 | python,validation,pylons | Having it all in one method, and detecting if the form has been posted via a check on request.method. This works okay, but it seems clumsy to have if request.method == 'post': ... else: ...
I am not sure why you describe this as clumsy. Switching on request method is a valid idiom in the web app world across languages... | 0 | 0 | 0 | 0 | 2010-10-06T09:32:00.000 | 1 | 1.2 | true | 3,871,145 | 0 | 0 | 1 | 1 | What's the best way to handle form POST data in my Pylons app? I've tried:
Having a seperate GET method and a POST method with a rest.restrict('post') decorator. Problem -- if there were validation errors then you can't redisplay the form with the data which the user entered because you have to redirect back to the GE... |
Scrapy - how to identify already scraped urls | 8,830,983 | 1 | 15 | 9,648 | 0 | python,web-crawler,scrapy | I think jama22's answer is a little incomplete.
In the snippet if self.FILTER_VISITED in x.meta:, you can see that you require FILTER_VISITED in your Request instance in order for that request to be ignored. This is to ensure that you can differentiate between links that you want to traverse and move around and item l... | 0 | 0 | 1 | 0 | 2010-10-06T10:38:00.000 | 5 | 0.039979 | false | 3,871,613 | 0 | 0 | 1 | 2 | Im using scrapy to crawl a news website on a daily basis. How do i restrict scrapy from scraping already scraped URLs. Also is there any clear documentation or examples on SgmlLinkExtractor. |
Scrapy - how to identify already scraped urls | 13,578,588 | 1 | 15 | 9,648 | 0 | python,web-crawler,scrapy | Scrapy can auto-filter urls which are scraped, isn't it? Some different urls point to the same page will not be filtered, such as "www.xxx.com/home/" and "www.xxx.com/home/index.html". | 0 | 0 | 1 | 0 | 2010-10-06T10:38:00.000 | 5 | 0.039979 | false | 3,871,613 | 0 | 0 | 1 | 2 | Im using scrapy to crawl a news website on a daily basis. How do i restrict scrapy from scraping already scraped URLs. Also is there any clear documentation or examples on SgmlLinkExtractor. |
Caching external javascript for a QtWebkit widget in a PyQt app | 3,886,529 | 0 | 1 | 1,071 | 0 | javascript,python,pyqt,qtwebkit | Could you post some source code? Once downloaded that data will stay in the /tmp/ folder for some time. You could likely use the data in the temp folder, my guess is you are not enforcing that policy. | 1 | 0 | 0 | 0 | 2010-10-06T11:41:00.000 | 2 | 0 | false | 3,872,033 | 0 | 0 | 1 | 1 | I have a QWebView in my app which renders a html page stored in the app as a Qresource. This page, however requires meaty external Javascript libraries such as MathJax, which I would want to include as a resource due to its size.
My problem is that it seems that QtWebkit does not cache these files as a regular browser... |
Can I change an an existing virtualenv to ignore global site packages? (like --no-site-package on a new one) | 3,874,179 | 20 | 14 | 5,667 | 0 | python,virtualenv | I think all you have to do is create an empty file called no-global-site-packages.txt and put it into the virtualenv's python2.x folder (eg, lib/python2.6/, the one with all the modules). Then the normal site.py generated by virtualenv detects the difference and handles everything from there. | 0 | 0 | 0 | 0 | 2010-10-06T14:04:00.000 | 2 | 1 | false | 3,873,294 | 1 | 0 | 1 | 1 | I can create a new virtualenv that ignores global site-packages with "--no-site-package". Is it possible to change an existing virtualenv (which was created without "--no-site-package") to also ignore the global site-packages? (So that it workes like it was created with "--no-site-package" in the first place.)
thanks i... |
Javascript Execution Through Python | 3,874,358 | 1 | 3 | 624 | 0 | javascript,jquery,python,html,parsing | jQuery itself does not contain an HTML/XML parser at all. It uses the browser to do all its parsing. Thus, even if you figure out how to run Javascript from Python, it won't do you any good. | 0 | 0 | 0 | 0 | 2010-10-06T15:41:00.000 | 4 | 0.049958 | false | 3,874,280 | 1 | 0 | 1 | 1 | I am attempting to create an html document parser with Python. I am very familiar with jQuery and I would like to use its traversing functionality to parse these html files and return the data gathered with jQuery back to my Python program.
Is there any way to use javascript scripts through Python? Or is this just a pi... |
Developing with Django+Celery without running `celeryd`? | 58,684,713 | 0 | 29 | 9,748 | 0 | python,django,celery | After 5+ years of writing Celery tasks I have noticed a pattern I have developed that can help with testing and ease of development - I realised it is much better if my Celery tasks are thin wrappers around the regular Python functions that I typically put in myproject.impl package. Celery tasks may contain some strict... | 0 | 1 | 0 | 0 | 2010-10-06T15:54:00.000 | 4 | 0 | false | 3,874,422 | 0 | 0 | 1 | 1 | In development, it's a bit of a hassle to run the celeryd as well as the Django development server. Is it possible to, for example, ask celery to run tasks synchronously during development? Or something similar? |
Google App Engine (Python)- Strange behaviour of REMOTE_ADDR | 3,877,766 | 0 | 0 | 438 | 0 | python,google-app-engine,ip-address | I believe that I have figured out the reason for seeing so many warnings from google server IP addresses. It seems that immediately after a new user registers, the google crawlers are going to the same (registration) webpage (which I send information to as a GET instead of a POST for reasons which I will not get into).... | 0 | 0 | 0 | 1 | 2010-10-06T23:28:00.000 | 1 | 1.2 | true | 3,877,631 | 0 | 0 | 1 | 1 | In order to make the registration process on my website easy, I allow users to enter their email address which I will send a verification code to or alternatively they can solve a captcha.
The problem is that in order to prevent robots from registering accounts (with fake emails) I limit the number of registrations all... |
use sqlalchemy entity isolately | 3,896,280 | 1 | 0 | 85 | 1 | python,sqlalchemy,entity | You can expunge it from session before modifying object, then this changes won't be accounted on next commits unless you add the object back to session. Just call session.expunge(obj). | 0 | 0 | 0 | 0 | 2010-10-07T11:56:00.000 | 1 | 1.2 | true | 3,881,364 | 0 | 0 | 1 | 1 | i just want to use an entity modify it to show something,but don't want to change to the db,
but after i use it ,and in some other place do the session.commit()
it will add this entity to db,i don't want this happen,
any one could help me? |
How google docs shows my .PPT files without using a flash viewer? | 3,899,697 | 0 | 2 | 1,773 | 0 | java,c++,python,powerpoint,google-docs | Now i found a solution to showing .ppt file on my website without using the flash
the solution is:
just convert the .ppt file to .pdf files using any language or using software(e.g. open office) and then use Imagemagick to convert that .pdf into image and show to your web page
once again thanks to you all for answeri... | 0 | 0 | 1 | 0 | 2010-10-07T13:45:00.000 | 3 | 1.2 | true | 3,882,249 | 0 | 0 | 1 | 1 | I want to show .ppt (PowerPoint) files uploaded by my user on my website. I could do this by converting them into Flash files, then showing the Flash files on the web page. But I don't want to use Flash to do this. I want to show it, like google docs shows, without using Flash.
I've already solved the problem for .pdf ... |
Run Django on multiple ports | 3,883,556 | 18 | 8 | 14,240 | 0 | python,django | Just run two instances of ./manage.py runserver. You can set a port by simply specifying it directly: ./manage.py runserver 8002 to listen on port 8002.
Edit I don't really understand why you want to do this. If you want two servers serving different parts of your site, then you have in effect two sites, which will nee... | 0 | 0 | 0 | 0 | 2010-10-07T15:57:00.000 | 3 | 1.2 | true | 3,883,497 | 0 | 0 | 1 | 2 | Could someone tell me how I can run Django on two ports simultaneously? The default Django configuration only listens on port 8000. I'd like to run another instance on port xxxx as well. I'd like to redirect all requests to this second port to a particular app in my Django application.
I need to accomplish this with t... |
Run Django on multiple ports | 3,883,557 | 2 | 8 | 14,240 | 0 | python,django | The built-in web-server is intended for development only, so you should really be using apache or similar in an situation where you need to run on multiple ports.
On the other hand you should be able to start up multiple servers just by starting multiple instances of runserver. As long as you are using a separate datab... | 0 | 0 | 0 | 0 | 2010-10-07T15:57:00.000 | 3 | 0.132549 | false | 3,883,497 | 0 | 0 | 1 | 2 | Could someone tell me how I can run Django on two ports simultaneously? The default Django configuration only listens on port 8000. I'd like to run another instance on port xxxx as well. I'd like to redirect all requests to this second port to a particular app in my Django application.
I need to accomplish this with t... |
django, python: reload function in shell | 34,309,424 | 0 | 6 | 8,233 | 0 | python,django,shell,ipython | The easiest solution I've found is combination of shell_plus and iPython which automatically reloads functions.
pip install ipython
pip install django-extensions
add 'django_extensions' to your INSTALLED_APPS
python manage.py shell_plus | 0 | 0 | 0 | 0 | 2010-10-07T16:12:00.000 | 5 | 0 | false | 3,883,619 | 1 | 0 | 1 | 1 | I work in the django IPython-shell, which can be started with manage.py shell.
When i load an extern function in the shell for testing, everything is alright. But when i make changes to the function, the shell still has the old version of the function. Even if i make a new import.
Does anyone know how to reload the act... |
Letting users to choose what type of content they want to input | 3,887,176 | 0 | 0 | 63 | 0 | python,django-models,input,field | How about creating a separate model for each type of field you want to support, and then another model consisting of a list of (table_name, entry_id) pairs, which could be customized to use any combination of fields? | 0 | 0 | 0 | 0 | 2010-10-08T01:09:00.000 | 1 | 0 | false | 3,887,017 | 0 | 0 | 1 | 1 | This is my first post here, and I'd like to describe what I want to do as specific as possible.
I'd like to make a model that is 'selectable.'
for example,
class SimpleModel(models.Model):
property = models.CharField(max_length=255)
value = GeneralField()
GeneralField can be "CharField", "URLField", "TextFiel... |
What is the use of related fields in OpenERP? | 10,221,855 | 1 | 10 | 11,804 | 0 | python,openerp | related fields leads the control to another table the parent table wil have a onetomany relation with the child table and the child table have a manytoone relation towards the parent table.
eg: the account.invoice to account.invoice.line with the following field
'invoice_line': fields.one2many('account.invoice.line', ... | 0 | 0 | 0 | 0 | 2010-10-08T04:20:00.000 | 4 | 0.049958 | false | 3,887,675 | 0 | 0 | 1 | 1 | Can someone explain to me something about related fields. For example -
How it was used
How it can be helped
For which kind of scenario I should use fields.related
If anybody can provide a small example for real use of fields.related I would appreciate it. |
How can I get all the request headers in Django? | 46,259,055 | 6 | 131 | 150,515 | 0 | python,django,http-headers,httprequest | request.META.get('HTTP_AUTHORIZATION')
/python3.6/site-packages/rest_framework/authentication.py
you can get that from this file though... | 0 | 0 | 0 | 0 | 2010-10-08T10:47:00.000 | 10 | 1 | false | 3,889,769 | 0 | 0 | 1 | 1 | I need to get all the Django request headers. From what I've read, Django simply dumps everything into the request.META variable along with a lot of other data. What would be the best way to get all the headers that the client sent to my Django application?
I'm going use these to build a httplib request. |
Python to javascript communication | 3,890,407 | 7 | 1 | 1,908 | 0 | javascript,python,sockets,encoding | JSON is definitely the way to go. It has a very small overhead and is capable of storing almost any kind of data. I am not a python expert, but i am sure that there is some kind of en/decoder available. | 0 | 0 | 1 | 0 | 2010-10-08T12:22:00.000 | 2 | 1 | false | 3,890,390 | 1 | 0 | 1 | 1 | OK so im using websockets to let javascript talk to python and that works very well BUT the data i need to send often has several parts like an array, (username,time,text) but how could i send it ? I originally though to encode each one in base64 or urlencode then use a character like | which those encoding methods wil... |
Twisted Deferred.addCallBack() vs. yield and @inlineDeferred | 8,505,450 | 0 | 11 | 5,275 | 0 | python,twisted | use defer.inlineCallbacks can make your codes easiler to read..
and it somehow like corountine style: you neither block the call nor use chain of callbacks to build the whole logic. It is intuitive. | 0 | 0 | 0 | 0 | 2010-10-08T21:00:00.000 | 3 | 0 | false | 3,894,278 | 0 | 0 | 1 | 2 | Is there any reason to use one over the other?
Do they have the same performance? |
Twisted Deferred.addCallBack() vs. yield and @inlineDeferred | 3,894,412 | 2 | 11 | 5,275 | 0 | python,twisted | The differences should really be subtle. If this code really does run that often that it matters, perhaps you should look into your application design. Otherwise, take the variant which is more easy to read, you will have to make heads and tails out of it a couple of months or years down the road.
EDIT: If you really w... | 0 | 0 | 0 | 0 | 2010-10-08T21:00:00.000 | 3 | 0.132549 | false | 3,894,278 | 0 | 0 | 1 | 2 | Is there any reason to use one over the other?
Do they have the same performance? |
Blender3d vs 3DS max; which one is better suited for automation in python? | 3,896,157 | 4 | 2 | 1,647 | 0 | python,blender,panda3d | From a python automation point of view, blender itself is written largely in python, and the source is available which allows a level of automation not possible if you can't change the source. To me, having the source available in that situation is more of a benefit than the price tag.
If you do go with blender, defin... | 0 | 0 | 0 | 0 | 2010-10-09T15:11:00.000 | 2 | 1.2 | true | 3,896,087 | 0 | 0 | 1 | 1 | I am getting started with the development of 3d environments for using in panda3d. As I am new to this, I need to choose a modelling software to create basic geometries, etc. Therefore, which one is better suited for automation through python? 3DS Max or Blender3D? I would like to automate generating basic geometries, ... |
How to do cloud computing with Python and Java? Final Year project | 3,896,820 | 0 | 1 | 2,332 | 0 | python,django,cloud | If you're going to use a web framework on the server, it makes sense to use an HTTP-based protocol. The downside is that only the client can initiate a connection (e.g., the client needs to first ask for the "dump" file), but a simple GET request will suffice (remember, the server can send anything in the HTTP response... | 0 | 0 | 0 | 0 | 2010-10-09T09:24:00.000 | 3 | 0 | false | 3,896,741 | 0 | 0 | 1 | 2 | For my final year project I plan to code a cloud in Python. The client will be written in Java by the other member of my team. The client will have a tabbed interface and it will provide a text editor, a media player, a couple of small Java based games and a maybe a few more services.
The server will work like this: ... |
How to do cloud computing with Python and Java? Final Year project | 3,896,834 | 0 | 1 | 2,332 | 0 | python,django,cloud | Stick to Django. It's really productive. I would use JSON instead of XML. More convenient. import json. This should help you in communicating between client-server.
Also cloud computing is just a recent word that's just thrown around for (client+server+some services). Oh by the way all that you want to do can be comple... | 0 | 0 | 0 | 0 | 2010-10-09T09:24:00.000 | 3 | 0 | false | 3,896,741 | 0 | 0 | 1 | 2 | For my final year project I plan to code a cloud in Python. The client will be written in Java by the other member of my team. The client will have a tabbed interface and it will provide a text editor, a media player, a couple of small Java based games and a maybe a few more services.
The server will work like this: ... |
URL rewriting question | 3,898,807 | 0 | 0 | 762 | 0 | python,apache | You'd need to show your apache configuration to say for certain, but it seems that Apache isn't actually using mod_cgi to serve the index.cgi script. In your configuration there should be something like 'LoadModule mod_cgi'. It should be uncommented (i.e., it shouldn't have a '#' at the beginning of the line).
If you ... | 0 | 1 | 0 | 1 | 2010-10-09T17:31:00.000 | 2 | 0 | false | 3,897,140 | 0 | 0 | 1 | 2 | I have a CGI script (pwyky) that I called index.cgi, put in directory wiki/, and setup Apache to call localhost/wiki/index.cgi when I access localhost/wiki.
I'm getting errors when I'm trying to use this application -- it creates a page with links like "http://localhost/wiki/@edit/index", but when I click that link, Ap... |
URL rewriting question | 3,908,016 | 0 | 0 | 762 | 0 | python,apache | I found the problem, it turned out this is done through RewriteEngine. Pwyky puts .htaccess file in the directory with all the settings for RewriteEngine, but because AllowOverride is "None" by default on MacOS, they were ignored. The solution was to change all "AllowOverride" directives to "All" | 0 | 1 | 0 | 1 | 2010-10-09T17:31:00.000 | 2 | 1.2 | true | 3,897,140 | 0 | 0 | 1 | 2 | I have a CGI script (pwyky) that I called index.cgi, put in directory wiki/, and setup Apache to call localhost/wiki/index.cgi when I access localhost/wiki.
I'm getting errors when I'm trying to use this application -- it creates a page with links like "http://localhost/wiki/@edit/index", but when I click that link, Ap... |
Django Sphinx Text Search | 4,121,651 | 1 | 0 | 395 | 1 | python,django,search,full-text-search,django-sphinx | Here's a shot in the dark -
Try to get the name of your index in sphinx.conf same as the table_name you are trying to index. This is a quirk which is missed by lot of people. | 0 | 0 | 0 | 0 | 2010-10-09T20:02:00.000 | 1 | 1.2 | true | 3,897,650 | 0 | 0 | 1 | 1 | I am trying out Sphinx search in my Django project. All setup done & it works but need some clarification from someone who has actually used this setup.
In my Sphinx search while indexing, I have used 'name' as the field in my MySQL to be searchable & all other fields in sql_query to be as attributes (according to Sphi... |
Django - Form widget with a checkbox to choose between unlimited or a textbox for a number | 3,910,066 | 1 | 2 | 734 | 0 | python,django,django-forms | You can either make the form have an additional form field for the checkbox. And override it's save method to fill the model fields accordingly. Or you can make a custom form field widget that would hold both HTML input fields and produce the appropriate python value from the inputs and vice versa. The first option bei... | 0 | 0 | 0 | 0 | 2010-10-11T09:00:00.000 | 1 | 0.197375 | false | 3,904,809 | 0 | 0 | 1 | 1 | I am making a form in Django. The field to display is a numeric field representing some limit. It's possible for there to be no limit. Rather than force the user to enter some strange number to mean unlimited (e.g. -1), I'd like there to be a radio button, with 2 options: "Unlimited" and the second option being a text ... |
Twisted factory protocol instance based callback | 3,906,174 | 1 | 0 | 499 | 0 | python,twisted,factory | No. Write a class that does the interaction with one user. In connectionMade you check if a instance of this class already exists, if not you make a new one and store it on the factory, ie in a { addr : handler } dict. If the connection exists alreay you get the old handler from the factory. | 0 | 1 | 0 | 0 | 2010-10-11T11:33:00.000 | 1 | 0.197375 | false | 3,905,791 | 0 | 0 | 1 | 1 | Hey, I got a ReconnectingClientFactory and I wonder if I can somehow define protocol-instance-based connectionMade/connectionLost callbacks so that i can use the factory to connect to different hosts ans distinguish between each connection.
Thanks in advance. |
Python hangs in futex calls | 4,533,967 | 2 | 2 | 7,410 | 0 | python,multithreading,debugging,deadlock,futex | Dear Helmut, I've the same problem with one thread hanging on FUTEXT_WAIT_PRIVATE.
It seems you have solved the issue. Can you share more information about the solution?
UPD:
The reason for the lock was finally found (at least for my case): it was due to import lock in Python.
Consider following situation:
file1.py:
i... | 0 | 0 | 0 | 1 | 2010-10-11T11:48:00.000 | 2 | 0.197375 | false | 3,905,883 | 0 | 0 | 1 | 2 | I have a Python daemon running in production. It employs between 7 and 120 threads. Recently the smallest instance (7 threads) started to show hangs while all other instances never showed this kind of problem. Attaching strace to the python process shows that all threads are calling futex FUTEX_WAIT_PRIVATE, so they ar... |
Python hangs in futex calls | 3,913,056 | 4 | 2 | 7,410 | 0 | python,multithreading,debugging,deadlock,futex | The observation was slightly incorrect. One thread wasn't calling futex, but instead swapping while holding the gil. Since the machine in question is low hardware this swapping took very long and seemed to be a deadlock. The underlying problem is a memory leak. :-( | 0 | 0 | 0 | 1 | 2010-10-11T11:48:00.000 | 2 | 1.2 | true | 3,905,883 | 0 | 0 | 1 | 2 | I have a Python daemon running in production. It employs between 7 and 120 threads. Recently the smallest instance (7 threads) started to show hangs while all other instances never showed this kind of problem. Attaching strace to the python process shows that all threads are calling futex FUTEX_WAIT_PRIVATE, so they ar... |
Can I use IronPython to develop GUIs for Google App Engine? | 3,908,074 | 3 | 3 | 651 | 0 | python,user-interface,google-app-engine,ironpython | Google's Google App Engine can only run pure python code, and not even all Python is supported. No, you can't do things like IronPython.
If you want to use Python, I'd learn Django. If you want something closer to .NET, I'd go with Java. | 1 | 0 | 0 | 0 | 2010-10-11T16:23:00.000 | 1 | 0.53705 | false | 3,908,062 | 0 | 0 | 1 | 1 | I'm developing a simple Python program with a (dynamic) form interface, but it needs to run on Google App Engine. I understand that IronPython lets one use Visual Studio's drag-and-drop interface builder and classes while programming with Python, but will this be compatible with Google App Engine? |
Issue happens when installing Django on Windows 7 | 3,912,677 | 2 | 1 | 494 | 0 | python,django,installation | It is very likely that the py extension is linked with the editor rather than the Python interpreter.
Right-click on a py file and click "Open with" then select the default program and choose 'C:...\Python2x\python.exe'
That should fix the pb | 0 | 0 | 0 | 0 | 2010-10-12T07:53:00.000 | 1 | 1.2 | true | 3,912,579 | 0 | 0 | 1 | 1 | I've got an issue when installing Django.
The official guide says open cmd with administrator privileges and run "setup.py install"
I did this but then the system default python editor came out, I don't know how to do anymore, please help me~ |
how to monitor python wsgi server,when it crashed restart it | 3,923,177 | 1 | 0 | 829 | 0 | python,crash,wsgi,restart | I'd use your operational system's service integration to do that. For example, on debian linux, there's start-stop-daemon. On windows, there's the service management.
It's the proven, well integrated way, provided by the operational system itself, to keep an application running.
Just make your installation program regi... | 0 | 0 | 0 | 0 | 2010-10-13T04:47:00.000 | 2 | 1.2 | true | 3,920,842 | 0 | 0 | 1 | 1 | i have a wsgi server which use paste,for some unkonw reason,it will often crash,so i want to has a application or just some package can help me to slove this,when it crashed automaticly kill the process and restart it.Any advice is welcome. |
Python webapp - moving from testing to production | 3,965,912 | 1 | 2 | 444 | 0 | python,web-applications,webserver,nginx | Available options are:
apache + mod_python
apache + mod_wsgi
lighttpd + mod_fastcgi
lighttpd + gunicorn
nginx + gunicorn
I suggest you to go for gunicorn. | 0 | 0 | 0 | 0 | 2010-10-13T14:19:00.000 | 3 | 1.2 | true | 3,924,668 | 0 | 0 | 1 | 1 | I've made a small web app using web.py that I now want to put into production. I dont anticipate this will have very high concurrent use (probably max of 5 or so users at any given time, if that).
That said, I dont want to go with the cherry.py server that comes with web.py (and which i have been using for debugging), ... |
Options for handling javascript heavy pages while screen scraping | 3,992,151 | 0 | 2 | 795 | 0 | python,screen-scraping | For nonprogrammers, I recomment using IRobotSoft. It is visual oriented and with full javascript support. The shortcoming is that it runs only on Windows. The good thing is you can become an expert just by trial and error to learn the software. | 0 | 0 | 1 | 0 | 2010-10-13T23:58:00.000 | 4 | 0 | false | 3,929,005 | 0 | 0 | 1 | 1 | Disclaimer here: I'm really not a programmer. I'm eager to learn, but my experience is pretty much basic on c64 20 years ago and a couple of days of learning Python.
I'm just starting out on a fairly large (for me as a beginner) screen scraping project. So far I have been using python with mechanize+lxml for my browsin... |
Catching the Access Token sent by Facebook after successful authentication | 4,663,777 | 0 | 2 | 755 | 0 | python,facebook | There's a getLoginUrl in the facebook SDK. You might want to look at that.
-Roozbeh | 0 | 0 | 1 | 0 | 2010-10-14T04:38:00.000 | 2 | 0 | false | 3,930,129 | 0 | 0 | 1 | 1 | I am trying to make an app for authenticating user with their facebook account in python. App opens the facebook login page in web browser. After user logs in, facebook redirects it to thei dummy success page. At that moment i need to capture that redirect url in my app. I am not able to catch that URL.
I am opening f... |
pydev not recognizing python installation with django | 3,941,289 | 12 | 15 | 11,629 | 0 | python,django,eclipse,pydev | go in the menu to window -> preference -> pydev -> Interpreter - Python ; and add the python interpreter there, if you installed the django in a virtual environment you should add the python interpreter of the virtual env ; after adding the interpreter by clicking on new you should now click on Apply , you should see n... | 0 | 0 | 0 | 0 | 2010-10-15T06:11:00.000 | 10 | 1.2 | true | 3,939,877 | 1 | 0 | 1 | 10 | I have python installed with django. I know the installation is there because I installed it following the directions and in the command line I can do "import python" and there is no crash.
When I try creating a django project in pydev, I get an error: "Django not found."
What could the problem be? |
pydev not recognizing python installation with django | 4,118,703 | 6 | 15 | 11,629 | 0 | python,django,eclipse,pydev | Jaffa,
You might have configured your python interpreter in Eclipse prior to installing Django in python.
So what you have to do now is in Eclipse remove the Python interpreter and add it again (now that it has Django installed) and all should work ok. | 0 | 0 | 0 | 0 | 2010-10-15T06:11:00.000 | 10 | 1 | false | 3,939,877 | 1 | 0 | 1 | 10 | I have python installed with django. I know the installation is there because I installed it following the directions and in the command line I can do "import python" and there is no crash.
When I try creating a django project in pydev, I get an error: "Django not found."
What could the problem be? |
pydev not recognizing python installation with django | 28,459,588 | 0 | 15 | 11,629 | 0 | python,django,eclipse,pydev | Same problem I have faced today. I took help from these answer.
but in my case it didnt work.
There is small modification in @antonkeren answer.
1) Go to Preferences. Windows > preferences.
2) Search for Pydev
3) Select Python Interpreter
4) Pressed Quick Auto-config
5) now download www.djangoproject.org/downloads dja... | 0 | 0 | 0 | 0 | 2010-10-15T06:11:00.000 | 10 | 0 | false | 3,939,877 | 1 | 0 | 1 | 10 | I have python installed with django. I know the installation is there because I installed it following the directions and in the command line I can do "import python" and there is no crash.
When I try creating a django project in pydev, I get an error: "Django not found."
What could the problem be? |
pydev not recognizing python installation with django | 3,943,039 | 1 | 15 | 11,629 | 0 | python,django,eclipse,pydev | I stumbled upon this only yesterday myself: Django must not be among the system libraries for this to function... | 0 | 0 | 0 | 0 | 2010-10-15T06:11:00.000 | 10 | 0.019997 | false | 3,939,877 | 1 | 0 | 1 | 10 | I have python installed with django. I know the installation is there because I installed it following the directions and in the command line I can do "import python" and there is no crash.
When I try creating a django project in pydev, I get an error: "Django not found."
What could the problem be? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.