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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PHP or Python for Image Processing? | 4,641,248 | 1 | 3 | 2,343 | 0 | php,python,image,image-processing,image-manipulation | Python is more clean and readable.
For image processing there is the imageMagic library available for Python and PHP too.
If you want to do some other complex image processing, which cannot by done using a library and you still want to do it in Python or PHP, then Python is defenitely the answer as Python can be extend... | 0 | 0 | 0 | 1 | 2011-01-09T19:19:00.000 | 5 | 0.039979 | false | 4,641,187 | 1 | 0 | 1 | 4 | I am writing an application for image processing. I am just wondering which programming language would be the best fit. Python or PHP. This process is system based not web based so I am just thinking if Python could be of more help.
Let me know your thoughts! |
The @login_required decorator of Django redirects people to /accounts/login when they aren't registered. How to change this URL? | 59,461,520 | 0 | 9 | 4,416 | 0 | python,django,authentication,configuration,login | LOGIN_REDIRECT_URL = '/login' will solve your problem.
LOGIN_URL = '/login' is just for telling django that '/login' is your login URL and LOGIN_REDIRECT_URL will tell django where to redirect user after login. | 0 | 0 | 0 | 0 | 2011-01-10T05:51:00.000 | 3 | 0 | false | 4,644,049 | 0 | 0 | 1 | 1 | I want it to redirect to "/login" instead of "/accounts/login"
Is there a setting I can change? |
django long running process database connection | 4,644,443 | 1 | 1 | 571 | 1 | python,django,apache,mod-wsgi | The broken pipe mostly mean that one socket in the canal of transmission has been closed without notifying the other one , in your case i think it mean that the database connection that you have establish was closed from the database part, so when you code try to use it, it raise the exception.
Usually the database con... | 0 | 0 | 0 | 0 | 2011-01-10T06:42:00.000 | 1 | 1.2 | true | 4,644,317 | 0 | 0 | 1 | 1 | i have a django project with a long running (~3hour) management command
in my production environment ( apache mod_wsgi ) this process fails with a broken pipe(32) at the end, when trying to update the database.
thank you |
Add a custom link to hudson project page | 4,653,469 | 1 | 5 | 1,120 | 0 | python,continuous-integration,python-sphinx,hudson | Get the sidelink plugin. That let's you add a link to the ones that are on the left-hand side of the project page. | 0 | 0 | 0 | 0 | 2011-01-10T10:06:00.000 | 3 | 0.066568 | false | 4,645,581 | 0 | 0 | 1 | 2 | I'm using Hudson to generate the documentation for a Python project using Sphinx. This generates HTML documentation in the folder project/_build/html, which I set up to be used as an build artifact. Now after running the job, I can navigate to the documentation by clicking on the "Artifacts" link, then on the folder, a... |
Add a custom link to hudson project page | 4,647,033 | 2 | 5 | 1,120 | 0 | python,continuous-integration,python-sphinx,hudson | The Project Description allows HTML, just edit it and place the link to your docs from the last successful build. | 0 | 0 | 0 | 0 | 2011-01-10T10:06:00.000 | 3 | 1.2 | true | 4,645,581 | 0 | 0 | 1 | 2 | I'm using Hudson to generate the documentation for a Python project using Sphinx. This generates HTML documentation in the folder project/_build/html, which I set up to be used as an build artifact. Now after running the job, I can navigate to the documentation by clicking on the "Artifacts" link, then on the folder, a... |
How to convert the django web application into the desktop application | 4,647,246 | 1 | 3 | 6,009 | 0 | python,django | There are two places you can go to try to decouple the view and put it into a new desktop app. First you can use the existing controller and model and adapt a new view to that. Second, you can use only the existing model and build a new view and controller.
If you haven't adhered closely enough to the MVC principles t... | 0 | 0 | 0 | 0 | 2011-01-10T12:11:00.000 | 8 | 0.024995 | false | 4,646,659 | 0 | 0 | 1 | 3 | How to convert the web site develpoed in django, python into desktop application.
I am new to python and django can you please help me out
Thanks in Advance |
How to convert the django web application into the desktop application | 4,646,707 | 2 | 3 | 6,009 | 0 | python,django | For starters, you'll have to replace the web UI with a desktop technology like Tk/Tcl.
If you do that, you may not want to use HTTP as the protocol between the client and the services.
Django is a web framework. If you're switching to a desktop, you'll have to forego Django. | 0 | 0 | 0 | 0 | 2011-01-10T12:11:00.000 | 8 | 0.049958 | false | 4,646,659 | 0 | 0 | 1 | 3 | How to convert the web site develpoed in django, python into desktop application.
I am new to python and django can you please help me out
Thanks in Advance |
How to convert the django web application into the desktop application | 41,890,316 | 0 | 3 | 6,009 | 0 | python,django | I am thinking about a similar Problem.
Would it be enough to habe a minimal PyQt Gui that enables you to present the djando-website from localhost (get rid of TCP/HTTPS on loop interface somehow) via QtWebkit?
All you seem to need is to have a minimal Python-Broser, that surfs the build in Webserver (and i guess you co... | 0 | 0 | 0 | 0 | 2011-01-10T12:11:00.000 | 8 | 0 | false | 4,646,659 | 0 | 0 | 1 | 3 | How to convert the web site develpoed in django, python into desktop application.
I am new to python and django can you please help me out
Thanks in Advance |
Call a url that writes to a file on a server (free) | 4,650,080 | 2 | 1 | 250 | 0 | python,html,url | You need a script that you can execute on the server. This can be written in any language you want. Python works fine. Unless loads of people call the URL at once you can use CGI (it's a bit slow when using Python). | 0 | 0 | 1 | 0 | 2011-01-10T17:03:00.000 | 1 | 1.2 | true | 4,649,343 | 0 | 0 | 1 | 1 | What I'm asking may sound strange, but I really need it..
What I need is a url that I can setup (like a free server with php support, but something reliable) and call that url from python with the arguments I need and it would write the values to a file.
I don't know if what I really need is a server with php (I hope n... |
Reference list item by index within Django template? | 4,651,237 | 24 | 137 | 132,262 | 0 | python,django,django-templates | {{ data.0 }} should work.
Let's say you wrote data.obj django tries data.obj and data.obj(). If they don't work it tries data["obj"]. In your case data[0] can be written as {{ data.0 }}. But I recommend you to pull data[0] in the view and send it as separate variable. | 0 | 0 | 0 | 0 | 2011-01-10T20:27:00.000 | 4 | 1 | false | 4,651,172 | 0 | 0 | 1 | 1 | This may be simple, but I looked around and couldn't find an answer. What's the best way to reference a single item in a list from a Django template?
In other words, how do I do the equivalent of {{ data[0] }} within the template language? |
How to: Click button, then do stuff, then show confirmation in Django | 4,652,188 | 4 | 1 | 864 | 0 | python,django,post,button,django-forms | That's what a Form is for. You can create a small HTML form with just the button.
The form's action is the URI to which a request is sent.
Django parse the URI and calls a view function.
The function does the work and returns the resulting page. | 0 | 0 | 0 | 0 | 2011-01-10T22:05:00.000 | 1 | 1.2 | true | 4,652,048 | 0 | 0 | 1 | 1 | Basic question, but I can't find a simple answer anywhere.
What is the best way to do the following in Django:
User pushes button
Some Python code gets crunched server-side
User sees confirmation page
All the user needs to know is that the server did what he told it to. No input other than the button click.
Thanks i... |
Login hook on Google Appengine | 4,663,607 | 0 | 7 | 345 | 0 | python,events,google-app-engine,login,hook | I'm using Python on GAE (so it may be different for Java) but have seen no documentation about such a hook for a user logging in. If you used one of the session management frameworks you'd probably get some indication for that, but otherwise I do this kind of house keeping on my opening page itself which requires login... | 0 | 1 | 0 | 0 | 2011-01-11T11:06:00.000 | 2 | 0 | false | 4,656,923 | 0 | 0 | 1 | 1 | Every time a user logs in to the application, I want to perform a certain task, say, record the time of login. So I wanted to know if a hook is fired on login by default? If yes, how can I make my module respond to it.
Edit - Assume there are multiple entry points in the application to login. |
Alternatives to PHP Cron Job for Long Running Jobs | 4,661,872 | 0 | 1 | 1,341 | 0 | php,python,cron,web-hosting | A different solution might be to use a database, and not bite off so much work at once. Make a table listing the sites you pull, and store when they were last pulled. Then have the cron pull out 1 or 2 that haven't been pulled in a while. Have it run often, then you'll always have fresh data, but the script will hav... | 0 | 0 | 0 | 1 | 2011-01-11T18:45:00.000 | 3 | 1.2 | true | 4,661,377 | 0 | 0 | 1 | 2 | We have a website that lists links to blogs in realtime. The problem is that the pages are slow to load because they are reading data from the various source sites.
I wrote a PHP script that creates an HTML version of each page. This runs once each hour. The problem is that the PHP script is timing out before it finish... |
Alternatives to PHP Cron Job for Long Running Jobs | 4,661,510 | 1 | 1 | 1,341 | 0 | php,python,cron,web-hosting | Given the fact that your original problem is one of network latency ("pages are slow to load") I see no reason to believe that PHP is the bottleneck here. I doubt changing languages will affect your script run time. | 0 | 0 | 0 | 1 | 2011-01-11T18:45:00.000 | 3 | 0.066568 | false | 4,661,377 | 0 | 0 | 1 | 2 | We have a website that lists links to blogs in realtime. The problem is that the pages are slow to load because they are reading data from the various source sites.
I wrote a PHP script that creates an HTML version of each page. This runs once each hour. The problem is that the PHP script is timing out before it finish... |
Accepting mobile short code texts (e.g. Twitter) with Django | 4,666,780 | 0 | 0 | 342 | 0 | python,django,mobile-phones,mobile-website,sms-gateway | First of all you either need to setup your own gateway with a mobile phone and a software that reads incoming text and processes it or find a service provider. If you buy a short code it may be costly but there should be some services around that allows you to use common number with a keyword to receive and process inc... | 0 | 0 | 0 | 0 | 2011-01-11T21:13:00.000 | 3 | 0 | false | 4,662,738 | 0 | 0 | 1 | 1 | Ive tried to look up how to accept texts from mobile phones with Django (e.g. like Twitter) to post data to user accounts. All i have ran across is how to make a mobile web app with django as in different layouts etc.. Has anyone any idea where a tutorial on this might be or how in the world to start doing this with dj... |
A Read-Only Relational Database on Google App Engine? | 4,663,353 | 2 | 2 | 803 | 1 | python,google-app-engine,sqlite,relational-database,non-relational-database | I don't think you're likely to find anything like that...surely not over blobstore. Because if all your data is stored in a single blob, you'd have to read the entire database into memory for any operation, and you said you can't do that.
Using the datastore as your backend is more plausible, but not much. The big issu... | 0 | 1 | 0 | 0 | 2011-01-11T21:55:00.000 | 3 | 1.2 | true | 4,663,071 | 0 | 0 | 1 | 2 | I have a medium size (~100mb) read-only database that I want to put on google app engine. I could put it into the datastore, but the datastore is kind of slow, has no relational features, and has many other frustrating limitations (not going into them here). Another option is loading all the data into memory, but I q... |
A Read-Only Relational Database on Google App Engine? | 4,663,631 | 2 | 2 | 803 | 1 | python,google-app-engine,sqlite,relational-database,non-relational-database | django-nonrel does not magically provide an SQL database - so it's not really a solution to your problem.
Accessing a blobstore blob like a file is possible, but the SQLite module requires a native C extension, which is not enabled on App Engine. | 0 | 1 | 0 | 0 | 2011-01-11T21:55:00.000 | 3 | 0.132549 | false | 4,663,071 | 0 | 0 | 1 | 2 | I have a medium size (~100mb) read-only database that I want to put on google app engine. I could put it into the datastore, but the datastore is kind of slow, has no relational features, and has many other frustrating limitations (not going into them here). Another option is loading all the data into memory, but I q... |
Change default Python interpreter on Windows XP | 4,664,796 | 9 | 13 | 39,814 | 0 | python,django,version | Change your PATH system environment variable to point to the version of Python you want to use. | 0 | 0 | 0 | 0 | 2011-01-12T01:44:00.000 | 7 | 1.2 | true | 4,664,646 | 1 | 0 | 1 | 1 | I have two python versions: Python 2.5 and Python 2.7. When I'm setting up django, I want to use Python 2.7, but django is using Python 2.5 somehow.
How can I make sure that django use Python 2.7? I'm using Windows XP |
Reverse rendering of Urdu fonts | 4,669,402 | -1 | 2 | 824 | 0 | python,linux,fonts,tkinter,right-to-left | Use a toolkit that isn't terrible, such as PyQt, PyGTK, or wxPython. | 1 | 0 | 0 | 0 | 2011-01-12T12:50:00.000 | 2 | -0.099668 | false | 4,668,985 | 1 | 0 | 1 | 1 | I am working on a project that is based on Urdu language in Ubuntu platform. I'm using Python language and have almost achieved my task.
The problem is that, the Urdu text is rendered in reverse order.
For example, consider the word کام (which means work)
consisting of the three letters:
ک ,
ا , and
م
The output is re... |
Web scraping - how to identify main content on a webpage | 4,672,098 | 13 | 59 | 24,718 | 0 | python,web-scraping,html-parsing,webpage | There's no way to do this that's guaranteed to work, but one strategy you might use is to try to find the element with the most visible text inside of it. | 0 | 0 | 1 | 0 | 2011-01-12T17:46:00.000 | 10 | 1.2 | true | 4,672,060 | 0 | 0 | 1 | 2 | Given a news article webpage (from any major news source such as times or bloomberg), I want to identify the main article content on that page and throw out the other misc elements such as ads, menus, sidebars, user comments.
What's a generic way of doing this that will work on most major news sites?
What are some ... |
Web scraping - how to identify main content on a webpage | 4,672,151 | 6 | 59 | 24,718 | 0 | python,web-scraping,html-parsing,webpage | It might be more useful to extract the RSS feeds (<link type="application/rss+xml" href="..."/>) on that page and parse the data in the feed to get the main content. | 0 | 0 | 1 | 0 | 2011-01-12T17:46:00.000 | 10 | 1 | false | 4,672,060 | 0 | 0 | 1 | 2 | Given a news article webpage (from any major news source such as times or bloomberg), I want to identify the main article content on that page and throw out the other misc elements such as ads, menus, sidebars, user comments.
What's a generic way of doing this that will work on most major news sites?
What are some ... |
Modify system configuration files and use system commands through web interface | 4,710,807 | 0 | 3 | 474 | 0 | python,security,apache,root,privileges | Hello
You can easily create web applications in Python using WSGI-compliant web frameworks such as CherryPy2 and templating engines such as Genshi. You can use the 'subprocess' module to manadge external commands... | 0 | 1 | 0 | 0 | 2011-01-13T13:44:00.000 | 2 | 1.2 | true | 4,680,693 | 0 | 0 | 1 | 2 | I received a project recently and I am wondering how to do something in a correct and secure manner.
The situation is the following:
There are classes to manage linux users, mysql users and databases and apache virtual hosts. They're used to automate the addition of users in a small shared-hosting environnement. These ... |
Modify system configuration files and use system commands through web interface | 4,684,335 | 0 | 3 | 474 | 0 | python,security,apache,root,privileges | You can use sudo to give the apache user root permission for only the commands/scripts you need for your web app. | 0 | 1 | 0 | 0 | 2011-01-13T13:44:00.000 | 2 | 0 | false | 4,680,693 | 0 | 0 | 1 | 2 | I received a project recently and I am wondering how to do something in a correct and secure manner.
The situation is the following:
There are classes to manage linux users, mysql users and databases and apache virtual hosts. They're used to automate the addition of users in a small shared-hosting environnement. These ... |
Able to ping but cannot browse after several hours running of my python program | 4,697,664 | 3 | 0 | 204 | 0 | python,multithreading,network-programming,urllib2,python-multithreading | Are you sure you are closing TCP sessions after each request? Try to check netstat information from time to time and if you'll see that the number of active/established sessions is rising it means that you have some problems in your script.
Yes, usually you can ping even if you are out of free TCP sockets. | 0 | 0 | 1 | 0 | 2011-01-15T01:55:00.000 | 1 | 1.2 | true | 4,697,623 | 0 | 0 | 1 | 1 | It's a GUI program I wrote in python checking website/server status running on my XP SP3, multi threads are used to check different site/server. After several hours running, the program starts to get urlopen error timed out all the time, and this always happens right after a POST request from a server(not a certain one... |
Get the uri of the page in Google App Engine / Django? | 4,698,277 | 0 | 0 | 98 | 0 | python,django,google-app-engine,httpwebrequest | Should be in self.request.url in your RequestHandler-based class. | 0 | 1 | 0 | 0 | 2011-01-15T06:02:00.000 | 1 | 1.2 | true | 4,698,265 | 0 | 0 | 1 | 1 | I'm using Google App Engine with the standard Django templates found in Webapp.
I wanted to display the permalink to the page the user is on. How do I get the uri? |
Is cherrypy Python3-compatible yet? | 4,706,295 | 0 | 6 | 3,485 | 0 | python,cherrypy | I've been running a CherryPy website with Python 3 for a few months now and it works well, but you have to use the code from the python3 branch of the repository because CherryPy 3.2 isn't released yet. | 0 | 0 | 0 | 0 | 2011-01-16T12:30:00.000 | 4 | 0 | false | 4,705,333 | 0 | 0 | 1 | 1 | Does cherrypy support Python3 yet? What other web frameworks out there support Python 3? |
django templatetag | 4,707,169 | 1 | 1 | 737 | 0 | python,django | As far as I am aware there is not built-in tag to do this. Depending on the nature of the words you want (they aren't inside, or part of a for-loop - although even then you could just do this recursively) you could just do what you want in the views.py and pass the output as a variable to the template?
So you'd do your... | 0 | 0 | 0 | 0 | 2011-01-16T17:54:00.000 | 3 | 0.066568 | false | 4,707,008 | 0 | 0 | 1 | 1 | am looking for a django templatetag that will count words and substring a whole paragraph without chopping off words. Is there a built in function? I tried looking into the built-in function list at Django template documentation but couldn't find anything.
Please advice? |
Django find oldest entry in database | 4,707,215 | 3 | 2 | 1,478 | 0 | python,django,datetime,view | If you have a created timestamp on your model, then could you sort ascending by this field and grab the first value?
To do the differences between the dates, you may be able to use an aggregate function to find the highest and lowest date, but I am uncertain. Something along the following lines might work:
MyModel.obje... | 0 | 0 | 0 | 0 | 2011-01-16T18:19:00.000 | 1 | 1.2 | true | 4,707,136 | 0 | 0 | 1 | 1 | Looking for a way in a Django view to find the oldest entry in the database. Then take that value and to a time since. There has to be a simple way to do this with writing a complicated query. |
Django: How to build a custom form widget? | 11,547,550 | 7 | 63 | 51,410 | 0 | python,django,forms | NOTE: There are three questions here. For the first two questions, see the fuller answer by AndiDog. I'm only answering the third question here:
Q. What widget method is responsible for going from the user's input back to the data model?
A. The value_from_datadict method -- it's sort of the inverse of a widget's render... | 0 | 0 | 0 | 0 | 2011-01-16T18:27:00.000 | 5 | 1 | false | 4,707,192 | 0 | 0 | 1 | 1 | I am having a difficult time finding documentation on how to write a custom widget.
My questions are:
If I build a custom widget, can it be used equivalently for the admin interface or for normal forms?
If I want to allow the user to edit a list of items, what widget should I subclass? What methods of the widget do I ... |
Scrapy and proxies | 14,401,562 | 9 | 50 | 69,413 | 0 | python,scrapy | that would be:
export http_proxy=http://user:password@proxy:port | 0 | 0 | 1 | 0 | 2011-01-17T06:17:00.000 | 9 | 1 | false | 4,710,483 | 0 | 0 | 1 | 1 | How do you utilize proxy support with the python web-scraping framework Scrapy? |
PHP part in Python based website | 4,718,973 | 1 | 1 | 171 | 0 | php,python,google-app-engine | Quercus on App Engine runs on the Java runtime, while Python runs on, er, the Python runtime. While you can run one app with multiple runtimes, they have to be different major versions, which means that communication between them will be awkward - you'd have to make URLFetches between them.
I think you'll find it's far... | 0 | 0 | 0 | 0 | 2011-01-17T09:15:00.000 | 2 | 0.099668 | false | 4,711,544 | 0 | 0 | 1 | 1 | I need to write a small addition to a Python+Django based website, hosted on Google Apps. Trouble is that I don't have any experience with Python.
The addition is pretty straight forward, it requires little database access
So thought of 2 possible solution's:
Quickly dive into Python and get it done with Python.
Run ... |
Is there an API of Google App Engine provided to better configure the Bigtable besides Datastore? | 4,718,951 | 2 | 1 | 134 | 1 | python,google-app-engine | The Datastore is the only interface to the underlying storage on App Engine. You should be able to use any valid UTF-8 string as a kind name, key name, or property name, however. | 0 | 1 | 0 | 0 | 2011-01-17T10:32:00.000 | 1 | 0.379949 | false | 4,712,143 | 0 | 0 | 1 | 1 | According to the Bigtable original article, a column key of a Bigtable is named using "family:qualifier" syntax where column family names must be printable but qualifiers may be arbitrary strings. In the application I am working on, I would like to specify the qualifiers using Chinese words (or phrase). Is it possible ... |
Integrating Django and .Net applications using Single Sign On (SSO) | 4,718,045 | 1 | 2 | 919 | 0 | .net,python,django,single-sign-on | We implement OpenID at our company in a way that the only trusted openid provider is ourself. Because of this, the user doesn't have to use anything special to log into a website. They just click a login button and it pops them over to the main login site. If they've already logged in then it instantly sends them back ... | 0 | 0 | 0 | 0 | 2011-01-17T12:46:00.000 | 2 | 0.099668 | false | 4,713,293 | 0 | 0 | 1 | 1 | We have heterogeneous systems consisting of Django and .Net web applications. I primarily work on Django.Is it possible to integrate these heterogeneous systems using Single Sign On ?
Any ideas in this regard would be truly appreciated.
Thank You |
Serving large generated files using Google App Engine? | 4,718,754 | 3 | 2 | 793 | 0 | python,google-app-engine,blob,blobstore | I think storing it in the blobstore via a form post is your best currently-available option. We have plans to implement programmatic blobstore writing, but it's not ready quite yet. | 0 | 1 | 0 | 0 | 2011-01-17T20:31:00.000 | 4 | 1.2 | true | 4,717,568 | 0 | 0 | 1 | 2 | Presently I have a GAE app that does some offline processing (backs up a user's data), and generates a file that's somewhere in the neighbourhood of 10 - 100 MB. I'm not sure of the best way to serve this file to the user. The two options I'm considering are:
Adding some code to the offline processing code that 'spo... |
Serving large generated files using Google App Engine? | 4,717,660 | 0 | 2 | 793 | 0 | python,google-app-engine,blob,blobstore | There is some approach you are overlooking, although I'm not sure whether it is that much better:
Split the data into many 1MB chunks, and have individual requests to transfer the chunks.
This would require cooperation from the outside applications to actually retrieve the data in chunks; you might want to use the HTTP... | 0 | 1 | 0 | 0 | 2011-01-17T20:31:00.000 | 4 | 0 | false | 4,717,568 | 0 | 0 | 1 | 2 | Presently I have a GAE app that does some offline processing (backs up a user's data), and generates a file that's somewhere in the neighbourhood of 10 - 100 MB. I'm not sure of the best way to serve this file to the user. The two options I'm considering are:
Adding some code to the offline processing code that 'spo... |
Converting Django project from MySQL to Mongo, any major pitfalls? | 10,204,815 | 1 | 2 | 2,780 | 1 | python,django,mongodb,mongoengine | I've used mongoengine with django but you need to create a file like mongo_models.py for example. In that file you define your Mongo documents. You then create forms to match each Mongo document. Each form has a save method which inserts or updates whats stored in Mongo. Django forms are designed to plug into any data ... | 0 | 0 | 0 | 0 | 2011-01-17T22:22:00.000 | 6 | 0.033321 | false | 4,718,580 | 0 | 0 | 1 | 5 | I want to try Mongodb w/ mongoengine. I'm new to Django and databases and I'm having a fit with Foreign Keys, Joins, Circular Imports (you name it). I know I could eventually work through these issues but Mongo just seems like a simpler solution for what I am doing. My question is I'm using a lot of pluggable apps (... |
Converting Django project from MySQL to Mongo, any major pitfalls? | 4,718,924 | 9 | 2 | 2,780 | 1 | python,django,mongodb,mongoengine | There's no reason why you can't use one of the standard RDBMSs for all the standard Django apps, and then Mongo for your app. You'll just have to replace all the standard ways of processing things from the Django ORM with doing it the Mongo way.
So you can keep urls.py and its neat pattern matching, views will still ge... | 0 | 0 | 0 | 0 | 2011-01-17T22:22:00.000 | 6 | 1.2 | true | 4,718,580 | 0 | 0 | 1 | 5 | I want to try Mongodb w/ mongoengine. I'm new to Django and databases and I'm having a fit with Foreign Keys, Joins, Circular Imports (you name it). I know I could eventually work through these issues but Mongo just seems like a simpler solution for what I am doing. My question is I'm using a lot of pluggable apps (... |
Converting Django project from MySQL to Mongo, any major pitfalls? | 4,719,398 | -1 | 2 | 2,780 | 1 | python,django,mongodb,mongoengine | Primary pitfall (for me): no JOINs! | 0 | 0 | 0 | 0 | 2011-01-17T22:22:00.000 | 6 | -0.033321 | false | 4,718,580 | 0 | 0 | 1 | 5 | I want to try Mongodb w/ mongoengine. I'm new to Django and databases and I'm having a fit with Foreign Keys, Joins, Circular Imports (you name it). I know I could eventually work through these issues but Mongo just seems like a simpler solution for what I am doing. My question is I'm using a lot of pluggable apps (... |
Converting Django project from MySQL to Mongo, any major pitfalls? | 4,719,167 | 0 | 2 | 2,780 | 1 | python,django,mongodb,mongoengine | Upfront, it won't work for any existing Django app that ships it's models. There's no backend for storing Django's Model data in mongodb or other NoSQL storages at the moment and, database backends aside, models themselves are somewhat of a moot point, because once you get in to using someones app (django.contrib apps ... | 0 | 0 | 0 | 0 | 2011-01-17T22:22:00.000 | 6 | 0 | false | 4,718,580 | 0 | 0 | 1 | 5 | I want to try Mongodb w/ mongoengine. I'm new to Django and databases and I'm having a fit with Foreign Keys, Joins, Circular Imports (you name it). I know I could eventually work through these issues but Mongo just seems like a simpler solution for what I am doing. My question is I'm using a lot of pluggable apps (... |
Converting Django project from MySQL to Mongo, any major pitfalls? | 4,728,500 | 0 | 2 | 2,780 | 1 | python,django,mongodb,mongoengine | I have recently tried this (although without Mongoengine). There are a huge number of pitfalls, IMHO:
No admin interface.
No Auth django.contrib.auth relies on the DB interface.
Many things rely on django.contrib.auth.User. For example, the RequestContext class. This is a huge hindrance.
No Registration (Relies ... | 0 | 0 | 0 | 0 | 2011-01-17T22:22:00.000 | 6 | 0 | false | 4,718,580 | 0 | 0 | 1 | 5 | I want to try Mongodb w/ mongoengine. I'm new to Django and databases and I'm having a fit with Foreign Keys, Joins, Circular Imports (you name it). I know I could eventually work through these issues but Mongo just seems like a simpler solution for what I am doing. My question is I'm using a lot of pluggable apps (... |
List of References in Google App Engine for Python | 4,719,811 | 6 | 18 | 2,691 | 0 | python,google-app-engine | You're right, there's no built in ReferenceListProperty. It'd be possible to write one yourself - custom Property subclasses are generally fairly easy - but getting it right is harder than you'd think, when it comes to deferencing and caching a list of references.
You can use a db.ListProperty(db.Key), however, which a... | 0 | 1 | 0 | 0 | 2011-01-18T01:29:00.000 | 2 | 1 | false | 4,719,700 | 0 | 0 | 1 | 1 | In Google App Engine, there is such a thing as a ListProperty that allows you to hold a list (array) of items. You may also specify the type of the item being held, for instance string, integer, or whatever.
Google App Engine also allows you to have a ReferenceProperty. A ReferenceProperty "contains" a reference to an... |
Python: Processing Javascript with urllib2? | 4,721,276 | 2 | 5 | 5,105 | 0 | javascript,python,urllib2 | No, you'd need some sort of JS interpreter for that. There might be Python-Browser integrations to help parsing this kind of page. | 0 | 0 | 1 | 0 | 2011-01-18T03:55:00.000 | 1 | 1.2 | true | 4,720,342 | 0 | 0 | 1 | 1 | I am coding a HTML scraper which gets values from a table on a website. I also need to grab the URL of an image, but the problem is this image is dynamically generated via javascript - and when i get contents of the website via urllib, the Javascript does not run or show in the resulting HTML.
Is there any way to enabl... |
Django's BooleanField showing incorrect value in edit mode | 4,733,618 | 0 | 0 | 286 | 0 | python,mysql,django | You haven't provided much details so I'm guessing that you mean that you have a form and it doesn't have required=False set for the BooleanField. | 0 | 0 | 0 | 0 | 2011-01-18T21:03:00.000 | 1 | 0 | false | 4,728,983 | 0 | 0 | 1 | 1 | DJango: 1.24
DB: MySQL
Column Type: Bit
Code: models.BooleanField(db_column='InStock')
The checkbox always shows checked no matter what the value is (1 or 0). The value gets saved correctly but when it renders the edit page, it always checked.
Any pointers? |
XML serialization library interoperability between Java and Python | 4,730,212 | 1 | 1 | 1,140 | 0 | java,python,xml,serialization | Since Java and Python objects are so different in themselves, it's almost impossible to do this, unless you on both sides restrict the types allowed and such things.
And in that case, I'd recommend you use JSON, which is a nice interoperability format, even though it's not XML.
Otherwise you could easily write a librar... | 0 | 0 | 1 | 0 | 2011-01-18T23:06:00.000 | 4 | 1.2 | true | 4,730,082 | 0 | 0 | 1 | 1 | I have been searching for an xml serialization library that can serialize and deserialize an (Java/Python) object into xml and back. I am using XStream right now for Java. If XStream had a python version to deserialize from xml generated by Xstream that would have done it for me. Thrift or such other libraries is not g... |
Have different initial_data fixtures for different stages (testing v. production) | 4,731,825 | 0 | 2 | 490 | 0 | python,django,django-models,django-settings,django-fixtures | The easiest way is to use manage.py testserver [fixture ...]
If this is a staging (rather than dev) deployment, though, you may not want to use django's builtin server. In that case, a quick (if hacky) way of doing what you're after is to have the fixtures in an app (called, for example, "undeployed") that is only inst... | 0 | 0 | 0 | 0 | 2011-01-19T03:00:00.000 | 2 | 0 | false | 4,731,352 | 0 | 0 | 1 | 1 | I have an initial_data fixture that I want to load everytime except for production. I already have different settings file for production and non-production deployments.
Any suggestions on how to accomplish this?
Clarification: I do not want test fixtures. Basically, I just need the fixture to be loaded based on a sett... |
How can I schedule an email to be sent at some point in the future in django? | 4,731,583 | 3 | 2 | 5,173 | 0 | python,django,email,schedule | I would set up a cron job which could handle everything you want to do... | 0 | 0 | 0 | 1 | 2011-01-19T03:16:00.000 | 5 | 0.119427 | false | 4,731,419 | 0 | 0 | 1 | 2 | I want to schedule an email to be sent to a user upon a specific action.
However, if the user takes another action I want to cancel that email and have it not send.
How would I do that in django or python? |
How can I schedule an email to be sent at some point in the future in django? | 4,741,503 | 0 | 2 | 5,173 | 0 | python,django,email,schedule | You said that you want to do it through Python or Django, but it seems as though something else will need to be involved. Considering you are on a shared host, there is a chance installing other packages could also be a problem.
Another possible solution could be something like this:
Use a javascript framework which ca... | 0 | 0 | 0 | 1 | 2011-01-19T03:16:00.000 | 5 | 0 | false | 4,731,419 | 0 | 0 | 1 | 2 | I want to schedule an email to be sent to a user upon a specific action.
However, if the user takes another action I want to cancel that email and have it not send.
How would I do that in django or python? |
Getting Java to talk to Python, C, C++, and Ruby | 4,737,502 | 1 | 2 | 1,579 | 0 | java,c++,python,c,ruby | You should probably use a standard interprocess mechanism like a pipe or socket.
All of these languages have libraries available for both, and this strategy allows communication between any 2 of your processes (Java/Ruby, Ruby/Python, Java/C, etc) | 0 | 1 | 0 | 0 | 2011-01-19T14:56:00.000 | 3 | 0.066568 | false | 4,736,698 | 0 | 0 | 1 | 2 | I have succeeded in getting ProcessBuilder to run external scripts, but I still have to get Java to communicate with the external scripts. I figure that I should get the input/output streams from the process, and use those to send and receive data. I'm having a the most trouble with giving input to the scripts. It seem... |
Getting Java to talk to Python, C, C++, and Ruby | 4,737,732 | 2 | 2 | 1,579 | 0 | java,c++,python,c,ruby | The method getOutputStream() on the Process class returns a stream you can write to in Java that connects to the stdin stream of the process. You should be able to read this as you would normally read stdin for each language (e.g., cin for C++, scanf for C, STDIN.read for Ruby, don't know Python!)
If this is what you'r... | 0 | 1 | 0 | 0 | 2011-01-19T14:56:00.000 | 3 | 1.2 | true | 4,736,698 | 0 | 0 | 1 | 2 | I have succeeded in getting ProcessBuilder to run external scripts, but I still have to get Java to communicate with the external scripts. I figure that I should get the input/output streams from the process, and use those to send and receive data. I'm having a the most trouble with giving input to the scripts. It seem... |
public private key solution for javascript and python | 4,738,545 | 0 | 1 | 401 | 0 | javascript,python,encryption,pgp | Use SSL for your connections to the server. Probably the easiest way to do that is to use HTTP for communication and also to run a proxy (say, Apache) on the server that can do HTTPS and forwards requests to the actual server application. | 0 | 0 | 1 | 1 | 2011-01-19T16:17:00.000 | 1 | 0 | false | 4,737,721 | 0 | 0 | 1 | 1 | I'm looking for a public private key solution that I can use with a javascript client and python backend. The aim is to send data encrypted from the client to the server... Are the any solutions? Thanks for hints. |
How much do imports slow down Django? | 4,742,356 | 4 | 3 | 282 | 0 | python,django | It will slow down startup (actually, whatever loads the file containing those imports the first time will be slowed down).
Assuming django does not do that for every request but only once, it is not an issue at all. | 0 | 0 | 0 | 0 | 2011-01-20T00:35:00.000 | 2 | 1.2 | true | 4,742,338 | 0 | 0 | 1 | 2 | What if I'm importing 100 things ?
(In the top of my views.py)
And then inside each of them, I'm importing 30 things.
Will that slow things down? |
How much do imports slow down Django? | 4,742,347 | 3 | 3 | 282 | 0 | python,django | Only the first time they're imported in the process. After that, all that happens is that a reference is copied to the local scope. | 0 | 0 | 0 | 0 | 2011-01-20T00:35:00.000 | 2 | 0.291313 | false | 4,742,338 | 0 | 0 | 1 | 2 | What if I'm importing 100 things ?
(In the top of my views.py)
And then inside each of them, I'm importing 30 things.
Will that slow things down? |
How to serve file in webpy? | 9,408,237 | 1 | 8 | 12,091 | 0 | python,web.py | I don't recommend serving static files with web.py. You'd better have apache or nginx configured for that. | 0 | 0 | 0 | 0 | 2011-01-20T19:21:00.000 | 4 | 0.049958 | false | 4,751,508 | 0 | 0 | 1 | 1 | I am using webpy framefork. I want to serve static file on one of requests. Is there special method in webpy framework or I just have to read and return that file? |
Track small differences in 5 files with Mercurial? | 4,752,795 | 1 | 2 | 67 | 0 | python,apache,mercurial,dvcs | I don't think you can; that's not a common thing to do in a VCS. If I'm wrong, I'm happy to be corrected.
Perhaps you can make the "master" httpd.conf file a template, and have a build script that generates the five files you want, passing in the appropriate port number for each file. That way you isolate the change ... | 0 | 0 | 1 | 0 | 2011-01-20T21:18:00.000 | 3 | 0.066568 | false | 4,752,695 | 0 | 0 | 1 | 1 | I have five httpd.conf files which differ only in the port number that they are listening on. All of the other data between the sites is the same. Is there any way to track this as a single file in Mercurial? So that if I make a different change to the httpd.conf file, I could push this to all five, and keep the port n... |
Django and Python handle changing date format | 4,754,791 | 1 | 0 | 650 | 0 | python,django,date,django-models | When you convert the date string into a datetime object, you'll likely use datetime.strptime with the format argument. I would ask the user what format they use and/or store it in the database (and by that I mean allow them to choose the format they want). | 0 | 0 | 0 | 0 | 2011-01-21T01:51:00.000 | 2 | 0.099668 | false | 4,754,682 | 0 | 0 | 1 | 1 | Im importing records from a CSV file into a django model. The CSV file is uploaded by the user. The problem I'm facing is with the date field.
The date field expects the date to be in YYYY-MM-DDbut different spreadsheet programs default to different types of formats and I dont want the user to have to change their defa... |
What is the best Google App Engine blobstore workflow? | 4,775,721 | 0 | 3 | 681 | 0 | python,google-app-engine,forms,file-upload,blobstore | The solution I've come up with for this is not the prettiest but it gets the job done. On the upload view (view that is specified in the create_upload_url function) I'm passing the post variables to the same form class from the first page. If the form is valid I'm saving the variables along with the BlobInfo.key to the... | 0 | 1 | 0 | 0 | 2011-01-21T21:46:00.000 | 1 | 0 | false | 4,764,129 | 0 | 0 | 1 | 1 | What is the best workflow for uploading file to the blobstore while saving information about the blob and other fields to a model record?
For example, should I submit the form to the blobstore upload url (blobstore.create_upload_url), clean the form, redirect if errors and save and redirect if not?
What is the best w... |
Good way to generate GUIDs on app engine? | 4,764,511 | 0 | 8 | 3,107 | 0 | python,google-app-engine,guid | Any chance they are guid's for things you're storing in the datastore?
If so, I believe object.key is a GUID | 0 | 1 | 0 | 0 | 2011-01-21T22:26:00.000 | 5 | 0 | false | 4,764,474 | 0 | 0 | 1 | 1 | I was wondering if anyone knows of a good way to generate GUIDs on python google app engine. I feel like there is a simple way that people are using, what would you suggest. |
django-uni-form helpers and CSRF tags over POST | 4,883,410 | 3 | 3 | 753 | 0 | python,django,uniform | Have you checked the source? It should already be there. The uni_form template tag should include it automatically. | 0 | 0 | 0 | 0 | 2011-01-22T22:55:00.000 | 4 | 1.2 | true | 4,771,169 | 0 | 0 | 1 | 2 | I'm using django-uni-forms to display my fields, with a rather rudimentary example straight out of their book.
When I render the form fields using <form>{%csrf_tag%} {%form|as_uni_form%}</form>, everything works as expected.
However, django-uni-form Helpers allow you to generate the form tag (and other helper-related c... |
django-uni-form helpers and CSRF tags over POST | 8,118,393 | 1 | 3 | 753 | 0 | python,django,uniform | Use the most recent version of django-uni-form. It fixes this and so much more. | 0 | 0 | 0 | 0 | 2011-01-22T22:55:00.000 | 4 | 0.049958 | false | 4,771,169 | 0 | 0 | 1 | 2 | I'm using django-uni-forms to display my fields, with a rather rudimentary example straight out of their book.
When I render the form fields using <form>{%csrf_tag%} {%form|as_uni_form%}</form>, everything works as expected.
However, django-uni-form Helpers allow you to generate the form tag (and other helper-related c... |
Detecting password encryption type --can I import them into Django? | 4,773,413 | 4 | 0 | 657 | 0 | java,python,passwords,md5,sha1 | In general, you will need to know the exact algorithm used by the Java program. Then you would be able to recreate the same results in Python. (You cannot get the plain-text password from the hash, without using brute-force, but you should be able to recreate the same hashing algorithm, so you can verify a user's passw... | 0 | 0 | 0 | 0 | 2011-01-23T10:39:00.000 | 1 | 1.2 | true | 4,773,381 | 0 | 0 | 1 | 1 | I have a legacy system with passwords that look like this 115c28e0578f262bde08e3de39ee9066. Im not quite sure if they were created with md5 or crypt or... It was a java application that created them.
My new system is in Python (Django) and I tried to run a comparison check on a known password using md5(), sha1() and cr... |
Python web framework with CRUD powered by AJAX | 4,774,688 | 6 | 6 | 7,870 | 0 | python,ajax,crud,web-frameworks,turbogears | Most of the modern frameworks, like TG, Django or Flask support CRUD-style applications. But none of those are that much abstract, that you can give them a model, and there you have your ajaxy db manipulation templates and validations.
Django has django-admin and a great form builder and helper module; Flask can work ... | 0 | 0 | 0 | 0 | 2011-01-23T15:40:00.000 | 2 | 1 | false | 4,774,641 | 0 | 0 | 1 | 1 | I am looking for a Python web framework which will allow me to rapidly build a CRUD application with automatic AJAX support.
The framework should be able to generate a nice table which is sortable and filterable, which works via AJAX and without JS support at all as well.
I have looked at TurboGears2 and it seems promi... |
View with data from many databases | 4,775,514 | 1 | 0 | 90 | 0 | python,database,django,distributed | It seems to me that your application has a pretty ugly architecture. Try to refactor it or you will have troubles.
Anyway, you can try to cache your suppliers' data to your own database (single) and save some resources. | 0 | 0 | 0 | 0 | 2011-01-23T17:55:00.000 | 1 | 0.197375 | false | 4,775,375 | 0 | 0 | 1 | 1 | I'm building site in django, which lists items of many suppliers. Each supplier has own big database and make changes quite often. I have to be aware of all changes in no more than 60 minutes. There are about 10m items to display. How to implement all that in a efficient way? |
Easiest way to share work between backend and front end | 4,777,646 | 1 | 1 | 181 | 0 | python,django,installation | Get him to set up a virtual machine on his Mac, using VMWare Fusion or Parallels, running the same operating system that you currently use for your back end. If he prefers developing using Mac tools he can do still that by sharing his local changes to the virtual machine via a shared directory. | 0 | 1 | 0 | 0 | 2011-01-23T23:25:00.000 | 3 | 0.066568 | false | 4,777,262 | 0 | 0 | 1 | 2 | Hey everyone,
I am expanding my team and I have recently added an additional front end engineer on my site. I am currently using django to run my site but my site is using a lot of plugins, namely: django-celery, django-mailer, django-notification, and django-socialregistration.
Let me describe my situation:
He is us... |
Easiest way to share work between backend and front end | 4,777,381 | 0 | 1 | 181 | 0 | python,django,installation | An alternative, if that's possible, would be to set up a testing/development environment on a machine with an OS you're familiar with, then install something like Dropbox on his local machine where he can develop the frontend code, and install Dropbox on that other environment with the backend components. Dropbox would... | 0 | 1 | 0 | 0 | 2011-01-23T23:25:00.000 | 3 | 0 | false | 4,777,262 | 0 | 0 | 1 | 2 | Hey everyone,
I am expanding my team and I have recently added an additional front end engineer on my site. I am currently using django to run my site but my site is using a lot of plugins, namely: django-celery, django-mailer, django-notification, and django-socialregistration.
Let me describe my situation:
He is us... |
Django-ratings and Jquery integration? | 4,777,733 | 0 | 1 | 759 | 0 | jquery,python,django | You are right,its a basic Ajax, but you might have a complex algorithm to figure out the number of stars as | 0 | 0 | 0 | 0 | 2011-01-24T00:37:00.000 | 3 | 0 | false | 4,777,592 | 0 | 0 | 1 | 1 | How do I make django-ratings work with Jquery?
What I'm trying to do is allow the user to select how ever many stars they want to give the product, and to have the corresponding rating processed asynchronously. I realize this is probably basic AJAX, and I apologize if this is a stupid question.
Thank you in advanced. |
SQLAlchemy - difference between mapped orm.relation with backref or two orm.relation from both sides | 5,594,860 | 1 | 0 | 664 | 1 | python,database,sqlalchemy,relation | I found the answer myself by now:
If you use an orm.relation from each side and no backrefs, you have to use back_populates or if you mess around at one side, it won't be properly updated in the mapping on the other side.
Therefore, an orm.relation from each side instead of an automated backref IS possible but you have... | 0 | 0 | 0 | 0 | 2011-01-24T13:10:00.000 | 1 | 0.197375 | false | 4,782,344 | 0 | 0 | 1 | 1 | In some project I implement user-requested mapping (at runtime) of two tables which are connected by a 1-to-n relation (one table has a ForeignKey field).
From what I get from the documentation, the usual way is to add a orm.relation to the mapped properties with a mapped_collection as collection_class on the non-forei... |
In Django, how do I check if a user is in a certain group? | 50,211,377 | 0 | 179 | 149,841 | 0 | python,django,django-authentication | User.objects.filter(username='tom', groups__name='admin').exists()
That query will inform you user : "tom" whether belong to group "admin " or not | 0 | 0 | 0 | 0 | 2011-01-25T01:09:00.000 | 13 | 0 | false | 4,789,021 | 0 | 0 | 1 | 2 | I created a custom group in Django's admin site.
In my code, I want to check if a user is in this group. How do I do that? |
In Django, how do I check if a user is in a certain group? | 32,197,405 | 11 | 179 | 149,841 | 0 | python,django,django-authentication | If a user belongs to a certain group or not, can be checked in django templates using:
{% if group in request.user.groups.all %}
"some action"
{% endif %} | 0 | 0 | 0 | 0 | 2011-01-25T01:09:00.000 | 13 | 1 | false | 4,789,021 | 0 | 0 | 1 | 2 | I created a custom group in Django's admin site.
In my code, I want to check if a user is in this group. How do I do that? |
PyFlakes for Javascript? | 4,793,157 | 1 | 1 | 439 | 0 | javascript,python,jslint,pyflakes | In JSLInt there is an 'Assume Rhino' option on JSLint which, when set to true assumes that Rhino is present and, therefore, that the global properties it provides have been defined. I believe that this is 'false' by default.
But as for a dependency, no, JSLint not dependent on Rhino.
I've not used PyFlakes or PyLint, b... | 0 | 0 | 0 | 0 | 2011-01-25T11:18:00.000 | 2 | 0.099668 | false | 4,792,847 | 1 | 0 | 1 | 1 | Is there any such standalone package for Javascript, like PyFlakes for Python? I see there is JsLint, but it looks like it depends on some external things like Rhino.
I prefer something basic&compact like PyFlakes, because it shows me 80% of bugs I make and has only 20% (or even less) of complexity of other tools like ... |
Django - decorators and error messages | 4,800,739 | 0 | 2 | 1,700 | 0 | python,django | You will send the user an automatic error message.. You'd have to look how to over-ride.. | 0 | 0 | 0 | 0 | 2011-01-26T01:30:00.000 | 3 | 0 | false | 4,800,650 | 0 | 0 | 1 | 1 | This seems like a simple question but I can't seem to find a simple answer. Django seems to give this nifty simple way of limiting access to places using the permission required or login required decorators but I can't see from the Django docs how one would pass an error message (maybe using the messages framework). ... |
can web2py support RESTful api calls? if so any pointers on how to build one?I | 4,809,129 | 2 | 2 | 990 | 0 | iphone,python,cocoa,restful-authentication,web2py | I think you should post it to web2py group on google groups.
web2py@googlegroups.com | 0 | 0 | 0 | 0 | 2011-01-26T03:40:00.000 | 2 | 1.2 | true | 4,801,216 | 0 | 0 | 1 | 1 | I want to configure a simple webapplication to support an iphone app to connect with it in RESTFUL ways. Initially have a user login session enabled from the iphone to the web app. I'd like the iphone app to send a NSURL call to the webapp, with user and password and have the webapp respond if the suer exists or not. P... |
My settings.py file in Django is getting too long. How do I split it into two? | 4,801,807 | 0 | 2 | 1,749 | 0 | python,django | Create new_settings.py file to contain part of settings.py, and import that file wherever you need it. | 0 | 0 | 0 | 0 | 2011-01-26T04:24:00.000 | 4 | 0 | false | 4,801,395 | 0 | 0 | 1 | 1 | How do I do that? split up 2 files? |
How do I flush everything from Celery? | 4,803,074 | 7 | 2 | 724 | 0 | python,django,celery | Have you tried to restart the celery service with --discard parameter ? | 0 | 1 | 0 | 0 | 2011-01-26T09:09:00.000 | 1 | 1.2 | true | 4,802,807 | 0 | 0 | 1 | 1 | I accidently added too many things to the queue, and now it froze.
Can't get it to do anything else. |
What libraries exist for creating raw multipart emails? | 4,803,954 | 1 | 1 | 220 | 0 | java,jquery,python,ruby,email | Python has modules both for creating and sending emails in the standard library. Don't know about Java or Ruby. For generating HTML I'd use some HTML template language. There are tons of them for Python. Pick one you like. | 0 | 0 | 0 | 1 | 2011-01-26T10:30:00.000 | 4 | 1.2 | true | 4,803,499 | 0 | 0 | 1 | 1 | I would like to ideally set up a user interface for designing emails that include text, html, and images, and would like this interface to output the raw encoded email so I can then pipe it to my mail application, save it in a database, etc..
Are there any libraries that I could look at for generating raw emails, and... |
Automatic indexes for expando properties in the google app engine for python | 4,812,503 | 4 | 3 | 663 | 0 | python,google-app-engine,expando | All properties are automatically indexed for simple queries. Simple queries, in this case, are those that either:
Use only equality filters, with no sort orders or inequality filters.
Have an inequality filter or sort order on a single field, with no other filters.
If you want to do more complex queries - such as one... | 0 | 1 | 0 | 0 | 2011-01-26T17:46:00.000 | 1 | 1.2 | true | 4,807,957 | 0 | 0 | 1 | 1 | The google app engine python sdk offers an Expando type object which can be used for adding dynamic properties to an object that can be persisted to the datastore.
The app engine also requires that for any property on which the objects need to be searched or sorted, an index must be created before uploading the app to ... |
Reading session/cookies from WSGI | 4,815,445 | 2 | 2 | 1,810 | 0 | python,session,wsgi | It's created by the session middle ware. There are no such thing as sessions in http itself. It's usually done by setting a cookie, but can be done in other ways too.
So to answer the question of "when" it is created this is typically done by the session middleware, when it gets a request that does not already have a ... | 0 | 0 | 0 | 0 | 2011-01-27T10:53:00.000 | 2 | 0.197375 | false | 4,815,390 | 0 | 0 | 1 | 1 | Is there any way to retrieve sessions right from the WSGI (using a middleware)?
I know that it depends on your SessionMiddleware but I wonder if there are hints to figure out when a session is created. |
Will learning Django translates well into other applications? | 4,819,617 | 0 | 2 | 221 | 0 | python,django,zend-framework | I love python as a language - but it's not the answer to everything. I know this is throwing mud in a python group, but python has one serious limitation - the rigid source code format.
While going through a django tutorial - I noticed that you cannot insert python source code into a template, and that this was pres... | 0 | 0 | 0 | 0 | 2011-01-27T13:15:00.000 | 3 | 0 | false | 4,816,766 | 0 | 0 | 1 | 3 | Does anyone have experience using Python in different variaty of applications?
A little background - I am a 3D artist in an animation studio. I do programming in PHP and use Zend framework for my personal project. Python has always been a language I wanted to learn because it can be used within many applications our s... |
Will learning Django translates well into other applications? | 4,818,297 | 0 | 2 | 221 | 0 | python,django,zend-framework | I found Django a really good way to learn python. There's very little that's quirky, magical or un-pythonic in the framework. A bit of setup and you're away, writing standard python code. | 0 | 0 | 0 | 0 | 2011-01-27T13:15:00.000 | 3 | 0 | false | 4,816,766 | 0 | 0 | 1 | 3 | Does anyone have experience using Python in different variaty of applications?
A little background - I am a 3D artist in an animation studio. I do programming in PHP and use Zend framework for my personal project. Python has always been a language I wanted to learn because it can be used within many applications our s... |
Will learning Django translates well into other applications? | 4,817,767 | 0 | 2 | 221 | 0 | python,django,zend-framework | So if I learn Python with web application and Django in mind, will that limit my Python skill from applying it to other applications?
No
authenticate against Windows active directory
Yes. You may need to customize an Authentication Backend.
quick database update via AJAX interaction (drag and drop time line mostly... | 0 | 0 | 0 | 0 | 2011-01-27T13:15:00.000 | 3 | 0 | false | 4,816,766 | 0 | 0 | 1 | 3 | Does anyone have experience using Python in different variaty of applications?
A little background - I am a 3D artist in an animation studio. I do programming in PHP and use Zend framework for my personal project. Python has always been a language I wanted to learn because it can be used within many applications our s... |
dev_appserver.py doesn't recognize my files | 14,570,507 | 2 | 1 | 2,131 | 0 | python,google-app-engine | I had the same problem.
Adding python.exe in front of dev_appserver.py solved the problem for me.
c:\Programme\Python27\python.exe C:\Programme\Google\AppEngineSDK\google_appengine\dev_appserver.py MoviesBwu\ | 0 | 1 | 0 | 0 | 2011-01-28T00:17:00.000 | 3 | 0.132549 | false | 4,823,466 | 0 | 0 | 1 | 1 | I'm trying to get a basic GAE tutorial to work with Windows 7.
So far I have:
Installed python 2.5.4
Installed the current GAE SDK
Set my PATH varible to include python and the GAE
Created a "hello, world" app with an app.yaml and main.py file as specified.
When I call dev_appserver.py . in my app's directory or dev_... |
What is the best method to tranfer data to a server from code | 4,834,228 | 0 | 0 | 79 | 0 | python,django,web-services | This is what RESTful web services are all about.
Your web server does two things.
"displays the data". Presumably via HTML web pages. But maybe not. The question is too vague.
Collects the data created by your application "that generates a lot of data in time". This is ordinary REST requests, usually using a POST,... | 0 | 0 | 0 | 0 | 2011-01-28T21:38:00.000 | 2 | 0 | false | 4,833,299 | 0 | 0 | 1 | 2 | I'm writing two Django applications: one that generates a lot of data in time, and another part that displays it. The app that generate it will run on a machine at my home and the one that displays the data will be a machine on the internet.
What do you believe it will be the best way to transfer the data from the appl... |
What is the best method to tranfer data to a server from code | 4,833,366 | 0 | 0 | 79 | 0 | python,django,web-services | Setup two databases - one master and one slave. Write on the master and make the slave to sync with the master. This way you will not need to worry when your connection is down. | 0 | 0 | 0 | 0 | 2011-01-28T21:38:00.000 | 2 | 1.2 | true | 4,833,299 | 0 | 0 | 1 | 2 | I'm writing two Django applications: one that generates a lot of data in time, and another part that displays it. The app that generate it will run on a machine at my home and the one that displays the data will be a machine on the internet.
What do you believe it will be the best way to transfer the data from the appl... |
Simple way to delete users account? | 4,837,665 | 0 | 1 | 405 | 0 | python,django,web | Can You Explain What kind of application you Use? If you use some kind of database with your application then simply run delete query with some specific condition | 0 | 0 | 0 | 1 | 2011-01-29T15:11:00.000 | 2 | 0 | false | 4,837,591 | 0 | 0 | 1 | 1 | Is there a simple way or code to delete the account from a user? I want to delete the username, email address, first_name, last_name and the profile-data.
I do have two apps
Thanks! |
Werkzeug without ORM | 4,838,669 | 0 | 1 | 445 | 1 | python,orm,werkzeug | Is it a problem to use normal DB API, issue regular SQL queries, etc? cx_Oracle even has connection pooling biolt in to help you manage connections. | 0 | 0 | 0 | 0 | 2011-01-29T18:09:00.000 | 3 | 0 | false | 4,838,528 | 0 | 0 | 1 | 1 | How do I use the Werkzeug framework without any ORM like SQLAlchemy? In my case, it's a lot of effort to rewrite all the tables and columns in SQLAlchemy from existing tables & data.
How do I query the database and make an object from the database output?
In my case now, I use Oracle with cx_Oracle. If you have a solut... |
Import error when trying to access sdk datastore admin | 4,841,024 | 2 | 1 | 769 | 0 | python,google-app-engine | Use from django.utils import simplejson.
dev_appserver mimics the production environment. Nothing you install at the system level will be available for import to your scripts, to avoid imports working fine in your testing and then failing spectacularly when you deploy. However, you don't need to bundle this particula... | 0 | 1 | 0 | 0 | 2011-01-29T22:04:00.000 | 3 | 0.132549 | false | 4,839,749 | 0 | 0 | 1 | 2 | I'm getting a "ImportError: No module named simplejson" when trying to access datastore admin on the development server.
After the first time I got this error I installed the simplejson package from slackbuilds (i'm on Slackware). It seems to be working normally, I could import the simplejson module with no errors on t... |
Import error when trying to access sdk datastore admin | 27,462,399 | 0 | 1 | 769 | 0 | python,google-app-engine | If it in app engine SDK's lib, e.g on Mac it's
/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/
Copy it over to app's dir would work. It's better than pip install and then copy over, which may contain c-extension. The modules in SDK's l... | 0 | 1 | 0 | 0 | 2011-01-29T22:04:00.000 | 3 | 0 | false | 4,839,749 | 0 | 0 | 1 | 2 | I'm getting a "ImportError: No module named simplejson" when trying to access datastore admin on the development server.
After the first time I got this error I installed the simplejson package from slackbuilds (i'm on Slackware). It seems to be working normally, I could import the simplejson module with no errors on t... |
rich web client vs thin web client | 4,842,562 | 1 | 2 | 993 | 0 | python,ajax,web-applications,user-interface,pyjamas | The biggest influence is whether you are concerned about initial page load time. If you don't mind having all the UI there at page load, your app can be more responsive by just shuttling data instead of UI. If you want faster load and don't mind larger AJAX requests, sending some UI markup isn't bad. If you have the se... | 0 | 0 | 1 | 0 | 2011-01-30T10:44:00.000 | 4 | 0.049958 | false | 4,842,449 | 0 | 0 | 1 | 3 | I have one design decision to make.
In my web(ajax) application we need to decide where should we put user interface logic ?
Should It be completely loaded via javascript ( pure single page ) . and Only data comes and go.
or
Should server send some format (XML) which translated via javascript to dynamically create... |
rich web client vs thin web client | 4,844,422 | 2 | 2 | 993 | 0 | python,ajax,web-applications,user-interface,pyjamas | I faced similar dilemma few months back. As Lennart (above) says it makes sense to go for pyjamas or similar library if your app is more desktopish.
Further one of the biggest advantage of pyjamas provide is logically well separated backend and frontend code. IMO that is very important.
If your app is not like a deskt... | 0 | 0 | 1 | 0 | 2011-01-30T10:44:00.000 | 4 | 0.099668 | false | 4,842,449 | 0 | 0 | 1 | 3 | I have one design decision to make.
In my web(ajax) application we need to decide where should we put user interface logic ?
Should It be completely loaded via javascript ( pure single page ) . and Only data comes and go.
or
Should server send some format (XML) which translated via javascript to dynamically create... |
rich web client vs thin web client | 4,886,016 | 0 | 2 | 993 | 0 | python,ajax,web-applications,user-interface,pyjamas | Which option is better ? ( speed, ease of development, platform independence )
Platform independence, if you mean cross-browser compatibility, is a HUGE reason to use pyjamas because the python code includes a sane override infrastructure which handles everything for you. No more JS compatibility classes.
Anyway Pyjam... | 0 | 0 | 1 | 0 | 2011-01-30T10:44:00.000 | 4 | 0 | false | 4,842,449 | 0 | 0 | 1 | 3 | I have one design decision to make.
In my web(ajax) application we need to decide where should we put user interface logic ?
Should It be completely loaded via javascript ( pure single page ) . and Only data comes and go.
or
Should server send some format (XML) which translated via javascript to dynamically create... |
Django does not install correctly on windows machine | 4,848,949 | 1 | 2 | 469 | 0 | python,windows,django | The default behavior for cmd is to simply "open" the file, which in the case of .py for you is associated with a text editor (me too). Try python django-admin.py startproject.
To make it fool proof, locate your python.exe and type in \path\to\python.exe \path\to\django-admin.py startproject myproject
Actually, you said... | 0 | 0 | 0 | 0 | 2011-01-31T08:35:00.000 | 4 | 0.049958 | false | 4,848,907 | 0 | 0 | 1 | 3 | In my windows I'm able to install the django by running the python file setup.py install.
But after that, I'm unable to start a project by saying django-admin.py startproject newsite. All it gives me is opening a textfile showing the django-admin.py!
Show me a way out guys |
Django does not install correctly on windows machine | 5,925,065 | 0 | 2 | 469 | 0 | python,windows,django | I solved this as follows:
Added this to the end of my User Variable PATH: C:\Python27;C:\Python27\Scripts
Added a new System Variable PYTHONPATH and set to: c:\Python27\Lib;c:\Python27\Scipts
Be sure that you close all cmd windows and open a new cmd prompt window after you've set your new environment variables.
Hope ... | 0 | 0 | 0 | 0 | 2011-01-31T08:35:00.000 | 4 | 0 | false | 4,848,907 | 0 | 0 | 1 | 3 | In my windows I'm able to install the django by running the python file setup.py install.
But after that, I'm unable to start a project by saying django-admin.py startproject newsite. All it gives me is opening a textfile showing the django-admin.py!
Show me a way out guys |
Django does not install correctly on windows machine | 16,140,424 | 0 | 2 | 469 | 0 | python,windows,django | Well well ..I was just having the same problem..and the problem was not related to any path variables.
The Problem was because of the default python viewer wingIDE. I had changed the default opening of python file from IDLE to wing IDE, this was the problem.
To solve this ..
click any python file and open its proper... | 0 | 0 | 0 | 0 | 2011-01-31T08:35:00.000 | 4 | 0 | false | 4,848,907 | 0 | 0 | 1 | 3 | In my windows I'm able to install the django by running the python file setup.py install.
But after that, I'm unable to start a project by saying django-admin.py startproject newsite. All it gives me is opening a textfile showing the django-admin.py!
Show me a way out guys |
Authentication using any OpenID with Tipfy | 4,852,004 | 2 | 9 | 790 | 0 | python,google-app-engine,openid,tipfy | That code is just an example. You just need to allow the user to specify their OpenID provider's endpoint URL via a form, and get the value from the POST. It's just a string. | 0 | 0 | 0 | 0 | 2011-01-31T13:43:00.000 | 2 | 0.197375 | false | 4,851,536 | 0 | 0 | 1 | 1 | I am developing the authentication part of my app and I've run into issues with coding authentication using OpenID.
I've looked at the Tipfy example code, but it seems written under the assumption that the OpenID provider is hard-coded to google.
I would like the user to be able to provide any OpenID they desire (isn't... |
How can you limit the allowed execution time of specific methods in the python version of Google App Engine? | 4,862,285 | 0 | 4 | 257 | 0 | python,google-app-engine | In loops, you can store the time the loop started and check how long it's been going on each iteration.
If you're not in a loop, things are a bit trickier. You could add the time-checking bit every few lines of code. This, of course, makes for really ugly code, but without the ability to spawn threads that could run a... | 0 | 1 | 0 | 0 | 2011-02-01T06:46:00.000 | 2 | 0 | false | 4,859,734 | 0 | 0 | 1 | 1 | Since the signal module is not supported in the python version of Google App Engine, what is the simplest way to call a method and throw/catch an exception if the method does not return in less than 2 seconds? |
Programmatically add URL Patterns in Django? | 4,868,840 | 4 | 12 | 4,070 | 0 | python,django,django-admin,django-urls,django-settings | If you use gunicorn without code preloading, just send a HUP to the gunicorn master process, it will spawn new workers which load the new code, and gracefully shut down the old ones, without a single lost request! | 0 | 0 | 0 | 0 | 2011-02-01T18:56:00.000 | 4 | 0.197375 | false | 4,866,750 | 0 | 0 | 1 | 1 | Is there a way to programmatically add URL Patterns to Django without having to restart the server?
Or is there a way force Django to reprocess/cache URL patterns ( the URLconf )? |
Memcache not present in App-Engine-Patch? | 4,870,311 | 1 | 1 | 1,200 | 0 | google-app-engine,memcached,app-engine-patch,python-memcached | It looks like you're attempting to make a memcache call at import time. Judging from the stacktrace, Django imports your modules before it sets up the App Engine environment, and therefore any calls to App Engine services at the module level will fail on the development server.
Move the call to memcache inside a functi... | 0 | 1 | 0 | 0 | 2011-02-02T02:03:00.000 | 1 | 1.2 | true | 4,870,102 | 0 | 0 | 1 | 1 | I'm trying to store a date into memcache using the following code:
from datetime import date
from google.appengine.api.memcache import Client
MEMCACHE_DATE_KEY = 'date'
client = Client()
def last_date():
return client.get(MEMCACHE_DATE_KEY)
def new_date():
client.set(MEMCACHE_DATE_KEY, date.today())
I am ... |
Set Hudson Build Description via Web API | 32,389,162 | 0 | 5 | 2,645 | 0 | python,hudson,hudson-api | Here is the curl command that worked fine from shell. Replace the text in between and including {}.
curl -X POST -u {user:password} -H 'Content-Type: application/x-www-form-urlencoded' --data-urlencode description={descriptionstring} {hudsonurl}/job/{jobname}/{buildnumber}/submitDescription | 0 | 0 | 0 | 0 | 2011-02-02T02:23:00.000 | 4 | 0 | false | 4,870,187 | 0 | 0 | 1 | 1 | I have a Python script that operates on Hudson builds and would love to be able to set the description of a build programmatically.
I can click "Add Description" on a build's page and fill in the form, how can I POST some data to the same URL that form does? |
Considerations for moving our web app to an appliance | 4,872,968 | 0 | 3 | 124 | 0 | python,appliance | It depends on what langauge/tecnology application is written.
If it is java, release war file + tomcat/jboss.
If it is python, release eggs.
If it is php... not sure, probably just .tar.bz2.
Linux distro or virtual image mught be advantage, but I dislike using them, because they are usually does not fits to my infra (w... | 0 | 1 | 0 | 1 | 2011-02-02T09:33:00.000 | 2 | 0 | false | 4,872,722 | 0 | 0 | 1 | 1 | We have developed a web application running on Linux that is quite popular. We now wish to release it as an appliance so customers can run it internally on their own networks.
We are unsure of the best approach. We are flexible on areas such as: the Linux distro, whether it's a hardware or software only appliance. Doe... |
Recursive use of Scrapy to scrape webpages from a website | 4,889,635 | 0 | 1 | 1,171 | 0 | python,web-scraping,scrapy | Why don't you want to add all the links to 50 pages? Are the URLs of the pages consecutive like www.site.com/page=1, www.site.com/page=2 or are they all distinct? Can you show me the code that you have now? | 0 | 0 | 1 | 0 | 2011-02-02T16:08:00.000 | 2 | 0 | false | 4,876,799 | 0 | 0 | 1 | 2 | I have recently started to work with Scrapy. I am trying to gather some info from a large list which is divided into several pages(about 50). I can easily extract what I want from the first page including the first page in the start_urls list. However I don't want to add all the links to these 50 pages to this list. I ... |
Recursive use of Scrapy to scrape webpages from a website | 4,940,212 | 1 | 1 | 1,171 | 0 | python,web-scraping,scrapy | use urllib2 to download a page. Then use either re (regular expressions) or BeautifulSoup (an HTML parser) to find the link to the next page you need. Download that with urllib2. Rinse and repeat.
Scapy is great, but you dont need it to do what you're trying to do | 0 | 0 | 1 | 0 | 2011-02-02T16:08:00.000 | 2 | 0.099668 | false | 4,876,799 | 0 | 0 | 1 | 2 | I have recently started to work with Scrapy. I am trying to gather some info from a large list which is divided into several pages(about 50). I can easily extract what I want from the first page including the first page in the start_urls list. However I don't want to add all the links to these 50 pages to this list. I ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.