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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Persistence for a python (cherrypy) web application? | 9,832,722 | 0 | 2 | 456 | 1 | python,web-applications,persistence,cherrypy | I have developed a transparent persistent storage system for python this is currently in an alpha-stage. Once you create a persistent object, you can access and modify its attributes using standard python syntax (obj.x=3;) and the persistence is done behind the scenes (by overloading the setattr methods, etc.). Conta... | 0 | 0 | 0 | 0 | 2012-03-13T05:49:00.000 | 3 | 0 | false | 9,678,989 | 0 | 0 | 1 | 2 | I am trying rewrite a simple Rails application I made a while ago with cherrypy and Python3. So far I have been unable to find a Python replacement for ActiveRecord (the persistence part of the application). Most of the recommendations I've found on StackOverflow have been for SQL Alchemy. I looked into this and it ... |
Persistence for a python (cherrypy) web application? | 9,679,132 | 1 | 2 | 456 | 1 | python,web-applications,persistence,cherrypy | SQL Alchemy is a industrial standard is no choice. But it's not as difficult as it seems at first sight | 0 | 0 | 0 | 0 | 2012-03-13T05:49:00.000 | 3 | 0.066568 | false | 9,678,989 | 0 | 0 | 1 | 2 | I am trying rewrite a simple Rails application I made a while ago with cherrypy and Python3. So far I have been unable to find a Python replacement for ActiveRecord (the persistence part of the application). Most of the recommendations I've found on StackOverflow have been for SQL Alchemy. I looked into this and it ... |
How to prevent FCGI request timeout in Django | 9,686,346 | 4 | 3 | 4,285 | 0 | python,django,fastcgi | Timeout is in webserver, not in Django. You make a request to webserver and get a response from it, so you can't get anything outside of that response. In your case you should create a background task on server, usually getting started by cron or celery (it hink you can't run celery on hostgator so use cron) with a que... | 0 | 0 | 0 | 0 | 2012-03-13T08:52:00.000 | 2 | 0.379949 | false | 9,680,836 | 0 | 0 | 1 | 1 | I have a webhook which takes a little time to complete (around 5 minutes). However, the request gets timeout after around 30 seconds.
I am on a shared hosting with HostGator and using FCGI for deployment.
I think the request gets timed-out as there is not HTTPResponse until the request is processed. If I can generate s... |
Asynchronous versions of Google APIs? | 9,948,934 | 0 | 6 | 2,692 | 0 | python,google-app-engine,google-docs-api | Currently the Documents List API library for Python (The GData Library) is rigidly synchronous. One solution would be to serialize the requests as tasks for a task queue and run them later, but the library itself won't help, I'm afraid. | 0 | 1 | 0 | 0 | 2012-03-13T14:54:00.000 | 2 | 1.2 | true | 9,686,505 | 0 | 0 | 1 | 1 | Is there any way to queue up document list API requests and handle them asynchronously (similar to the google app engine async urlfetch requests)?
I could conceivably copy/rewrite a lot of the client request modification logic in DocsClient around a urlfetch request, but I'd rather avoid that if there's some other meth... |
Does app engine automatically cache frequent queries? | 9,689,883 | 1 | 3 | 1,313 | 1 | python,google-app-engine,memcached,bigtable | I think that app engine does not cache anything for you. While it could be that, internally, it caches some things for a split second, I don't think you should rely on that.
I think you will be charged the normal number of read operations for every entity you read from every query. | 0 | 1 | 0 | 0 | 2012-03-13T18:06:00.000 | 3 | 0.066568 | false | 9,689,588 | 0 | 0 | 1 | 2 | I seem to remember reading somewhere that google app engine automatically caches the results of very frequent queries into memory so that they are retrieved faster.
Is this correct?
If so, is there still a charge for datastore reads on these queries? |
Does app engine automatically cache frequent queries? | 9,690,080 | 1 | 3 | 1,313 | 1 | python,google-app-engine,memcached,bigtable | No, it doesn't. However depending on what framework you use for access to the datastore, memcache will be used. Are you developing in java or python? On the java side, Objectify will cache GETs automatically but not Queries. Keep in mind that there is a big difference in terms of performance and cachability between get... | 0 | 1 | 0 | 0 | 2012-03-13T18:06:00.000 | 3 | 0.066568 | false | 9,689,588 | 0 | 0 | 1 | 2 | I seem to remember reading somewhere that google app engine automatically caches the results of very frequent queries into memory so that they are retrieved faster.
Is this correct?
If so, is there still a charge for datastore reads on these queries? |
Beginner advice on how to use FTP or SSH? (django) | 9,698,149 | 0 | 0 | 676 | 0 | python,django,ftp,web-hosting | There are different tools for FTP and SSH file transfer. Which one is best for you depends on your environment (e.g. operating system) and your needs (do you want a graphical or command line interface?). But basically it's always a program you run on your machine that connects to a server to upload files. You don't do ... | 0 | 0 | 0 | 0 | 2012-03-14T05:13:00.000 | 3 | 0 | false | 9,696,294 | 0 | 0 | 1 | 1 | I'm in the midst of trying to get my first website up and running all of the sudden I get to the point where I need to get my file online and I have zero idea on how to do that. I thought it would be as easy as selecting your files and clicking upload but so far it has not been that easy. Currently I'm using djangoeuro... |
Avoid folders in Resources folder from being build or compile | 9,706,293 | 0 | 1 | 332 | 0 | python,build,titanium,titanium-mobile,appcelerator-mobile | Ajeet, I believe you can create a directory for android and iphone inside the resources folder that you can keep your platform-specific code/assets in. I think the compiler recognizes this. | 1 | 0 | 0 | 0 | 2012-03-14T11:00:00.000 | 1 | 0 | false | 9,700,623 | 0 | 0 | 1 | 1 | I am building a Titanium mobile project.
I have some folders with some .JS files in the Resources folder. The problem I ran into is that I need to exclude some of the folder while building for iphone but those folder are needed in my android build.
I looked into the python files in the SDK folder and found out that the... |
can i use plone workflow to manage autocad related drawings? | 9,704,631 | 4 | 1 | 150 | 0 | python,plone | You can change the workflow used for File objects, or indeed copy the File type in portal_types to a a new Drawing type and change the workflow for that new type if you want to treat them differently to standard files in your CMS. | 0 | 0 | 0 | 0 | 2012-03-14T11:21:00.000 | 1 | 0.664037 | false | 9,700,942 | 0 | 0 | 1 | 1 | How can I use Plone 4.1.4 to manage autocad drawings with different roles like architect, sr.architect, Project Manager, accounts manager(who manages the user accounts). I would first of all like to know whether Plone can be used to crease a workflow for uploaded autocad drawing files or for uploaded files as such? Dou... |
Django: Extracting a `Q` object from a `QuerySet` | 9,703,606 | 5 | 8 | 1,110 | 0 | python,django,django-orm,django-q | No, but you could create the Q object first, and use that; alternatively, create your query as a dict, and pass that to your filter method and the Q object. | 0 | 0 | 0 | 0 | 2012-03-14T14:06:00.000 | 3 | 1.2 | true | 9,703,511 | 0 | 0 | 1 | 1 | I have a Django QuerySet, and I want to get a Q object out of it. (i.e. that holds the exact same query as that queryset.)
Is that possible? And if so, how? |
Server side or Javascript calculations? | 9,705,930 | 2 | 4 | 1,820 | 0 | javascript,python,django,django-templates | This depends a lot on what you are trying to do. If the chart is dynamic and animated, doing it client side with js may be the only choice. It also depends on how much data you have. I would not recommend doing it in js if you have over 10mb of raw data. | 0 | 0 | 0 | 0 | 2012-03-14T16:21:00.000 | 3 | 0.132549 | false | 9,705,852 | 0 | 0 | 1 | 2 | In general is it better for performance to do lots of data calculations on the server side or on the javascript side?
I have a bunch of data that i'm displaying on a page - and I'm wondering if I should format/ parse/ make calculations on that data on the server side (in python) and return a template or if I should re... |
Server side or Javascript calculations? | 9,708,096 | 1 | 4 | 1,820 | 0 | javascript,python,django,django-templates | In addition to the facts stated by thedk, you should also keep in mind that calculations you do on client side are more likely to fail because the client may not fulfill certain preconditions. Think of disabled JavaScript or an unreliable internet connection. You generally have no control over your data as soon as it h... | 0 | 0 | 0 | 0 | 2012-03-14T16:21:00.000 | 3 | 0.066568 | false | 9,705,852 | 0 | 0 | 1 | 2 | In general is it better for performance to do lots of data calculations on the server side or on the javascript side?
I have a bunch of data that i'm displaying on a page - and I'm wondering if I should format/ parse/ make calculations on that data on the server side (in python) and return a template or if I should re... |
Do files with filesystem caching in Django delete after timeout? | 9,707,962 | 1 | 0 | 970 | 0 | python,django | The filesystem cache in Django works like any of the other caches, when the timeout value expires, the cache is "invalidated". In the case of files, that means it will be deleted/overwritten.
If you want long-term storage, you need to use a a long-term storage solution (Django's cache framework is specifically not a lo... | 0 | 0 | 0 | 1 | 2012-03-14T18:22:00.000 | 1 | 1.2 | true | 9,707,816 | 0 | 0 | 1 | 1 | I'm using Django to power a site where I pull in tweets from twitter timelines for use (for about 50 different people). I want to keep a large dictionary of all the tweets in a cache so I don't have to poll twitter every page-refresh. Right now I have it so when it retrieves tweets (30) from twitter, it saves it in the... |
Either json or Soap to exchange data in my project? | 9,716,132 | 5 | 1 | 181 | 0 | php,python,json,zend-framework,serialization | Use JSON for data serialization. It's clean, simple, compact, widely supported, and understands data types. Use SOAP only if you like pain. It is a bloated sack of cruft built upon another bloated sack of cruft. | 0 | 0 | 1 | 0 | 2012-03-15T06:21:00.000 | 3 | 1.2 | true | 9,714,877 | 0 | 0 | 1 | 3 | I am doing a car rental software, in which a front end back end are there, where the back end will do the accounting part. I have to send some data like customer name, amount, currency etc. to account engine to prepare the ledgers. I am confused whether to use json or soap for information exchange between front and bac... |
Either json or Soap to exchange data in my project? | 9,720,556 | 3 | 1 | 181 | 0 | php,python,json,zend-framework,serialization | Use JSON.
My argument is that JSON maps directly to and from native data types in common scripting languages.
If you use Python, then None <-> null, True <-> true, False <-> false, int/float <-> Number, str/unicode <-> String, list <-> Array and dict <-> Object. You feel right at home with JSON.
If you use PHP, there s... | 0 | 0 | 1 | 0 | 2012-03-15T06:21:00.000 | 3 | 0.197375 | false | 9,714,877 | 0 | 0 | 1 | 3 | I am doing a car rental software, in which a front end back end are there, where the back end will do the accounting part. I have to send some data like customer name, amount, currency etc. to account engine to prepare the ledgers. I am confused whether to use json or soap for information exchange between front and bac... |
Either json or Soap to exchange data in my project? | 9,720,841 | 0 | 1 | 181 | 0 | php,python,json,zend-framework,serialization | Depending on your needs, you could use both. For example, using XML bindings you get the (de)serialization of the data going across the wire for free. That is, if you're going to be POSTing lots of data to your web-service, and want to avoid calling the equivalent of "request.getParameter" for each parameter and buil... | 0 | 0 | 1 | 0 | 2012-03-15T06:21:00.000 | 3 | 0 | false | 9,714,877 | 0 | 0 | 1 | 3 | I am doing a car rental software, in which a front end back end are there, where the back end will do the accounting part. I have to send some data like customer name, amount, currency etc. to account engine to prepare the ledgers. I am confused whether to use json or soap for information exchange between front and bac... |
Large scale machine learning - Python or Java? | 9,722,329 | 11 | 34 | 12,549 | 0 | java,python,machine-learning,nltk,mahout | I think one big thing Java has going for it is Hadoop. If you really mean large scale, you'll want to be able to use something like that. Generally speaking Java has the performance advantage, and more libraries available. So: Java. | 0 | 0 | 0 | 0 | 2012-03-15T13:41:00.000 | 3 | 1 | false | 9,720,894 | 0 | 0 | 1 | 3 | I am currently embarking on a project that will involve crawling and processing huge amounts of data (hundreds of gigs), and also mining them for extracting structured data, named entity recognition, deduplication, classification etc.
I'm familiar with ML tools from both Java and the Python world: Lingpipe, Mahout, NL... |
Large scale machine learning - Python or Java? | 9,735,214 | 5 | 34 | 12,549 | 0 | java,python,machine-learning,nltk,mahout | If you are looking at NoSQL databases fit for ML task, then Neo4J is one of the more production ready (relatively) and capable of handling BigData, it is native to JAVA but comes along with a beautiful REST API out of the box and hence can be integrated with the platform of your choice. JAVA will give you an performanc... | 0 | 0 | 0 | 0 | 2012-03-15T13:41:00.000 | 3 | 0.321513 | false | 9,720,894 | 0 | 0 | 1 | 3 | I am currently embarking on a project that will involve crawling and processing huge amounts of data (hundreds of gigs), and also mining them for extracting structured data, named entity recognition, deduplication, classification etc.
I'm familiar with ML tools from both Java and the Python world: Lingpipe, Mahout, NL... |
Large scale machine learning - Python or Java? | 9,723,569 | 18 | 34 | 12,549 | 0 | java,python,machine-learning,nltk,mahout | As Apache is going strong producing excellent stuff like Lucene/Solr/Nutch for Search, Mahout for Big Data Machine Learning, Hadoop for Map Reduce, OpenNLP for NLP, lot of NoSQL stuff. The best part is the big "I" which stands for integration and these products can be integrated with each other well as of course in mos... | 0 | 0 | 0 | 0 | 2012-03-15T13:41:00.000 | 3 | 1.2 | true | 9,720,894 | 0 | 0 | 1 | 3 | I am currently embarking on a project that will involve crawling and processing huge amounts of data (hundreds of gigs), and also mining them for extracting structured data, named entity recognition, deduplication, classification etc.
I'm familiar with ML tools from both Java and the Python world: Lingpipe, Mahout, NL... |
Can you share an example of using class based view with MonthMixin? | 10,783,975 | 0 | 0 | 362 | 0 | python,django | Think of CBV, more specifically "Generic Class Based Views" as a large tree of Python classes. Starting with the simplest class. Each one subclasses and over rides methods from one another. For example, the ArchiveIndexView is typically the view you will sub-class for the index of your site. It adds an extra context va... | 0 | 0 | 0 | 0 | 2012-03-15T16:59:00.000 | 2 | 0 | false | 9,724,539 | 0 | 0 | 1 | 1 | I have a news on my site done with "James Bennett - Practical Django Projects, 2nd Edition (2009)". So I am using a date-based views, which will be deprecated in django-1.4. How can I just convert my views and urls to class-based views ? May be you have seen this, please just post a link, I can't find any working examp... |
bottle framework: getting requests and routing to work | 10,681,349 | 0 | 1 | 693 | 0 | python,bottle | I actually resolved the issue. The Bottle framework tutorial encourages first-time users to set up the server on a high port (to avoid conflict with apache, etc) for development. I was missing two parts of the process: 1. import the python script so that it can be called from the main bottle file 2. in the main bottle ... | 0 | 1 | 0 | 0 | 2012-03-15T20:25:00.000 | 1 | 1.2 | true | 9,727,608 | 0 | 0 | 1 | 1 | I have written a webapp using traditional cgi. I'm now trying to rewrite it with bottle
The page is simple...the user fills out a form, hits submit and the data object is sent to a python script that used to live in my cgi-bin
The python script generates an image, and prints the url for that image out to standard out
O... |
Binding a wx.html2.WebView.New Widget? | 9,742,560 | 0 | 2 | 419 | 0 | python,wxpython,wxwidgets | I don't think you are missing anything, this hasn't yet been implemented. Mouse and keyboard events are high on my todo list though, I will update this question when they have been added. | 1 | 0 | 0 | 0 | 2012-03-16T01:49:00.000 | 1 | 0 | false | 9,730,769 | 0 | 0 | 1 | 1 | I would like to bind the wx.html2.WebView.New widget with wx.EVT_LEFT_UP however it doesnt work (it doesnt get noticed, nothing happens).
Is there anything i am missing? |
Google App Engine library imports | 9,748,040 | 0 | 0 | 2,099 | 0 | python,google-app-engine,google-api,google-api-client,google-api-python-client | The packages needs to be locally available, where did you put the packages, in the Python folder or in your project folder? | 0 | 1 | 1 | 0 | 2012-03-17T04:30:00.000 | 2 | 0 | false | 9,747,258 | 0 | 0 | 1 | 1 | I've been experimenting with the Google App Engine, and I'm trying to import certain libraries in order to execute API commands. I've been having trouble importing, however. When I tried to execute "from apiclient.discovery import build", my website doesn't load anymore. When I test locally in IDLE, this command works... |
Download a URL only if it is a HTML Webpage | 9,750,658 | 2 | 0 | 103 | 0 | python,download,html-parsing,beautifulsoup,printing-web-page | Use http.client to send a HEAD request to the URL. This will return only the headers for the resource then you can look at the content-type header and see if it text/html. If it is then send a GET request to the URL to get the body. | 0 | 0 | 1 | 0 | 2012-03-17T13:50:00.000 | 1 | 1.2 | true | 9,750,481 | 0 | 0 | 1 | 1 | I want to write a python script which downloads the web-page only if the web-page contains HTML. I know that content-type in header will be used. Please suggest someway to do it as i am unable to get a way to get header before the file download. |
How to handle dynamic URLs while crawling online stores? | 9,753,135 | 0 | 0 | 205 | 0 | python,url,dynamic | If you parsing some product pages, usually these URLs have some kind of product id.
Find the pattern to extract product id from URLs, and use it to filter already visited URLs. | 0 | 0 | 1 | 0 | 2012-03-17T19:08:00.000 | 1 | 1.2 | true | 9,752,891 | 0 | 0 | 1 | 1 | I am crawling online stores for price comparison. Mot of the stores are using dynamic URLs heavily. This is causing my crawler to spend lot of time on every online stores. Even though most of them have only 5-6k unique products, they have unique URLs >= 300k. Any idea how to get around this.
Thanks in advance! |
change directory (python) doesnt work in localhost | 9,757,219 | 6 | 0 | 213 | 0 | python,google-app-engine,python-2.7 | AppEngine restricts you from doing things that don't make sense. Your AppEngine application can't go wandering all over the filesystem once it is running on Google's servers, and Google's servers certainly don't have a C: drive.
Whatever you are trying to accomplish by changing directories, it's something that you need... | 0 | 1 | 0 | 0 | 2012-03-18T09:15:00.000 | 1 | 1 | false | 9,757,203 | 0 | 0 | 1 | 1 | import os os.chdir("c:\Users")
works in the command prompt but not on localhost (google app engine.)
can anyone help. |
Include variables in template context on every page with Bottle.py | 26,185,476 | 0 | 7 | 1,518 | 0 | python,templates,flask,bottle | Note: this same solution can be used with the other template engines. The technique is exactly the same, but you use BaseTemplate (it works for all template classes) or the class for the engine you want to use. | 0 | 0 | 0 | 0 | 2012-03-18T15:33:00.000 | 3 | 0 | false | 9,759,558 | 0 | 0 | 1 | 1 | Is there a bottle.py equivalent of context processors that you get in Flask? |
How to use Coffeescript on Google App Engine | 9,764,949 | 2 | 2 | 1,031 | 0 | python,google-app-engine,coffeescript,go | Coffeescript compiles to Javascript, which can be run in a web browser. In that case, App Engine can serve up the resulting javascript.
I don't know of any way to compile coffeescript to python, java or go though, so you can't use it as a server side language. | 0 | 1 | 0 | 0 | 2012-03-19T04:03:00.000 | 2 | 1.2 | true | 9,764,895 | 0 | 0 | 1 | 1 | Does anyone know if it is possible to use Coffeescript on Google App Engine? If so how can this be done with the app engine Python or Go platforms? |
Insert static files literally into Jinja templates without parsing them | 9,767,951 | 6 | 19 | 18,579 | 0 | python,jinja2 | Try putting the syntax in the other files in {% raw %} {% endraw %}
You can use jQuery if you dont want to edit the external files:
Make a dive to contain the content <div id="contentoffile"></div>
and use jquery to load the file : $("#contentoffile").load("url to file") << the url can be relative | 0 | 0 | 0 | 0 | 2012-03-19T09:20:00.000 | 5 | 1 | false | 9,767,585 | 0 | 0 | 1 | 1 | I'm trying to insert file into a page using Jinja 2.6 using the include tag. This worked fine until I started using characters in the file that are reminiscent of the Jinja syntax, at which point it realized it couldn't parse them and bombed.
Short of going though the file and escaping all characters, what can I do to... |
openerp schedule server action | 10,222,065 | 0 | 4 | 1,470 | 0 | python,openerp | i dont know but i think you can also use the sheduled actions in administration->shedular->sheduled actions or else ir.cron is the best option for sheduling outgoing emails | 0 | 0 | 0 | 1 | 2012-03-17T17:03:00.000 | 3 | 0 | false | 9,771,171 | 0 | 0 | 1 | 3 | In OpenERP 6.0.1, I've created a server action to send a confirmation email after an invoice is confirmed, and linked it to appropriately to the invoice workflow. now normally when an invoice is confirmed, an email is automatically sent.
is there a way to set a date for when the email should be sent instead of being se... |
openerp schedule server action | 9,784,730 | 9 | 4 | 1,470 | 0 | python,openerp | There is a one object ir.cron which will run on specific time period. There you can specify the time when you want to sent the mail.
This object will call the function which you given in Method attribute. In this function you have to search for those invoices which are in created state. Then check the date when it cre... | 0 | 0 | 0 | 1 | 2012-03-17T17:03:00.000 | 3 | 1.2 | true | 9,771,171 | 0 | 0 | 1 | 3 | In OpenERP 6.0.1, I've created a server action to send a confirmation email after an invoice is confirmed, and linked it to appropriately to the invoice workflow. now normally when an invoice is confirmed, an email is automatically sent.
is there a way to set a date for when the email should be sent instead of being se... |
openerp schedule server action | 10,615,931 | 0 | 4 | 1,470 | 0 | python,openerp | With OpenERO 6.1 New Email Engine has Email Queue so what you just need to do it queue your Email on that email queue and we already have one Scheduled Action which processes this email queue at defined interval, so what you can do it you can change the trigger time of the same action. and you can see the email Engine... | 0 | 0 | 0 | 1 | 2012-03-17T17:03:00.000 | 3 | 0 | false | 9,771,171 | 0 | 0 | 1 | 3 | In OpenERP 6.0.1, I've created a server action to send a confirmation email after an invoice is confirmed, and linked it to appropriately to the invoice workflow. now normally when an invoice is confirmed, an email is automatically sent.
is there a way to set a date for when the email should be sent instead of being se... |
Practical server side includes with Python on Google App Engine | 9,782,676 | 0 | 0 | 1,024 | 0 | python,google-app-engine,server-side-includes,static-files | Or use a framework like django, which will help in inheritance of templates. | 0 | 1 | 0 | 0 | 2012-03-19T15:43:00.000 | 2 | 0 | false | 9,773,232 | 0 | 0 | 1 | 1 | Is there a decent way to "simulate" server side includes using Python on Google App Engine?
I would really like to split my static html files up into smaller pieces for two reasons:
They will be easier to manage from a development perspective
HTML that is redundant across multiple pages can be more easily re-used and ... |
Dynamic number of Steps using Django Wizard | 9,778,474 | 2 | 3 | 1,832 | 0 | python,django,wizard,django-formwizard | What do you want to do ?
If you want to create a wizard where step x is repeated n times then answer is yes, you can do that and it is not that hard.
You just need to create a wizard class factory that creates the class given specific parameters and you're done.
In case you mean, can I change the steps of a wizard on-t... | 0 | 0 | 0 | 0 | 2012-03-19T21:01:00.000 | 3 | 0.132549 | false | 9,777,879 | 0 | 0 | 1 | 1 | Is possible that the steps of the wizard are dynamic? For example, the second step occur repeatedly n times? |
How to detect parent class fields | 9,784,966 | 2 | 1 | 139 | 0 | python,django | First of all, avoid any design where you need to do this. Perhaps you should be getting separate parent objects?
However, you can do this by examining the ._meta.fields property of any django model instance. | 0 | 0 | 0 | 0 | 2012-03-20T10:02:00.000 | 2 | 0.197375 | false | 9,784,627 | 0 | 0 | 1 | 1 | I have a parent class and a child class which inherits parent. In a child class object, I need to differentiate between parent class fields and child class fields.
Is this information available? If so, where. Need solution in Python, specifically Django. |
django code which runs event independent | 9,787,902 | 0 | 0 | 91 | 0 | python,django,web-applications,backend | Write a management command and daemonize it with supervisord.
By the way, technically django itself is running continuously and not only when view is called.
What are you trying to acheive? | 0 | 0 | 0 | 0 | 2012-03-20T13:23:00.000 | 4 | 0 | false | 9,787,621 | 0 | 0 | 1 | 2 | I am creating a web application in django and I want to create a backend app which runs continuously instead of running only when the "view" is called. How do I do this ?
Any help would be appreciated.
Thank you. |
django code which runs event independent | 9,787,680 | 0 | 0 | 91 | 0 | python,django,web-applications,backend | Django is not especially for this; that said, you can use django's facilities, and just write a programme that executes continuously. | 0 | 0 | 0 | 0 | 2012-03-20T13:23:00.000 | 4 | 0 | false | 9,787,621 | 0 | 0 | 1 | 2 | I am creating a web application in django and I want to create a backend app which runs continuously instead of running only when the "view" is called. How do I do this ?
Any help would be appreciated.
Thank you. |
Google App Engine Development and Production Environment Setup | 9,793,302 | 0 | 1 | 398 | 0 | django,google-app-engine,github,development-environment,python-2.7 | I'm on a pretty similar setup, though I'm still runing on py2.5, django-nonrel.
1) I usually use 'git status' or 'git gui' to see if I forgot to check in files.
2) I personally don't check in my datastore. Are you familiar with .gitignore? It's a text file in which you list files for git to ignore when you run 'git s... | 0 | 1 | 0 | 0 | 2012-03-20T13:58:00.000 | 1 | 1.2 | true | 9,788,264 | 0 | 0 | 1 | 1 | Here is my current setup:
GitHub repository, a branch for dev.
myappdev.appspot.com (not real url)
myapp.appspot.com (not real url)
App written on GAE Python 2.7, using django-nonrel
Development is performed on a local dev server. When I'm ready to release to dev, I increment the version, commit, and run "manage.py u... |
Google AppEngine and Threaded Workers | 9,790,858 | 5 | 0 | 152 | 0 | python,multithreading,google-app-engine,queue | You can use "backends" or "task queues" to run processes in the background. Tasks have a 10-minute run time limit, and backends have no run time limit. There's also a cronjob mechanism which can trigger requests at regular intervals.
You can fetch the data from external servers with the "URLFetch" service. | 0 | 1 | 0 | 0 | 2012-03-20T14:21:00.000 | 2 | 0.462117 | false | 9,788,635 | 0 | 0 | 1 | 2 | I am currently trying to develop something using Google AppEngine, I am using Python as my runtime and require some advise on setting up the following.
I am running a webserver that provides JSON data to clients, The data comes from an external service in which I have to pull the data from.
What I need to be able to do... |
Google AppEngine and Threaded Workers | 9,809,659 | 1 | 0 | 152 | 0 | python,multithreading,google-app-engine,queue | Note that using memcache as the communication mechanism between front-end and back-end is unreliable -- the contents of memcache may be partially or fully erased at any time (and it does happen from time to time).
Also note that you can't query memcache of you don't know the exact keys ahead of time. It's probably bet... | 0 | 1 | 0 | 0 | 2012-03-20T14:21:00.000 | 2 | 0.099668 | false | 9,788,635 | 0 | 0 | 1 | 2 | I am currently trying to develop something using Google AppEngine, I am using Python as my runtime and require some advise on setting up the following.
I am running a webserver that provides JSON data to clients, The data comes from an external service in which I have to pull the data from.
What I need to be able to do... |
Django ajax error response best practice | 9,799,831 | 18 | 12 | 10,297 | 0 | jquery,python,ajax,django | If you return a response with a status code of 4xx or 5xx this is a an error and will trigger jQueries error handler. While it is certainly possible to simple return status 200 every time and use a "error" field in the JSON response (like suggested by dm03514) this is bad for two reasons:
It violates good HTTP practic... | 0 | 0 | 0 | 0 | 2012-03-21T01:02:00.000 | 5 | 1.2 | true | 9,797,253 | 0 | 0 | 1 | 1 | I'm using ajax to improve user experience in my Django project. My concern here is how to respond error to browser properly. As far as I know, I can either:
validate request data piece by piece and guard exception one by one. If something bad happens, raise Http404 or other exception to explicitly announce an error ha... |
Installing easy_install, NOT SO EASY | 19,903,084 | 0 | 1 | 4,633 | 0 | python,path,beautifulsoup,easy-install | I'd Try to download the source .py files, find the setup.py files and run in command line: <path_to_source_archive>\setup.py install
this usually works when easy_install stutters. | 0 | 0 | 0 | 0 | 2012-03-21T01:53:00.000 | 3 | 0 | false | 9,797,613 | 0 | 0 | 1 | 1 | I am trying to install easy_install in order to use BeautifulSoup... However I have no clue what my PATH directory is... when I run easy_install BeautifulSoup.. I get
error: Not a recognized archive type: C:\docume~1\tom\locals~1\temp\weasy_install-w6haxs\BeautifulSoup-3.2.1.tar.gz
I am guessing this has someth... |
Unit-testing client-server interaction in Twisted | 9,799,162 | 0 | 3 | 963 | 0 | python,unit-testing,twisted | I don't know much about Twisted or how you set up your system under test, but could you start two servers on a single thread? One of them would be the one you are testing and another would be just a dummy that can accept any request. In addition to that, the dummy would store info that it has received the call. After i... | 0 | 0 | 1 | 0 | 2012-03-21T05:07:00.000 | 2 | 0 | false | 9,798,910 | 0 | 0 | 1 | 1 | In my latest Python project, utilizing Twisted, I've tried to be good at using the unittest module. At a high level, I'm building two RESTful APIs designed specifically to talk to each other. For most requests, I can just use DummyRequest and test the rendered values against an expected constant and that's been working... |
Sending image to server: http POST vs custom tcp protocol | 9,805,325 | 0 | 0 | 739 | 0 | python,sockets,wsgi | In my opinion HTTP is an ideal protocol for sending files or large data, and its very common use, easy to suit any situation. If you use a self-created protocol, you may find it hard to transform when you get other client needs, like a web API.
Maybe the discussions about HTTP's lack of instantaneity and agility make y... | 0 | 0 | 1 | 0 | 2012-03-21T12:32:00.000 | 2 | 0 | false | 9,804,674 | 0 | 0 | 1 | 1 | I am working out how to build a python app to do image processing. A client (not a web browser) sends an image and some text data to the server and the server's response is based on the received image.
One method is to use a web server + WSGI module and have clients make a HTTP POST request (using multipart/form-data).... |
Untangle Django (How should I start going at a lot of legacy code of several years with django that started in 0.97) | 9,808,401 | 0 | 0 | 166 | 0 | python,django | This is probably a place where lots and lots of tests will help you. It's not my project, but here's what I'd probably do:
Start a completely new project in Django 1.4
Write front-end tests for the current application
Write a script to migrate the database from 0.93 to 1.4 (it sounds like you have lots of special case... | 0 | 0 | 0 | 0 | 2012-03-21T15:39:00.000 | 2 | 0 | false | 9,807,920 | 0 | 0 | 1 | 1 | So herein lies my question.
Django project that was originally developed several years ago when django was still 0.97 version. The code was continuously built on to the point where I think band aids upon bandaids on top of bandaids is not going to cut it.
How can I start with untangling this django project?
Currently... |
GAE wait response from other source | 9,808,831 | 1 | 0 | 68 | 0 | android,python,http,google-app-engine | You don't seem to have understood how web applications work. They don't wait for signals - or, rather, that's all they do. Every page served by a Web service is in response to a signal, ie a request. Your web service just needs to respond to normal requests in the normal way. | 0 | 1 | 0 | 0 | 2012-03-21T15:56:00.000 | 1 | 0.197375 | false | 9,808,250 | 0 | 0 | 1 | 1 | I don't know how to present the title more clearly.
I want build a site on Google app engine (GAE), and one app on android.
The site on GAE should wait the signal which is from the app on android and handle the signal to do something.
I don't know how to search the "keyword" on Google of waiting signal on GAE, or wha... |
using celery with pyramid and mod_wsgi | 9,813,506 | 1 | 0 | 530 | 0 | python,celery,pyramid,celeryd | There are technically ways you could use Apache/mod_wsgi to manage a process distinct from that handling web requests, but the pain point is that Celery will want to fork off further worker processes. Forking further processes from a process managed by Apache can cause problems at times and so is not recommended.
You a... | 0 | 0 | 0 | 1 | 2012-03-21T16:17:00.000 | 1 | 1.2 | true | 9,808,628 | 0 | 0 | 1 | 1 | I've been able to deploy a test application by using pyramid with pserve and running pceleryd (I just send an email without blocking while it is sent).
But there's one point that I don't understand: I want to run my application with mod_wsgi, and I don't understand if I can can do it without having to run pceleryd from... |
Reverse Engineer a program working as a webservice, the future? | 9,811,793 | 0 | 1 | 276 | 0 | python,web-services,open-source,reverse | Yes,
All they could do is treat your web service as a black box, query the WSDL for all the parameters it accepts and the data that it returns.
They could then submit different variables and see what different results are. The "code" could not be seen or stolen (with proper security) but the inputs and outputs coul... | 0 | 0 | 0 | 1 | 2012-03-21T19:38:00.000 | 3 | 0 | false | 9,811,655 | 0 | 0 | 1 | 3 | First I want to clearify that I mean by reverse engineering something like "decompiling" and getting back the original source code or something similiar.
Yesterday I read a question about someone who wanted to protect his python code from "getting stolen" in other words: he didn't like that someone can read his python ... |
Reverse Engineer a program working as a webservice, the future? | 9,812,028 | 1 | 1 | 276 | 0 | python,web-services,open-source,reverse | Wow, this is awesome! I've never thought it this way, but you could create a program that crawls an api, and returns as an output a django/tastypie software that mimics everything the api does.
By calling the service, and reading what it says, you can parse it, and begin to see the relationships between objects inside ... | 0 | 0 | 0 | 1 | 2012-03-21T19:38:00.000 | 3 | 1.2 | true | 9,811,655 | 0 | 0 | 1 | 3 | First I want to clearify that I mean by reverse engineering something like "decompiling" and getting back the original source code or something similiar.
Yesterday I read a question about someone who wanted to protect his python code from "getting stolen" in other words: he didn't like that someone can read his python ... |
Reverse Engineer a program working as a webservice, the future? | 9,812,274 | 0 | 1 | 276 | 0 | python,web-services,open-source,reverse | It depends on what you mean by reverse engineering: by repeatedly sending input and analyzing the output the behaviour of your code can still be seen. I wouldn't have your code but I can still see what the system does. This means I could build a similar system that does the same thing, given the same input.
It would be... | 0 | 0 | 0 | 1 | 2012-03-21T19:38:00.000 | 3 | 0 | false | 9,811,655 | 0 | 0 | 1 | 3 | First I want to clearify that I mean by reverse engineering something like "decompiling" and getting back the original source code or something similiar.
Yesterday I read a question about someone who wanted to protect his python code from "getting stolen" in other words: he didn't like that someone can read his python ... |
Model to create threaded comments on Google Appengine with Python | 9,819,945 | 0 | 1 | 380 | 0 | python,google-app-engine | It depends on how nested threads you expect to get and if you want to optimize reading or writing. If we guess that the threads normally are quite shallow and that you want to optimize reading all subcomments on all levels of a comment, I think you should store each comment in a separate entry and then put a reference ... | 0 | 1 | 0 | 0 | 2012-03-22T09:15:00.000 | 2 | 0 | false | 9,819,260 | 0 | 0 | 1 | 1 | I am trying to write a comments model which can be threaded (no limits to the number of child threads). How do I do this in Appengine? and what is the fastest way to read all comments?
I am trying to do this in a scalable way so that app engine's new pricing does not kill my startup :) |
maintain cookie for browser even when user session is expired in django | 9,821,596 | 1 | 0 | 535 | 0 | python,django,cookies | setcookie("user", $username, time()+604800); /* Expires in a week */
"604800" represents the time the coockie will "live"
for example
One Minute: 60
Ten Minutes: 600
Half-an-Hour: 1800
One Hour: 3600
One Day: 86400
One Week: 604800
Two Weeks: 1209600
One Month (30 days): 2592000
One Year (365 days): 31536000 | 0 | 0 | 0 | 0 | 2012-03-22T11:37:00.000 | 2 | 0.099668 | false | 9,821,512 | 0 | 0 | 1 | 1 | I have a requirement where I want to set a cookie in the browser. This cookie is not 100% related to the user session, am trying to capture the desktop preferred setting.
I want to store this setting into a cookie that will not expire when the user logs out. Am using django in my implementation,
Please advise if ther... |
Multiple Python projects organization for deployment and/or distribution | 9,826,658 | 1 | 0 | 180 | 0 | python,django,deployment,distutils,project-organization | There's different philosophies on how apps should be packaged, but most Python developers adhere to a very minimalistic approach. In other words, you package up the smallest units of logic you can.
So, your goal here shouldn't be to cram everything together, but to package each discrete application separately. By appli... | 0 | 0 | 0 | 1 | 2012-03-22T16:16:00.000 | 1 | 1.2 | true | 9,826,322 | 0 | 0 | 1 | 1 | We have multiple Python projects that have dependencies on each other. Hierarchically, these are organized like this:
P1
P2
...
Pn
Each of these is an PyDev project within Eclipse and they co-exist just fine within that environment. We are in the process of structuring out build process to enable us to deploy these a... |
Django ModelChoiceField - use something other than id? | 9,827,518 | 1 | 12 | 5,882 | 0 | python,django,validation,django-forms,django-validation | ModelChoiceFields are meant to be used to select between a choice of existing model instances. This is almost always best represented by some form of Select field.
That said do you really have a FK from address to postal_code as you're implying. What are you storing on a PostalCode table to justify the extra table ... | 0 | 0 | 0 | 0 | 2012-03-22T17:06:00.000 | 3 | 0.066568 | false | 9,827,057 | 0 | 0 | 1 | 1 | Say I have an address table and it has a postal_code field -- ModelChoiceField does not allow me to use something other than PKs to validate existence correct? What would be the way to go? Normal input and use clean_*()? |
Given Products, each with multiple Versions, what is the preferred/best way to support custom attributes at the Product/Version level in my Django app | 10,146,928 | 0 | 0 | 68 | 0 | python,django | Decide to go with sub-classes with each Product as each has a limited set of specific attributes that won't change much or at all over time. Thanks for all the great feedback. Learned a lot :-) | 0 | 0 | 0 | 0 | 2012-03-23T12:49:00.000 | 4 | 1.2 | true | 9,839,515 | 0 | 0 | 1 | 1 | I'm building my first Django app to manage multiple SaaS products.
This entails storing custom attributes for each Version of each Product.
For example, a new version of a Product is released that includes new configuration options that the earlier versions of the Product do not support.
I need to be able to keep tr... |
How to implement normal site registration/login together with social authentication(mainly facebook) in Django? | 11,165,359 | 2 | 2 | 1,363 | 0 | python,django,authentication | Integrating separate packages can be a real pain. If you use django-allauth this work has already been done for you.... | 0 | 0 | 0 | 0 | 2012-03-25T09:14:00.000 | 3 | 0.132549 | false | 9,859,046 | 0 | 0 | 1 | 1 | I'm a newbie in Django and I'm trying to port my vanilla php application to Python/Django. In my project, I want to let users authenticate using regular registration/login form or through social authentications like facebook, google and twitter.
I searched on google and stackoverflow for similar questions and came to k... |
Hybrid Web/Desktop app - Ruby on Rails or Django on Python? | 9,863,652 | 2 | 0 | 736 | 0 | python,ruby-on-rails,ruby,django,linux | I would do neither. Use an event subsystem such as Twisted, glib, Qt, etc. and have it act as both a GUI mainloop and a web server. | 0 | 0 | 0 | 0 | 2012-03-25T20:08:00.000 | 1 | 1.2 | true | 9,863,578 | 0 | 0 | 1 | 1 | I am going to write a hybrid Web/Desktop app.
The main purpose of the app is to be something like a daemon, running on a Linux machine. But it should also provide a rich interface via web for doing configuration, reporting and management.
I have two things in mind for doing this:
Ruby on Rails
Django with Python
... |
Extract company contact details from google | 9,866,851 | 4 | 0 | 1,967 | 0 | python,ruby,regex,email | I would look to a more non-technical solution. You could split out the 3500 names and post them to Amazon Mechanical Turk as a HIT, paying 1 cent for each. Then instead writing code to scrape Google, you write code to create the hits and let real people do the "scraping" of the company websites.
Don't know if that will... | 0 | 0 | 0 | 1 | 2012-03-26T03:02:00.000 | 2 | 0.379949 | false | 9,866,104 | 0 | 0 | 1 | 1 | My boss has given me a list of around 3500 companies and wants the generic contact email for each of them by tomorrow. I know this sounds retarded, and it is, but our client is demanding it. The approach I'd like to take is this:
Carry out a google search for company name
Identify company website and redirect to it
St... |
Variable value display without page reload | 12,723,197 | 0 | 0 | 98 | 0 | python,ajax,pyramid | I use long polling now and it seems like the best thing to use for me | 0 | 0 | 0 | 0 | 2012-03-26T11:16:00.000 | 2 | 1.2 | true | 9,871,108 | 0 | 0 | 1 | 1 | I am trying to write a simple website. Here is the requirement.
The site needs to be made with Pyramid web framework
There needs to be a thread that contains 3 variables and the values of the variables will keep on changing.
The site needs to pick these values up and display them without reloading the page.
I know... |
how to show an object's type in google app engine | 9,885,834 | 1 | 0 | 89 | 0 | python,google-app-engine,types | When browser renders html it thinks that <type 'str'> is a (unknown) tag, so it renders it as <type 'str'></type>, hence it becomes part of your page markup... You can see this with Firebug or any similar tool. | 0 | 1 | 0 | 0 | 2012-03-26T12:22:00.000 | 1 | 1.2 | true | 9,872,029 | 0 | 0 | 1 | 1 | For debug use I want to show the type of a variable in Google App Engine.
In traditional environment, I will use "print type( x )" to do it. But in GAE I just don't know why I can't use self.response.out.write( str( type( x ) ) ) to echo it in the browser. I got confused because I did transform the <type 'type'> to <... |
How to send emails from django App in Google App Engine | 9,875,058 | 2 | 3 | 1,520 | 0 | python,django,google-app-engine | Google only allows you to send emails from a domain name that they control in the google app engine. So you will either have to send it from the test domain they give you, a gmail account, or you need to use their name servers for your domain name. | 0 | 1 | 0 | 0 | 2012-03-26T15:26:00.000 | 4 | 0.099668 | false | 9,874,959 | 0 | 0 | 1 | 1 | I have created one Django Application,also hosted it on the google app engine. I can send emails from django application, but after hosting it to app engine I cant do that.I really stuck with this problem, so please tell me if there is any solution for using django email functions in Google app engine.
I have tried ... |
SL4A Android x86 installation | 9,892,477 | 3 | 0 | 1,441 | 0 | android,python,sl4a | Try the official Android emulator. If the APKs include native libraries, chances are those are compiled for ARM only. Google's emulator emulates the ARM instruction set.
To make sure, rename the APK to ZIP and look inside. The structure of the lib folder, if any, will give you an idea. | 1 | 0 | 0 | 0 | 2012-03-27T15:12:00.000 | 3 | 0.197375 | false | 9,892,351 | 0 | 0 | 1 | 1 | I am currently developing a Android Application. I couldn't install the Android Python APKs like the sl4a.apk and the PythonInterpreter.apk on my Android x86 emulator. I read that it is possible to recompile the APKs with NDK but I have not found a closer decription, yet. Has anybody experience with this and could prov... |
cloud scripting through browser and evaluate python on server | 9,899,346 | 1 | 0 | 92 | 0 | python,python-3.x,cloud | I haven't tried myself. You may want to check out ipython notebook. | 0 | 0 | 1 | 0 | 2012-03-27T23:32:00.000 | 3 | 0.066568 | false | 9,899,180 | 1 | 0 | 1 | 1 | Is there any way in a browser, to type python code into an input field, it will then be sent to a local server and executed and the result pushed back to the browser.
Basically a browser hosted python notebook, where the code gets evaluated on a different machine.
Is there any python package to do this.
something like... |
Loggly performance | 12,219,717 | 1 | 1 | 398 | 0 | python,logging | Just for future reference for people... I tried loggly out and was generally very pleased with them. While I never did any formal benchmarking tests (with our without them). Any performance issues were not noticeable to me. | 0 | 0 | 0 | 0 | 2012-03-28T19:13:00.000 | 1 | 1.2 | true | 9,914,165 | 0 | 0 | 1 | 1 | I'm getting ready to deploy an app to Heroku and I'm considering adding Loggly as a plugin. I love the idea of being able to aggregate and search my logs more easily, but I'm a bit concerned about what kind of performance hit I might take because of it. Any experiences (good or bad) out there with Loggly?
Just as a n... |
Questions about django thread safety | 9,916,735 | 1 | 1 | 194 | 0 | python,django,multithreading,mod-wsgi | You shouldn't be worrying about this kind of stuff.
These slots are stored in a database right? The database should handle all the locking mechanisms for you, just make sure you run everything under a transaction and you will be fine. | 0 | 0 | 0 | 0 | 2012-03-28T22:28:00.000 | 2 | 0.099668 | false | 9,916,571 | 0 | 0 | 1 | 1 | I have a django app which is used for managing registrations to a survey.
There are fixed number of slots and I want to "reserve" slots for users when they sign up.
In one of my views, I get the next available slot and reserve it (or redirect the user if there are no slots available.)
I want to protect against the cas... |
Django - Choices vs Models (FKs) | 9,917,983 | 4 | 2 | 742 | 0 | python,database,django,django-models | models enforces constraint via the database. choices enforces constraint via the code. Which you choose depends on who you want to select the choices. | 0 | 0 | 0 | 0 | 2012-03-29T01:25:00.000 | 2 | 0.379949 | false | 9,917,971 | 0 | 0 | 1 | 2 | Lets say I'd like to give an user options to pick from and ensure that the submitted values are available options.
I've been reading the documentation and it seems to me that: if your values won't change then use choices -- if your data is dynamic then use models.
I'm a bit unsure though, shouldn't models be chosen ove... |
Django - Choices vs Models (FKs) | 9,920,914 | 7 | 2 | 742 | 0 | python,database,django,django-models | Use models when you definitely need one of these:
ability easily edit (add, delete) choice with no need to reload the code;
ability to store additional info for any choice;
easy many-to-many relation (and filtering by it)
ability to work with dynamic subset of choices in different cases.
Use choices otherwise. | 0 | 0 | 0 | 0 | 2012-03-29T01:25:00.000 | 2 | 1 | false | 9,917,971 | 0 | 0 | 1 | 2 | Lets say I'd like to give an user options to pick from and ensure that the submitted values are available options.
I've been reading the documentation and it seems to me that: if your values won't change then use choices -- if your data is dynamic then use models.
I'm a bit unsure though, shouldn't models be chosen ove... |
Does the App Engine Conversion API for HTML to PDF support canvas or SVG? | 11,282,356 | 0 | 1 | 254 | 0 | python,google-app-engine,file-conversion | You could export the canvas to an image (toDataURL) after the user creates or modifies the chart, and swap the two when calling the Conversion API. | 0 | 0 | 0 | 0 | 2012-03-29T04:00:00.000 | 1 | 0 | false | 9,918,903 | 0 | 0 | 1 | 1 | I am trying to figure out the best way of allowing my users to create a family tree chart, view it on screen and then to be able to create a PDF of it.
I am considering using ReportLab for the PDF generation, however then I have to have separate display and PDF code.
So I was wondering if the Conversion API would be ab... |
How can I check a duplicate file or image being uploaded into a Plone site | 9,922,771 | 2 | 2 | 176 | 0 | python,plone | You can store hash ( eg md5 ) of your image content into a database, at upload time.
When a new image is uploaded, you just have to match the current image's hash against those present in the database.
The hash will be collision free mostly, however to be more sure, you can also store other attributes like filesize, im... | 0 | 0 | 0 | 0 | 2012-03-29T09:35:00.000 | 1 | 0.379949 | false | 9,922,710 | 0 | 0 | 1 | 1 | How can I check a duplicate file or image being uploaded into a Plone site. I am using Plone 4.1? Is there some feature or configuration changes that need to be done to achieve the same.I want this feature to check the entire site before uploading any file /image into the site. I am working on Linux OS. I am using the... |
How to create SaaS application with Python and Django | 9,925,190 | 9 | 31 | 23,996 | 0 | python,django,saas | A very basic, elementary example of how you would go about it.
Suppose you have a simple app designed to solve a particular business case. For example, you created an app to handle room reservations at your office.
To "convert" this app into a service you have to configure it such that most of the user-specific parts o... | 0 | 0 | 0 | 0 | 2012-03-29T11:09:00.000 | 4 | 1 | false | 9,924,169 | 0 | 0 | 1 | 2 | Can you advice me with some articles/applications that allows you create SaaS(Software as a Service) application with Python and Django.
For the moment the general topics I do not understand are:
Do you have one working application for all clients or one app per client
How do you manage database access, permissions or... |
How to create SaaS application with Python and Django | 9,924,280 | 8 | 31 | 23,996 | 0 | python,django,saas | Software as a Service is just a marketing word, it's technically no different from a server that is accessible over the internet. So question 3 makes no sense. That leaves us with question 1 and 2:
What do you mean with 'app' in this context? Your web application (built with Python and Django) can have multiple Django... | 0 | 0 | 0 | 0 | 2012-03-29T11:09:00.000 | 4 | 1 | false | 9,924,169 | 0 | 0 | 1 | 2 | Can you advice me with some articles/applications that allows you create SaaS(Software as a Service) application with Python and Django.
For the moment the general topics I do not understand are:
Do you have one working application for all clients or one app per client
How do you manage database access, permissions or... |
How can I protect my AWS access id and secret key in my python application | 9,928,772 | 0 | 11 | 6,307 | 0 | python,amazon-web-services | Don't put it in applications you plan to distribute. It'll be visible and they can launch instances that are directly billable to you or worst..they can take down instances if you use it in production.
I would look at your programs design and seriously question why I need to include that information in the app. If yo... | 0 | 0 | 1 | 0 | 2012-03-29T13:54:00.000 | 4 | 0 | false | 9,926,825 | 0 | 0 | 1 | 1 | I'm making an application in Python and using Amazon Web Services in some modules.
I'm now hard coding my AWS access id and secret key in *.py file. Or might move them out to an configuration file in future.
But there's a problem, how can I protect AWS information form other people? As I know python is a language that ... |
How to store all user activites in a website..? | 9,942,327 | 0 | 0 | 2,693 | 1 | java,python,django,postgresql,user-activity | In your log table you can have various columns, including:
user_id (the user that did the action)
activity_type (the type of activity, such as view or commented_on)
object_id (the actual object that it concerns, such as the Article or Media)
object_type (the type of object; this can be used later, in combination with ... | 0 | 0 | 0 | 0 | 2012-03-30T11:39:00.000 | 5 | 0 | false | 9,942,206 | 0 | 0 | 1 | 2 | I have a web application build in Django + Python that interact with web services (written in JAVA).
Now all the database management part is done by web-services i.e. all CRUD operations to actual database is done by web-services.
Now i have to track all User Activities done on my website in some log table.
Like If Us... |
How to store all user activites in a website..? | 9,942,819 | 1 | 0 | 2,693 | 1 | java,python,django,postgresql,user-activity | So, you have UI <-> Web Services <-> DB
Since the web services talk to the DB, and the web services contain the business logic (i.e. I guess you validate stuff there, create your queries and execute them), then the best place to 'log' activities is in the services themselves.
IMO, logging PostgreSQL transactions is a d... | 0 | 0 | 0 | 0 | 2012-03-30T11:39:00.000 | 5 | 1.2 | true | 9,942,206 | 0 | 0 | 1 | 2 | I have a web application build in Django + Python that interact with web services (written in JAVA).
Now all the database management part is done by web-services i.e. all CRUD operations to actual database is done by web-services.
Now i have to track all User Activities done on my website in some log table.
Like If Us... |
Can web automation be done in Python? | 9,945,337 | 1 | 4 | 10,966 | 0 | python,automation,notifications | If I understand well, the idea of your program is to do an automated browsing session.
So yes, it's possible. It's not important in what the website is programmed (cgi, php etc). All you need is to send data through post/get (like a real browser) and process the return (regexp and so on).
Good luck | 0 | 0 | 1 | 1 | 2012-03-30T14:45:00.000 | 7 | 0.028564 | false | 9,945,206 | 0 | 0 | 1 | 2 | I am a newborn programmer still programming from the book on my Alt+Tab. One of the first programs I want to create is to help my mom in her work. I need to know if I can use Python to create it.
It needs to:
Go on-line and log-in with account / pass.
Do a search with specific criteria (use the site's search engine)
V... |
Can web automation be done in Python? | 9,945,530 | 1 | 4 | 10,966 | 0 | python,automation,notifications | I would point out that depending upon what site you are on, there may be a more efficient way (perhaps an exposed web service) than scraping data from the page and working with mechanize/selenium to do what you want. If you are on the web, browser driver tools are the hammers, and they will get the screws in the wood,... | 0 | 0 | 1 | 1 | 2012-03-30T14:45:00.000 | 7 | 0.028564 | false | 9,945,206 | 0 | 0 | 1 | 2 | I am a newborn programmer still programming from the book on my Alt+Tab. One of the first programs I want to create is to help my mom in her work. I need to know if I can use Python to create it.
It needs to:
Go on-line and log-in with account / pass.
Do a search with specific criteria (use the site's search engine)
V... |
Python frameworks: Website/CMS vs application? | 9,947,834 | 1 | 1 | 443 | 0 | python,django,web-applications,frameworks,pyramid | I believe that at this point you might want to think more about the overall architecture of your application rather than frameworks. For Example
Single Tier - Just a simple webapp, using simple file or object storage
Two Tier - Webapp + Relational Database. The webapp contains the presentation logic + business logic u... | 0 | 0 | 0 | 0 | 2012-03-30T17:28:00.000 | 2 | 0.099668 | false | 9,947,703 | 0 | 0 | 1 | 2 | I'm slightly confused on what is meant by a "web application". I.e. Django positions itself as "a web framework" for the development of "web apps", quite similar to the description of Pyramid. What I'm looking for is a framework for an application that has a browser interface but is very database driven. In short: It'... |
Python frameworks: Website/CMS vs application? | 9,947,817 | 3 | 1 | 443 | 0 | python,django,web-applications,frameworks,pyramid | I don't know Pyramid at the time of writing so I'll answer the Django part, though I can imagine the answer to apply to Pyramid as well as the distinction between websites and web application is quite vague.
Django is suitable for both websites and web applications: you can create an informative website for your local ... | 0 | 0 | 0 | 0 | 2012-03-30T17:28:00.000 | 2 | 1.2 | true | 9,947,703 | 0 | 0 | 1 | 2 | I'm slightly confused on what is meant by a "web application". I.e. Django positions itself as "a web framework" for the development of "web apps", quite similar to the description of Pyramid. What I'm looking for is a framework for an application that has a browser interface but is very database driven. In short: It'... |
Posting data to another Site with Django | 9,951,986 | 2 | 1 | 471 | 0 | python,django,post | urllib2 is the appropriate way to post data if you're looking for python standard library. Django doesn't provide a specific method to do this (as well as it shouldn't). Django goes out of it's way to not simply reinvent tools that already exist in the the standard library (except email...), so you should never reall... | 0 | 0 | 1 | 0 | 2012-03-30T22:35:00.000 | 1 | 1.2 | true | 9,951,216 | 0 | 0 | 1 | 1 | I would appreciate some help here.
Google checkout has many ways to send it checkout data. I am using the XML server-to-server.
I have everything ready and now I want to throw some xml at google. I have been doing some reading and I know of a couple of ways to do this, one with urllib, another with pyCurl, but I am usi... |
How do I generate code under Eclipse+PyDev? | 9,998,578 | 1 | 0 | 339 | 0 | eclipse,python-3.x,pydev,generated-code | It should be possible to do what you want using an external builder inside Eclipse...
Right click project > properties > builders > new > program, then configure the program as python having as a parameter the module to run and receiving as arguments also the ${build_files} variable (if it's a python script, you have ... | 0 | 1 | 0 | 1 | 2012-03-31T01:49:00.000 | 2 | 1.2 | true | 9,952,327 | 0 | 0 | 1 | 1 | I'm developing a system, and I have build a code generator that emits a bunch of classes based on a configuration file.
I would like to configure PyDev to invoke the generator for me whenever the configuration file (or the generator source) changes. I know that this is possible "in theory" because e.g., the ANTLR plug... |
How to simulate Google login using gaeunit | 9,953,084 | 0 | 0 | 401 | 0 | python,google-app-engine,google-apps,google-signin,gaeunit | Two situations:
Local Dev server: login is mocked via a simple web form. You can do a http POST to log in.
Production server: login goes through the Google auth infrastructure. No way to mock this. To make this work you'd need to code around it. | 0 | 1 | 0 | 1 | 2012-03-31T03:50:00.000 | 2 | 0 | false | 9,952,873 | 0 | 0 | 1 | 1 | I am currently using gaeunit to perform automated test on my google app engine application. I am wondering whether it's possible to simulate the user login action using his/her google account using gaeunit?
Thank you very much. |
How do I use web2py on Heroku? | 14,190,998 | 1 | 4 | 1,549 | 0 | python,heroku,web2py | It may be a problem with the DB setup. By default web2py only supports sqlite or Google App Engine (GAE). It's probably trying to initialize sqlite databases on Heroku's read-only filesystem.
Either disable the DB code temporarily to see if this is indeed the case, or configure a connection to a supported database (MyS... | 0 | 0 | 0 | 0 | 2012-03-31T09:33:00.000 | 3 | 0.066568 | false | 9,954,745 | 0 | 0 | 1 | 1 | I'm having a lot of trouble with getting web2py to work on Heroku. I can't even get a basic app to work. Whenever I go to my herokuapp page, it says
Application Error
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your... |
Django, exclude a context processor in a view | 9,960,664 | 2 | 0 | 2,637 | 0 | python,django,django-views | You could subclass RequestContext in django.template.context and redefine its __init__ method. You can then use this modified RequestContext in those particular views. The __init__ of RequestContext currently looks like this:
def __init__(self, request, dict=None, processors=None, current_app=None, use_l10n=None):
... | 0 | 0 | 0 | 0 | 2012-03-31T23:12:00.000 | 4 | 0.099668 | false | 9,960,524 | 0 | 0 | 1 | 1 | I have a website with a menu. To generate the menu, I need some queries in the database. So I created a context processor to do it in all my views.
Some of the views I have are actually forms. I get them using ajax and display them with jquery ui dialog, when my users click on some buttons.
I can't remove all context p... |
Building a tree in a web app using Python | 9,965,972 | 1 | 0 | 1,635 | 0 | python,treeview,web | This isn't really a python or django issue: presentation on the web is done using (X)HTML, other types of XML (such as SVG), and javascript to automate the client side.
Go ahead and use django for your project, but understand that to do this, you will need to also get the hang of (at least) a javascript library for thi... | 0 | 0 | 0 | 0 | 2012-04-01T14:18:00.000 | 2 | 1.2 | true | 9,965,062 | 0 | 0 | 1 | 2 | I'm new to Python and web development (although I have development experience with Client/Server apps .. a little rusty), and I need to build a Python web application that populates an interactive tree from a database (for my PG degree).
I've tried PyQT4 which contains a QTreeView/QTreeWidget but couldn't run this form... |
Building a tree in a web app using Python | 9,965,636 | 0 | 0 | 1,635 | 0 | python,treeview,web | google django treeview for a few implementations. Alternativly use JavaScript. Django and Javascript play nicely and there are loads of JavaScript Treeview implementations. | 0 | 0 | 0 | 0 | 2012-04-01T14:18:00.000 | 2 | 0 | false | 9,965,062 | 0 | 0 | 1 | 2 | I'm new to Python and web development (although I have development experience with Client/Server apps .. a little rusty), and I need to build a Python web application that populates an interactive tree from a database (for my PG degree).
I've tried PyQT4 which contains a QTreeView/QTreeWidget but couldn't run this form... |
Convert video(any type) to audio -mp3 format- using python | 9,968,088 | 4 | 3 | 3,509 | 0 | python,google-app-engine,video,mp3 | You don't want todo this in Python, video convert requires working native modules which the App Engine doesn't support.
You can try to work 3rd party web service that do the convert for you, or send the convert task to an external server. | 0 | 0 | 0 | 0 | 2012-04-01T20:29:00.000 | 3 | 1.2 | true | 9,968,040 | 0 | 0 | 1 | 2 | I'm working on a project, using Python running on Google App Engine. The project must allow users to upload video file then convert these files into mp3 audio file. Is there a way to convert this video to mp3/wav audio?
Could anyone offer a solution to this? Thanks in advance. |
Convert video(any type) to audio -mp3 format- using python | 9,968,089 | 2 | 3 | 3,509 | 0 | python,google-app-engine,video,mp3 | You're going to have trouble doing this on GAE, as libraries with native components aren't necessarily available there; it may well not be possible at all.
If targeting a more typical Python app server environment, rather than GAE, I would do this using the GStreamer Python bindings; GStreamer lets you set up a media p... | 0 | 0 | 0 | 0 | 2012-04-01T20:29:00.000 | 3 | 0.132549 | false | 9,968,040 | 0 | 0 | 1 | 2 | I'm working on a project, using Python running on Google App Engine. The project must allow users to upload video file then convert these files into mp3 audio file. Is there a way to convert this video to mp3/wav audio?
Could anyone offer a solution to this? Thanks in advance. |
mod_wsgi showing old code | 9,971,145 | 0 | 1 | 559 | 0 | python,django,apache2,mod-wsgi | Delete any .pyc files from your code base directory, and restart the server. | 0 | 0 | 0 | 0 | 2012-04-02T03:35:00.000 | 4 | 0 | false | 9,970,598 | 0 | 0 | 1 | 3 | I'm running mod_wsgi on apache2. It's running Django and for some reason, after I change my code, old versions are sometimes shown along with new code.
For example, after creating a view that simply returns an Http Response with "Hi", I get either the Django start page or "Hi".
Any ideas what would cause this?
Thanks. |
mod_wsgi showing old code | 9,970,706 | 2 | 1 | 559 | 0 | python,django,apache2,mod-wsgi | apache2/mod_wsgi keeps parts of the application loaded between requests. You have to restart the server after code updates. | 0 | 0 | 0 | 0 | 2012-04-02T03:35:00.000 | 4 | 1.2 | true | 9,970,598 | 0 | 0 | 1 | 3 | I'm running mod_wsgi on apache2. It's running Django and for some reason, after I change my code, old versions are sometimes shown along with new code.
For example, after creating a view that simply returns an Http Response with "Hi", I get either the Django start page or "Hi".
Any ideas what would cause this?
Thanks. |
mod_wsgi showing old code | 9,970,690 | 0 | 1 | 559 | 0 | python,django,apache2,mod-wsgi | This could possibly be your browser caching responses from the server. Try disabling caching to see if that has any affect. Even if it doesn't now, doing so can potentially save you a lot of grief and confusion in the future. | 0 | 0 | 0 | 0 | 2012-04-02T03:35:00.000 | 4 | 0 | false | 9,970,598 | 0 | 0 | 1 | 3 | I'm running mod_wsgi on apache2. It's running Django and for some reason, after I change my code, old versions are sometimes shown along with new code.
For example, after creating a view that simply returns an Http Response with "Hi", I get either the Django start page or "Hi".
Any ideas what would cause this?
Thanks. |
Running WSGI application with a different version of Django to what's installed in python site-packages? | 9,974,529 | 2 | 0 | 181 | 0 | python,django,wsgi,django-wsgi | Run the app inside a virtualenv. | 0 | 0 | 0 | 0 | 2012-04-02T10:09:00.000 | 2 | 1.2 | true | 9,974,465 | 0 | 0 | 1 | 1 | I have an application that uses Django 1.3 installed in python's site-packages. I want to create another copy of it (WSGI under Apache) but make it use a newer version of Django I've unpacked alongside to see if any input is required before I'm able to migrate to 1.4.
Is there a way to somehow specify where WSGI should... |
Alternative to a server side scripting language for scraping | 9,979,094 | 0 | 0 | 682 | 0 | javascript,python,ironpython,client-side | Given the server limitation, I would run those scripts locally to generate HTML, and push that static output onto your server. | 0 | 0 | 1 | 0 | 2012-04-02T15:08:00.000 | 3 | 0 | false | 9,978,862 | 0 | 0 | 1 | 1 | I have a small website hosted by my university. The policy is that no server side scripting language (e.g. PHP, etc.) is enabled, hence websites are either static or can use client side scripting (e.g. javascript, etc.). I also can't touch the server/configure it/install things.
Anyway, I wanted to add some data from o... |
Python: How to create simple web pages without a huge framework? | 9,979,501 | 0 | 8 | 18,361 | 0 | python,frameworks,web-frameworks | Python works well using CGI.
that's the simplest thing you can do: it only needs apache and a working python environment, and is the closest to a standard php setup.
remember that, when using CGI, your python script is responsible for outputting the necessary HTTP headers (sys.stdout.write('Content-Type: text/html\n\n... | 0 | 0 | 0 | 0 | 2012-04-02T15:38:00.000 | 8 | 0 | false | 9,979,326 | 0 | 0 | 1 | 3 | I would like to know if there is a way to create web pages without a huge framework in python.
I think of something like PHP/Apache, which comes just as a language and not with to much overhead (but I don't like PHP...). In PHP there is no ORM, no template engine, etc. But it is very very easy to just print a Hello Wor... |
Python: How to create simple web pages without a huge framework? | 9,979,395 | 1 | 8 | 18,361 | 0 | python,frameworks,web-frameworks | I'm not sure what's wrong with django flatpages for your purposes.
Another alternative would be to replace the django template system with something more powerful, like jinja, so you can write your tag soup and do processing there, with minimal logic in the view.
In practice (given that you already know django), that i... | 0 | 0 | 0 | 0 | 2012-04-02T15:38:00.000 | 8 | 0.024995 | false | 9,979,326 | 0 | 0 | 1 | 3 | I would like to know if there is a way to create web pages without a huge framework in python.
I think of something like PHP/Apache, which comes just as a language and not with to much overhead (but I don't like PHP...). In PHP there is no ORM, no template engine, etc. But it is very very easy to just print a Hello Wor... |
Python: How to create simple web pages without a huge framework? | 9,979,487 | 4 | 8 | 18,361 | 0 | python,frameworks,web-frameworks | I've used Flask (and bottle.py) in the past, but these days I actually prefer Pyramid, from the Pylons folks.
Pyramid is capable of being a large, full-fledged framework, is designed for flexibility, and has no shortage of plugins and extensions available adding additional functionality -- but it also is capable of sma... | 0 | 0 | 0 | 0 | 2012-04-02T15:38:00.000 | 8 | 0.099668 | false | 9,979,326 | 0 | 0 | 1 | 3 | I would like to know if there is a way to create web pages without a huge framework in python.
I think of something like PHP/Apache, which comes just as a language and not with to much overhead (but I don't like PHP...). In PHP there is no ORM, no template engine, etc. But it is very very easy to just print a Hello Wor... |
How to convert a stringbyte(raw html string) to sqlite3 TEXT supporting unicode in Python | 9,991,929 | 0 | 0 | 241 | 1 | python,unicode,utf-8,sqlite | You should .decode with the correct encoding. In this case Latin 1 or CP1252. »ö« is obviously not 0xf6 in UTF-8 so why should it work? | 0 | 0 | 0 | 0 | 2012-04-03T10:57:00.000 | 1 | 0 | false | 9,991,854 | 0 | 0 | 1 | 1 | I am requesting a web page and want to cache the page data as a raw html string. (First I escaped the data string) I use sqlite3 to save my data on. When I tried give the byte_string in dictionary, or tuple, using placeholders in request, it raise "Programming Error" saying to convert the application to use unicode str... |
How to structure complex Django project? | 9,995,337 | 1 | 4 | 1,093 | 0 | python,django | I certainly use class methods, and I have found that where there are similar operations to be performed on classes, it is possible (and easy) to factor the classmethods into base classes (use the self parameter of your class method to write generic code).
Probably the best way to manage broken-up views, etc is to repla... | 0 | 0 | 0 | 0 | 2012-04-03T14:10:00.000 | 3 | 0.066568 | false | 9,995,041 | 0 | 0 | 1 | 2 | I have a Django project which is getting more and more complex. I started off with the traditional files: models, views, and forms.py. The issue I have right now is that those files are getting bigger and bigger and I'd like to break them into manageable parts. What are the best practices around that?
In addition, I am... |
How to structure complex Django project? | 9,997,876 | 2 | 4 | 1,093 | 0 | python,django | I find refactoring can really help. Are there a lot of similar views that just have different templates or querysets? Make a more generic view that accepts multiple template names, records, etc.
Anything that requires extensive calculations gets moved to a utils.py in the same directory.
Class methods are for actions t... | 0 | 0 | 0 | 0 | 2012-04-03T14:10:00.000 | 3 | 1.2 | true | 9,995,041 | 0 | 0 | 1 | 2 | I have a Django project which is getting more and more complex. I started off with the traditional files: models, views, and forms.py. The issue I have right now is that those files are getting bigger and bigger and I'd like to break them into manageable parts. What are the best practices around that?
In addition, I am... |
Creating an in memory constant when django starts | 9,999,509 | 2 | 0 | 92 | 0 | python,django | There's no such thing as a "global variable" in Python that is available from everywhere. You need to import all names before you can use them.
Even if you did this, though, it wouldn't actually work on production. Not only is there no command that you run to start up the production server (it's done automatically by A... | 0 | 0 | 0 | 0 | 2012-04-03T18:16:00.000 | 2 | 0.197375 | false | 9,999,005 | 0 | 0 | 1 | 1 | I have this kind of setup :
Overridden BaseRunserverCommand that adds another option (--token) that would get a string token.
Store it in the app called "vault" as a global variable
Then continue executing the BaseRunserverCommand
Now later when I try to get the value of this global variable after the server started,... |
Project structure for python projects with maven | 9,999,984 | 10 | 16 | 15,040 | 0 | python,maven | It is the good news: you do not need any tool. You can organise your source code in any way you want.
Let recap why we need tools in the java world:
In java you want to generate directories upfront because the namespace system dictates that each class must live in one file in a directory structure that reflects that ... | 0 | 0 | 0 | 1 | 2012-04-03T18:59:00.000 | 4 | 1.2 | true | 9,999,618 | 0 | 0 | 1 | 1 | Are there any tools which generate a project layout for python specific projects, much similar to what maven accomplishes with mvn archetype:generate for java projects. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.