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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Creating and transferring a site with Django | 18,824,626 | 0 | 0 | 58 | 0 | python,django | Of course that's possible and in fact it's the only way to "go live". You don't want to develop in your live server, do you? And it's true for any platform, not just django.
If I understood your question correctly, you need a system to push your development code to live.
Use a version control system: git, svn, mercuri... | 0 | 0 | 0 | 0 | 2013-09-16T07:07:00.000 | 2 | 0 | false | 18,822,193 | 0 | 0 | 1 | 2 | As a fledgling Django developer, I was wondering if it was customary, or indeed possible, to create a site with Django then transfer the complete file structure to a different machine where it would "go live".
Thanks,
~Caitlin |
Creating and transferring a site with Django | 18,822,289 | 3 | 0 | 58 | 0 | python,django | You could use GIT or Mercurial - or other version control system. To put the site structure on a central server. After that you could deploy the site for example with fabric to multiple servers. For deployment process you should consider using for example virtualenv to isolate the project from global python packages an... | 0 | 0 | 0 | 0 | 2013-09-16T07:07:00.000 | 2 | 0.291313 | false | 18,822,193 | 0 | 0 | 1 | 2 | As a fledgling Django developer, I was wondering if it was customary, or indeed possible, to create a site with Django then transfer the complete file structure to a different machine where it would "go live".
Thanks,
~Caitlin |
Scrape follow link with different scraper | 18,831,329 | 0 | 2 | 185 | 0 | python,scrapy | Identify the pattern first, then write the scraper for each pattern and then depending upon the link you are tracing use the relevant scraper function. | 0 | 0 | 1 | 0 | 2013-09-16T08:22:00.000 | 3 | 0 | false | 18,823,407 | 0 | 0 | 1 | 1 | I am scraping a web page with Scrapy. I wrote my spider and it works just fine, it scrapes a list of Items on a page (let's call it this the Main page).
In the Main page every Item I consider has a link that leads to the detail Item page (let's call it this way) where detailed information about every item is found.
N... |
create a session to another site | 18,838,114 | 0 | 0 | 61 | 0 | python,django | If you're not looking for single sign-on, then likely you want to either do the work in the view, and if you need the session to persist, store it in the (local django) session object; or outsource it to something like celery, and again, keep anything you need to keep track of in the session object. | 0 | 0 | 0 | 0 | 2013-09-16T12:20:00.000 | 2 | 0 | false | 18,827,905 | 0 | 0 | 1 | 1 | I'm developing a backend in Django and I need to log in to another server backend with a simple POST method. So I would need to create a session object or something like that to handle that login.
Any Ideas on how to do that? |
Python IDE that allows for right-click -> Go to Declaration and Find References? | 18,858,522 | 1 | 1 | 192 | 0 | python,ide | I've been using PyCharm for the past year and am very satisfied with the features included, coming from Visual Studio myself. It has got what you are requesting and more. It is not free, but there is a trial version. In my opinion money well spent.
It has also got some Django support, but I've never used it myself. | 0 | 0 | 0 | 0 | 2013-09-17T19:35:00.000 | 4 | 0.049958 | false | 18,858,421 | 1 | 0 | 1 | 3 | Is there a python IDE that allows you to right click on any method being used and select Go to Declaration or Find References, just like in Visual Studio with all of the .net languages?
I am finding it difficult to navigate another developer's django project without this ability. |
Python IDE that allows for right-click -> Go to Declaration and Find References? | 18,858,551 | 2 | 1 | 192 | 0 | python,ide | PyDev (an Eclipse Plugin) allows you to press F3 and you'll go to the highlighted element's definition.
And PyDev comes with some nice django support features like running manage.py commands, setting up apps, etc. | 0 | 0 | 0 | 0 | 2013-09-17T19:35:00.000 | 4 | 0.099668 | false | 18,858,421 | 1 | 0 | 1 | 3 | Is there a python IDE that allows you to right click on any method being used and select Go to Declaration or Find References, just like in Visual Studio with all of the .net languages?
I am finding it difficult to navigate another developer's django project without this ability. |
Python IDE that allows for right-click -> Go to Declaration and Find References? | 18,858,642 | 0 | 1 | 192 | 0 | python,ide | In windows I've been using PyScripter and like it. It brings up the function definition on mouseover and allows you to jump to it if you want. Also has 'find references' in the right click context menu. It's free. | 0 | 0 | 0 | 0 | 2013-09-17T19:35:00.000 | 4 | 0 | false | 18,858,421 | 1 | 0 | 1 | 3 | Is there a python IDE that allows you to right click on any method being used and select Go to Declaration or Find References, just like in Visual Studio with all of the .net languages?
I am finding it difficult to navigate another developer's django project without this ability. |
Should each Django app have its own server instance? | 18,862,232 | 0 | 0 | 60 | 0 | python,django | generally each of your django PROJECTS (django-admin startproject) has its own server, project is the directory containing all your apps and contains the manage.py. each app ususally doesn't because a project is composed of apps.
For developing django includes a development server you can run using runserver
python ma... | 0 | 0 | 0 | 0 | 2013-09-18T00:15:00.000 | 1 | 0 | false | 18,861,896 | 0 | 0 | 1 | 1 | I am just starting out on Django. I have successfully set it up and have it it talking to mysql and am ready to code . Inside of the eclipse IDE; should each app you are working have its own distinct server ( i.e my site) instance? Does it matter ? |
Simplifying development process for Django | 18,863,822 | 0 | 1 | 121 | 0 | python,django,git,web-deployment | As a Django developer i can assure you that it grows on you and becomes easier to understand the development environment.
You should remember that settings.py is probably going to be where your thoughts will be for quite a while in the start; the good part is that its only once, after you got it up and running you'll ... | 0 | 0 | 0 | 0 | 2013-09-18T03:18:00.000 | 1 | 0 | false | 18,863,293 | 0 | 0 | 1 | 1 | I'm a freelance editor and tutor as well as a fiction writer and artist looking to transition to the latter on a full-time basis. Naturally, part of that transition involves constructing a website; a dynamic site to which new content in various forms can be added with ease. Now, I've always intended to learn how to pro... |
Py.test skip messages don't show in jenkins | 18,894,932 | 2 | 1 | 1,231 | 0 | python,unit-testing,jenkins,pytest | I solved it using this line as the first line of the test:
pytest.skip("Bug 1234: This does not work")
I'd rather have used one of the pytest decorators, but this'll do. | 0 | 0 | 0 | 1 | 2013-09-18T08:25:00.000 | 2 | 0.197375 | false | 18,867,280 | 0 | 0 | 1 | 1 | I have a minor issue using py.test for my unit tests.
I use py.test to run my tests and output a junitxml report of the tests.
This xml report is imported in jenkins and generates nice statistics.
When I use a test class which derives from unittest.TestCase,
I skip expected failures using:
@unittest.skip("Bug 1234 : ... |
Django form imagefield appear in self.data but none in self.cleaned_data | 18,880,929 | 10 | 2 | 926 | 0 | python,django,django-forms | Make sure you have enctype="multipart/form-data" set on your html tag. And make sure you pass request.FILES into the form. For example: form = MyAwesomeForm(request.POST, request.FILES) | 0 | 0 | 0 | 0 | 2013-09-18T19:08:00.000 | 1 | 1.2 | true | 18,880,353 | 0 | 0 | 1 | 1 | I have a modelForm and imagefield in model.
Everything seems ok in form.
I put a debugger in save method of form.
self.data appears like below
<QueryDict: {u'city': [u'19105'], u'surname': [u'VARGI'], u'name': [u'Tuna'], u'image': [u'996884_10151559653258613_1077262085_n.jpg'], u'user': [u'1'], u'interest': [u''], u'... |
Can IronPython run on machine that it does not installed on? | 18,882,572 | 1 | 1 | 223 | 0 | python,wpf,ironpython | Absolutely, you just have to include the appropriate assemblies (IronPython.dll, IronPython.Modules.dll, Microsoft.Scripting.dll, and Microsoft.Dynamic.dll) and any standard library modules you may be using with your application. | 1 | 0 | 0 | 0 | 2013-09-18T19:15:00.000 | 1 | 1.2 | true | 18,880,490 | 1 | 0 | 1 | 1 | I'm new to Python (IronPython), I come from VS environment.
I want to integrate Python with WPF and I understand that IronPython is good a solution for that.
I've install IronPython on my computer, but i wonder if the project (Python+WPF) can run on a machine that IronPython is not installed on ?
My computer has: P... |
combining html front-end and python "back-end" in mobile app | 18,892,784 | 3 | 5 | 2,655 | 0 | android,python,ios,mobile,browser | You could do a very simple kivy app, that would start a service (inside which you would do your "server" side, with a small engine like flask or bottle, but i guess cherryPy should work too), and in the main.py of the "kivy" app, don't import kivy, just import webbrowser and start a browser window to localhost:your por... | 1 | 0 | 0 | 0 | 2013-09-18T23:57:00.000 | 1 | 1.2 | true | 18,884,259 | 0 | 0 | 1 | 1 | My application has an html-based front-end and uses python logic on the back-end. This application needs to run offline, not connected to the internet, so by "back-end" here I don't mean a server running remotely, but rather python logic running side-by-side in the same app as the browser/html engine. For Windows or Ma... |
Existing HTML website, but processing on Google App Engine? | 18,884,880 | 2 | 0 | 67 | 0 | python,html,google-app-engine | you can make a post request to whatever http resource you want
in your html form you can change the action to point at your gae python script
<form action="http://yourdomain/your/gae/endpoint" method="post">
You can then follow the tutorial and access the posted data accordingly. Finally, it is up to you to return an ... | 0 | 1 | 0 | 0 | 2013-09-19T01:18:00.000 | 1 | 1.2 | true | 18,884,852 | 0 | 0 | 1 | 1 | I have a website hosted already and it contains an HTML form. I want to be able to submit the form to a Python script on Google App engine to handle the data. In the documentation, there is a tutorial to process forms with Python, but it was from a page that was served in the script itself. How do I link an existing do... |
How to uninstall OpenERP-7 module in ubuntu 12.04 ? | 18,888,839 | 0 | 0 | 1,437 | 0 | python-2.7,ubuntu-12.04,openerp | uninstallation of module will surely bring up some surprises with openerp, so better to test the module for functionality and features in a test system and when you are sure about things install it in LIVE system.
For your problem, just check if there is any aeroo report is in the system, if yes delete the report and ... | 0 | 1 | 0 | 0 | 2013-09-19T07:10:00.000 | 1 | 0 | false | 18,888,331 | 0 | 0 | 1 | 1 | I am using OpenERP 7 with Ubuntu 12.04. I have been trying to install Aero Reports module for creating OpenERP reports. I faced some "XML issues " during installation.
Now when I try to remove the module it says "Integrity Error
The operation cannot be completed, probably due to the following:
- deletion: you may be tr... |
Execute selenium html tests from webdriver tests | 18,890,907 | 0 | 0 | 141 | 0 | python,selenium,webdriver | Use pySelenese module for python - it parses html test and let you run it. | 0 | 0 | 1 | 1 | 2013-09-19T07:12:00.000 | 2 | 1.2 | true | 18,888,367 | 0 | 0 | 1 | 1 | I use selenium, python webdriver to run my test application. I also have some selenium html tests that I would like to add to my application. This html tests are changing quite ofen so I can not just convert those tests to python webdriver and add it to my app. I think I need somehow run those tests without changes fr... |
Writing an "interactive" client with Twisted/Autobahn Websockets | 18,913,092 | 3 | 8 | 2,363 | 0 | python,websocket,twisted,autobahn | Why do you need a thread to launch protocolInstance.sendMessage() ?
This can be done in a normal reactor loop.
The core of a twisted is reactor and it gives a much easier look at things when you consider twisted itself reactive - meaning it does something as a reaction (response) to something else.
Now I assume that th... | 0 | 1 | 0 | 0 | 2013-09-19T15:55:00.000 | 2 | 0.291313 | false | 18,899,515 | 0 | 0 | 1 | 1 | Maybe I'm missing something here in the asynchronous designs of Twisted, but I can't seem to find a way to call the sendMessage() method "externaly". By this I mean, sending messages without being solely at the callback methods of Twisted/AutobahnWebsockets (like at onOpen or when receiving data from server at onMessag... |
Sum 7 days after current date in Django | 18,934,550 | 2 | 0 | 1,338 | 0 | python,django,date | I would do it in django. Have two DateFields in your model, both that could be blank and null. On the first time someone views your page (with both dates unset), create a view for the template request that sets the one of the DateFields to today = datetime.date.today() and the other to today + datetime.timedelta(8) t... | 0 | 0 | 0 | 0 | 2013-09-21T15:43:00.000 | 1 | 1.2 | true | 18,934,509 | 0 | 0 | 1 | 1 | I Need to put an expiration date in a template, it show the current date and the expiration date will be 8 days from current date.
Can someone tell me how can I do it? Is possible do it with Django or do I have to do it whit maybe Jquery or JavaScript?
And I need to send it to my database too, not just display it in th... |
How to make python invoke a JavaScript function? | 18,937,126 | 1 | 0 | 79 | 0 | javascript,python,google-app-engine | I assume you want to send a piece of html to a browser that won't disrupt the existing layout and functioning of the page, but still take place in DOM (hence be accessible from JS). In that case you may consider a hidden/invisible iframe. | 0 | 0 | 0 | 0 | 2013-09-21T18:44:00.000 | 2 | 0.099668 | false | 18,936,253 | 0 | 0 | 1 | 1 | I am rather new at this, so please cut me some slack.
I am working in a web application using google app engine. My server runs using Python, and when the user visits my "/" page, the server gets some HTML source code from a website and places it into a variable called html_code.
Now I would like to pass the html_code... |
Why are there one model.py per app instead of just one model.py out through the whole project? | 18,936,552 | 1 | 1 | 37 | 0 | python,django | So that the apps can be taken and used with a different database if desired without needing to modify the code (much). | 0 | 0 | 0 | 0 | 2013-09-21T19:10:00.000 | 3 | 0.066568 | false | 18,936,535 | 0 | 0 | 1 | 3 | I was just wondering why each project does not just have one model.py file, considering its just a file full of classes ( acting as database tables), because the whole project runs on one database, why can there be more than one models.py file if all files work with the same database?
Thanks. |
Why are there one model.py per app instead of just one model.py out through the whole project? | 18,936,585 | 1 | 1 | 37 | 0 | python,django | Django is set up to have projects that are collections of reusable, self contained apps. Each has its own model.py because they're tied closely to the views and templates for that app but may not be needed for the rest of the project. | 0 | 0 | 0 | 0 | 2013-09-21T19:10:00.000 | 3 | 0.066568 | false | 18,936,535 | 0 | 0 | 1 | 3 | I was just wondering why each project does not just have one model.py file, considering its just a file full of classes ( acting as database tables), because the whole project runs on one database, why can there be more than one models.py file if all files work with the same database?
Thanks. |
Why are there one model.py per app instead of just one model.py out through the whole project? | 18,944,280 | 0 | 1 | 37 | 0 | python,django | Ususally you will start writing one app. Once in a time, you will recognize that there are features which are not very tightly related (e.g. user management or different sub-parts). Additionally, your models.py will start to be lengthy and want to have a clearer structure.
This is the point in time where you start spl... | 0 | 0 | 0 | 0 | 2013-09-21T19:10:00.000 | 3 | 0 | false | 18,936,535 | 0 | 0 | 1 | 3 | I was just wondering why each project does not just have one model.py file, considering its just a file full of classes ( acting as database tables), because the whole project runs on one database, why can there be more than one models.py file if all files work with the same database?
Thanks. |
How to do socket programming in a django app | 18,943,786 | 2 | 0 | 263 | 0 | python,django,sockets,web-applications | If the uploading doesn't occur too often, why not just create a Django POST/PUT view for the job that simply accepts the file over HTTP? With the information you've provided, I cannot see why this simple solution wouldn't be up to the task. | 0 | 0 | 0 | 0 | 2013-09-22T12:15:00.000 | 1 | 0.379949 | false | 18,943,717 | 0 | 0 | 1 | 1 | I have a Django web application which shows a website to display some data. So, this application consists of the html pages and views to display this data which i am storing in a SQLite DB.
At the end of the day a third party needs to connect to this web application and upload binary data over to the application. What ... |
Python App Engine's urllib2: works locally but not when deployed to GAE | 18,948,829 | 0 | 1 | 225 | 0 | python,google-app-engine,urllib2 | We make no guarantees that urlfetch calls will all go out on the same IP address. | 0 | 1 | 0 | 0 | 2013-09-22T19:59:00.000 | 1 | 1.2 | true | 18,948,174 | 0 | 0 | 1 | 1 | I have an App that worked well on both GAE and test server till a few days ago. It connects to a remote site, logs in and browse pages and input information automatically. The remote site is using dynamic URLs to follow the session, each page gives the link for next call.
The program is very basic : urllib2.urlopen the... |
Integrate other html documentation into sphinx docs | 43,797,423 | 0 | 4 | 310 | 0 | python,html,code-coverage,python-sphinx,nose | I have a similar problem and I could solve it by doing the following. Note this is just for the HTML output.
Create an index.rst field with just the following:
======================
Javadoc of the API XXX
======================
As I am using the extension "sphinx.ext.autosectionlabel", this becomes a "level 1" secti... | 0 | 0 | 0 | 0 | 2013-09-23T20:49:00.000 | 1 | 0 | false | 18,968,569 | 0 | 0 | 1 | 1 | How do you include html docs generated by other tools such as nose, coverage, and pylint reports into Sphinx documentation. Should they go into the _static directory? and if so, how do you link to them?
I am trying to build a concise package of all of the code development tool documentation into a .pdf or html. |
GAE - updating structured properties ndb | 18,994,112 | -1 | 2 | 356 | 0 | python,google-app-engine | Thank you for looking out but figured it out. Appending the object to a list did the trick but I am sure there is a better efficient way. | 0 | 1 | 0 | 0 | 2013-09-23T23:08:00.000 | 1 | -0.197375 | false | 18,970,356 | 0 | 0 | 1 | 1 | Is there a way to update an object and its properties within an ndb StructuredProperty object instead of appending? |
Developing a server to host a smartphone app content | 18,981,659 | 0 | 0 | 747 | 0 | android,python,ios,unity3d | You can use .net platform as an backend server. | 0 | 0 | 0 | 0 | 2013-09-24T09:31:00.000 | 5 | 0 | false | 18,977,772 | 0 | 0 | 1 | 2 | Im building this app (using Unity3d) for a city hall and I need to split the content from the actual app since content must be easily changeable without having to update the app itself.
I want to host the content on a server and use http get/post messages to retrieve the data. I also need to have a web editor (kinda l... |
Developing a server to host a smartphone app content | 18,977,988 | 0 | 0 | 747 | 0 | android,python,ios,unity3d | Android get connected easily with cloud server.I don't know about others. You can connect using JSON and PHP for this. | 0 | 0 | 0 | 0 | 2013-09-24T09:31:00.000 | 5 | 0 | false | 18,977,772 | 0 | 0 | 1 | 2 | Im building this app (using Unity3d) for a city hall and I need to split the content from the actual app since content must be easily changeable without having to update the app itself.
I want to host the content on a server and use http get/post messages to retrieve the data. I also need to have a web editor (kinda l... |
Python - editing local HTML files - Should I edit all of the content as a one string or as an array line by line? | 18,988,074 | 0 | 2 | 173 | 0 | python,html | I suggest that instead of creating your own templating language (which is what this task amounts to), you use one of the many which already exist, and use that to perform the necessary operations. Try Jinja2, Django Templates, or Cheetah to see what you fancy. There are also many others. | 0 | 0 | 0 | 0 | 2013-09-24T15:46:00.000 | 2 | 0 | false | 18,986,290 | 0 | 0 | 1 | 1 | Just to be clear this is not a scraping question.
I'm trying to automate some editing of similar HTML files. This involves removing content between tags.
When editing HTML files locally, is it easier to open() the file then dump the content line by line into a string so it's easier to apply a regular expression?
Thanks |
Django's send_mail messages get grouped into a gmail converation | 18,986,649 | 2 | 0 | 261 | 0 | python,django,email,python-2.7,gmail | Make sure messages on different subjects have a different 'From' address | 0 | 0 | 0 | 1 | 2013-09-24T15:49:00.000 | 1 | 1.2 | true | 18,986,354 | 0 | 0 | 1 | 1 | For users of our Django app that receive their emails through gmail they are finding that emails are getting grouped into conversations that shouldn't be.
I'm not sure what gmail expects in an email to consider it unique enough to not group as a conversation but when I send plain text emails with DIFFERENT subjects usi... |
Trying to use Django, do I need to install Apache manually if Wamp already did | 18,998,207 | 0 | 0 | 429 | 0 | python,django,apache,wamp,mod-wsgi | You don't need Apache at all at this point. For development, things work much better if you use the built in development server, as described in the tutorial. | 0 | 0 | 0 | 0 | 2013-09-24T20:29:00.000 | 2 | 0 | false | 18,991,447 | 0 | 0 | 1 | 1 | To make my question clear:
I have had wamp installed, and it brought Apache. Will this Apache be used by others like Django?
If the wamp Apache is enough for others, its Apache is in wamp directory C:\wamp\bin\apache, not sth like C:\programs file...It is ok for django
If I have to install Apache manually for django, ... |
Do I need celery when I am using gevent? | 18,992,940 | 6 | 5 | 2,856 | 0 | python,django,celery,gevent | In short you do need a celery.
Even if you use gevent and have concurrency, the problem becomes request timeout. Lets say your task takes 10 minutes to run however the typical request timeout is about up to a minute. So what will happen if you trigger the task directly within a view is that the server will start proces... | 0 | 1 | 0 | 0 | 2013-09-24T21:26:00.000 | 1 | 1.2 | true | 18,992,369 | 0 | 0 | 1 | 1 | I am working on a django web app that has functions (say for e.g. sync_files()) that take a long time to return. When I use gevent, my app does not block when sync_file() runs and other clients can connect and interact with the webapp just fine.
My goal is to have the webapp responsive to other clients and not block. I... |
Django lack detail of error | 18,998,172 | 1 | 0 | 42 | 0 | python,django,python-2.7 | Set DEBUG = True in your settings.py and start your server with python manage.py runserver --traceback | 0 | 0 | 0 | 0 | 2013-09-25T06:32:00.000 | 1 | 1.2 | true | 18,997,814 | 0 | 0 | 1 | 1 | Django is not giving me detailed information about the error.
For example when I get ImportError, I can not see where the error is comming from. Which file which line. It only gives me ImportError: cannot import name ___. But it is not enough to find where the error is. It is not only about ImportError.Many error is ... |
No field delimiter in outgoing FIX messages? | 19,012,104 | 4 | 0 | 584 | 0 | python,quickfix | I would comment with this, but I don't have enough reputation. So - I'm not sure why you can't log into your server, but are you sure that you don't have delimiters? Because if you're using \x01 as a delimiter in FIX, the tag-values pairs will usually just be displayed as "all mashed together," but the hex dump of it r... | 0 | 0 | 0 | 0 | 2013-09-25T15:34:00.000 | 1 | 1.2 | true | 19,009,190 | 0 | 0 | 1 | 1 | I am using quickfix, compiled from the source on a linux box, setup to use the python headers. Everything 'seems' fine when I run my code, but I can't log on to my FIX server, and I noticed that the messages I'm sending have no field/tag delimiters, all the fields and values are just mashed together...
What might be c... |
django celery: Import error - no module named task | 25,423,925 | 0 | 4 | 2,154 | 0 | django,python-2.7,celery | Try installing python-dev . This is a common error when python doesnt find the dependencies | 0 | 1 | 0 | 0 | 2013-09-26T11:33:00.000 | 2 | 0 | false | 19,027,087 | 0 | 0 | 1 | 2 | I am a beginner in django celery so unaware of the deep concepts of the celery. I have installed all the required packages like celery, rabbitMQ and permissions as well. after goin through the documentation of celery i have wrriten my code but when i am firing the command
./manage.py celery worker -c 2
I am getting--... |
django celery: Import error - no module named task | 19,028,425 | 0 | 4 | 2,154 | 0 | django,python-2.7,celery | If you do ./manage.py startapp sitetasks and put your tasks.py inside the new app-directory (/sitetask/) and then add sitetaks to you install_apps in settings.py.
Does that help? | 0 | 1 | 0 | 0 | 2013-09-26T11:33:00.000 | 2 | 0 | false | 19,027,087 | 0 | 0 | 1 | 2 | I am a beginner in django celery so unaware of the deep concepts of the celery. I have installed all the required packages like celery, rabbitMQ and permissions as well. after goin through the documentation of celery i have wrriten my code but when i am firing the command
./manage.py celery worker -c 2
I am getting--... |
Importing and debugging a Python Django project made in a different environment | 19,032,797 | 0 | 0 | 69 | 0 | python,django,windows,virtualenv | I once faced the same problem and it took me so much time to configure another environment that I eventually had to create a VM with the same version of OS and libraries. I then made a raw copy of the project and it worked fine. | 0 | 0 | 0 | 0 | 2013-09-26T14:54:00.000 | 2 | 0 | false | 19,031,616 | 1 | 0 | 1 | 1 | I am working on a Django project that was created by another developer on a different machine. I see that in the root of the application, there is a .virtualenv directory. Is it possible to simply setup this project locally on my Windows machine using the project settings and Python version (the app uses 2.7), so that ... |
Python - How to send PySerial results to FileMaker Pro 9 | 19,038,893 | 0 | 0 | 133 | 0 | python,macos,filemaker | Applescript should be fine for this, since it's likely running on the client already. | 0 | 0 | 0 | 0 | 2013-09-26T18:38:00.000 | 2 | 0 | false | 19,036,088 | 0 | 0 | 1 | 1 | I currently have a python script set up, using PySerial, that reads incoming weight data from a Mettler-Toledo scale. Everything is working just as I want it to with regards to reading it, but I need to get the result into FileMaker Pro 9. I'm not familiar with FileMaker, but could this be done by invoking the Python s... |
Laravel 4 passwords and python | 19,036,400 | 1 | 1 | 331 | 0 | php,python,hash,laravel,laravel-4 | you cant the best you can do is encrypt it with a reversible encryption ... but then you need to store the key somewhere ... eventually you will have some plain text somewhere (or encoded at best) that will allow decryption ... you could store the hash and do a query against a db that maps hashes to pw's but you still ... | 0 | 0 | 0 | 1 | 2013-09-26T18:44:00.000 | 1 | 1.2 | true | 19,036,197 | 1 | 0 | 1 | 1 | I have a hashed password using the Hash::make() function of laravel when a user is created. I eventually need to take that hashed password, and pass it to a python script to perform a login and download of site resources. I know the hash is a one-way action, but I'd like to keep the password hashed to be security con... |
Postgres datetime field fetched without timezone in django | 19,076,075 | 3 | 2 | 1,585 | 1 | python,django,postgresql,timezone | The issue has been solved. The problem was that I was using another naive datetime field for calculation of difference in time, whereas the DB field was an aware field. I then converted the naive to timezone aware date, which solved the issue.
Just in case some one needs to know. | 0 | 0 | 0 | 0 | 2013-09-27T19:19:00.000 | 1 | 1.2 | true | 19,058,491 | 0 | 0 | 1 | 1 | datetime is stored in postgres DB with UTC. I could see that the date is 2013-09-28 00:15:52.62504+05:30 in postgres table.
But when I fetch the value via django model, I get the same datetime field as datetime.datetime(2013, 9, 27, 18, 45, 52, 625040, tzinfo=).
USE_TZ is True and TIME_ZONE is 'Asia/Kolkata' in setti... |
Django Views - Block Consecutive Quick Calls | 19,061,324 | 2 | 1 | 152 | 0 | python,django,django-views | You should disable the button with JavaScript after clicking on it.
This way the user is unable to trigger the view multiple times. | 0 | 0 | 0 | 0 | 2013-09-27T22:52:00.000 | 3 | 0.132549 | false | 19,061,299 | 0 | 0 | 1 | 1 | A button click in my app calls a view which does a few database changes and then redirects to a new views which renders html. When the user typically clicks on the link, he accidentally clicks on in twice to thrice in a couple of seconds. I want to block the view call if the same call was made less than 10 seconds ago.... |
Python program on server - control via browser | 19,071,331 | 0 | 0 | 367 | 0 | python,django,web-services,qt | Django is a good candidate for the website, however:
It is not a good idea to run heavy functionality from a website. it should happen in a separate process.
All functions should be asynchronous, I.E. You should never wait for something to complete.
I would personally recommend writing a separate process with a mess... | 0 | 0 | 0 | 0 | 2013-09-28T20:21:00.000 | 1 | 0 | false | 19,071,286 | 0 | 0 | 1 | 1 | I have to setup a program which reads in some parameters from a widget/gui, calculates some stuff based on database values and the input, and finally sends some ascii files via ftp to remote servers.
In general, I would suggest a python program to do the tasks. Write a Qt widget as a gui (interactively changing views,... |
Celery default configuration file | 19,090,686 | 0 | 0 | 407 | 0 | python,celery | I prefer put configs to project root folder:
One easy style to load config.
One easy style to find and edit config.
However you should load configs manually with one of next methods: config_from_object, config_from_envvar or config_from_cmdline. | 0 | 1 | 0 | 0 | 2013-09-29T10:08:00.000 | 1 | 0 | false | 19,076,762 | 0 | 0 | 1 | 1 | I am installing Celery through Puppet and I would like to also have a default configuration file to provide to Celery. The default name is celeryconfig.py, but I don't know where to copy it.
I am NOT using Celery with Django.
What is the location where I should copy celeryconfig.py in order for Celery to read it everyt... |
Running xlwt module in Abaqus | 19,756,366 | 1 | 0 | 627 | 0 | python,importerror,xlwt | I think raw_input command is just not supported within CAE environment.
You can use getInput() or getInputs() instead. | 0 | 0 | 0 | 1 | 2013-09-30T04:23:00.000 | 1 | 1.2 | true | 19,086,425 | 0 | 0 | 1 | 1 | Windows Machine, Python 2.4:
When I run my script in Abaqus' "Run Script...", I get an ImportError saying that xlwt module does not exist. The same script runs perfectly well in my Eclipse IDE or Python IDE. I made sure that I gave the right path to the Python Library.
Any help in this regard would be appreciated. Tha... |
How do I enforce unique user names in Flask? | 19,087,185 | 0 | 1 | 1,118 | 1 | python,sql,web-applications,flask | You can use SQLAlchemy.It's a plug-in | 0 | 0 | 0 | 0 | 2013-09-30T05:17:00.000 | 2 | 0 | false | 19,086,885 | 0 | 0 | 1 | 1 | I'm a complete beginner to Flask and I'm starting to play around with making web apps.
I have a hard figuring out how to enforce unique user names. I'm thinking about how to do this in SQL, maybe with something like user_name text unique on conflict fail, but then how to I catch the error back in Python?
Alternatively... |
Selecting combo box values | 19,096,169 | 0 | 0 | 252 | 0 | javascript,python,selenium,selenium-webdriver,data-driven-tests | I think this should $("#id").val() give you the value i guess | 0 | 0 | 1 | 0 | 2013-09-30T13:56:00.000 | 2 | 0 | false | 19,096,111 | 0 | 0 | 1 | 1 | I'm trying to implement a data driven test approach using Selenium (Python) but I've run into an issue selecting dynamic values from multiple combo boxes. I'm currently aware of one option, using method driver.execute_script("JAVASCRIPT TO GET COMBO BOX OPTION") but hard coding the values defeats the purpose of automat... |
Tastypie - get user groups resource_uri | 19,103,760 | 0 | 0 | 104 | 0 | python,django,api,rest,tastypie | Do you need to specify the format, such as: /api/v1/groups/1/?format=json ? | 0 | 0 | 0 | 0 | 2013-09-30T18:02:00.000 | 1 | 0 | false | 19,100,800 | 0 | 0 | 1 | 1 | I'm trying to update the groups assigned to users via an API (via rest) with Tastypie.
I tried passing the group id's directly in, however it says that the URL provided is not a valid resource. I then tried passing in a URL such as '/api/v1/groups/1/' but that is saying that's not a link to a valid resource.
Any hints?... |
Can we simulate a browser proxy mechanism in a Python script? | 19,108,770 | 0 | 0 | 486 | 0 | python,testing,proxy | Set the HTTP_PROXY environment variable (and export it), and Python will honour that (as far as the standard library is used). | 0 | 0 | 1 | 0 | 2013-10-01T04:45:00.000 | 1 | 0 | false | 19,108,182 | 0 | 0 | 1 | 1 | the idea is that, say a developer has a set of tests to run against locahost:8000 and he has hardcoded that in his tests.
When we setup a proxy in a browser, the browser handles the proxy so that users only care about typing localhost:8000 instead of localhost:proxy_port. Browser actually sends request and receives re... |
CORS with gevent | 21,741,160 | 0 | 1 | 374 | 0 | python,http,cors,gevent | Practically the only option in this situation is to switch to using WSGI. I ended up switching to pywsgi.WSGIServer, and the problem solved itself.
It's important to understand that switching to WSGI in reality introduces very little (if any) overhead, giving you so many benefits that the practical pros far outweigh th... | 0 | 0 | 1 | 0 | 2013-10-01T10:40:00.000 | 1 | 0 | false | 19,114,113 | 0 | 0 | 1 | 1 | I am building a gevent application in which I use gevent.http.HTTPServer. The application must support CORS, and properly handle HTTP OPTIONS requests. However, when OPTIONS arrives, HTTPServer automatically sends out a 501 Not Implemented, without even dispatching anything to my connection greenlet.
What is the way to... |
Looking to quantify the performance overhead of NewRelic monitoring in python django app | 19,128,804 | 8 | 8 | 2,293 | 0 | python,django,newrelic | For the Python agent and monitoring of a Django web application, the overhead per request is driven by how many functions are executed within a specific request that are instrumented. This is because full profiling is not being done. Instead only specific functions of interest are instrumented. It is therefore only the... | 0 | 0 | 0 | 0 | 2013-10-01T22:40:00.000 | 1 | 1.2 | true | 19,127,224 | 0 | 0 | 1 | 1 | I am working on a large Django (v1.5.1) application that includes multiple application servers, MySQL servers etc. Before rolling out NewRelic onto all of the servers I want to have an idea of what kind of overhead I will incur per transaction.
If possible I'd like to even distinguish between the application tracking a... |
Truncate Django CMS Placeholder | 19,136,318 | 2 | 0 | 321 | 0 | python,django,django-templates,django-cms | As you've seen, you can't truncate a placeholder, as a placeholder's job is simply to render content plugins that are added to it.
Your only viable option is to truncate the field in the render template of the plugin, or to add a separate field on your model that can store the truncated text. Such a field could be popu... | 0 | 0 | 0 | 0 | 2013-10-02T05:40:00.000 | 2 | 1.2 | true | 19,130,630 | 0 | 0 | 1 | 1 | I'm creating my own Django CMS blog plugin. I'm using a placeholder to hold the full content of the blog entry and I'm trying to figure out how to automatically create an excerpt from this placeholder.
If it were simply a text field I know I could use "|truncatechars:15" in the template, but I don't know how to do this... |
Zip a folder on S3 using Django | 19,131,908 | 0 | 1 | 657 | 0 | python,django,amazon-s3,amazon-ec2,zip | from my understanding you can't zip files directly on s3. you would have to download the files you'd want to zip, zip them up, then upload the zipped file. i've done something similar before and used s3cmd to keep a local synced copy of my s3bucket, and since you're on an ec2 instance network speed and latency will be ... | 0 | 0 | 0 | 0 | 2013-10-02T07:15:00.000 | 1 | 0 | false | 19,131,736 | 0 | 0 | 1 | 1 | I have an application where in I need to zip folders hosted on S3.The zipping process will be triggered from the model save method.The Django app is running on an EC2 instance.Any thoughts or leads on the same?
I tried django_storages but haven't got a breakthrough |
Django multiple sessions cookie domain for multiple subdomains | 19,138,823 | 4 | 3 | 2,292 | 0 | python,django,session,cookies,subdomain | Just remove the SESSION_COOKIE_DOMAIN setting or set it to None. Django will automatically use the current domain. | 0 | 0 | 0 | 0 | 2013-10-02T13:50:00.000 | 1 | 1.2 | true | 19,138,535 | 0 | 0 | 1 | 1 | My Django app handles multiple subdomains like "first.domain.com", "second.domain.com" etc.
My SESSION_COOKIE_DOMAIN is ".domain.com" to handle multiple subdomains.
So when I access my app from first.domain.com or second.domain.com, I can see the same session cookie from both subdomains.
So my question is; is it possib... |
Python Crawling - Requests faster | 19,171,556 | 5 | 0 | 724 | 0 | python,web-crawler,scrapy | +1 votes for Scrapy. For the past several weeks I have been writing crawlers of massive car forums, and Scrapy is absolutely incredible, fast, and reliable. | 0 | 0 | 1 | 0 | 2013-10-04T00:58:00.000 | 2 | 1.2 | true | 19,171,483 | 0 | 0 | 1 | 1 | I need to make a Web Crawling do requests and bring the responses complete and quickly, if possible.
I come from the Java language. I used two "frameworks" and neither fully satisfied my intent.
The Jsoup had the request/response fast but wore incomplete data when the page had a lot of information. The Apache HttpClien... |
Cannot import name six Django-CMS | 19,180,957 | 2 | 3 | 5,466 | 0 | python,django,django-cms,six-python | You should have Django version >=1.4.5. It worked for me. | 0 | 0 | 0 | 0 | 2013-10-04T11:03:00.000 | 2 | 1.2 | true | 19,179,621 | 0 | 0 | 1 | 1 | Am Using django 1.3 and django-cms 2.2 and when i run i get an error as follows:
django.template.base.TemplateSyntaxError: 'cms_tags' is not a valid tag library: ImportError raised loading cms.templatetags.cms_tags: cannot import name six |
Python social auth account association only | 19,231,096 | 0 | 1 | 325 | 0 | python,django | If your user is already logged in with a username a password you simply need to allow them to follow the same steps they would when signing up with a social account and that social account will be automatically associated with their django account | 0 | 0 | 0 | 0 | 2013-10-05T22:29:00.000 | 1 | 1.2 | true | 19,203,395 | 0 | 0 | 1 | 1 | I'm currently trying to add an 'associate google account' button to my django 1.4.8 project. I've never worked with python-social-auth before, and I'm a bit confused about only associating accounts --as opposed to authenticating against--, and how to use credentials for accessing Google Drive services.
Thanks!
A. |
How to use a library that imports memcache in App Engine | 19,237,649 | 2 | 2 | 1,996 | 0 | python,google-app-engine | To further clarify jayhendren's answer - if you are planning to use GAE's memcache service, you must use
from google.appengine.api import memcache
you cannot use an open source memcache library. The only scenario where you could use the standard python memcache lib is if you were running your own memcache service some... | 0 | 1 | 0 | 0 | 2013-10-06T17:00:00.000 | 4 | 0.099668 | false | 19,211,444 | 0 | 0 | 1 | 1 | I want to use a library (memorised) that uses memcache like this: import memcache
Now on App Engine, memcache must be imported like this: from google.appengine.api import memcache
So I get this error when running with dev_appserver.py: ImportError: No module named memcache
Can I use this library without modifying it? |
Possible to get alexa information or google page rankings over time? | 19,393,738 | 1 | 1 | 3,663 | 0 | python,google-api,google-search-api,pagerank,alexa | Alexa (via AWS) charges to use their API to access Alexa rankings. The charge per query is micro so you can get hundreds of thousands of ranks relatively cheaply. I used to run a few search directories that indexed Alexa rankings over time, so I have experience with this. The point is, you're being evil by scraping vas... | 0 | 0 | 1 | 1 | 2013-10-07T01:17:00.000 | 4 | 0.049958 | false | 19,215,815 | 0 | 0 | 1 | 1 | I am trying to access historical google page rankings or alexa rankings over time to add some weightings on a search engine I am making for fun. This would be a separate function that I would call in Python (ideally) and pass in the paramaters of the URL and how long I wanted to get the average over, measured in days a... |
pycharm remote project with virtualenv | 20,163,768 | 24 | 17 | 14,227 | 0 | python,django,virtualenv,pycharm | I've found the decision and asked the support which confirmed its:
Here is the steps:
copy a project to a local directory.
configure: tools - deployment, to upload this local copy to remote server
make deployment automatic: tools - deployment - "automatic upload"
add remote interpreter: file - settings - python interp... | 0 | 0 | 0 | 0 | 2013-10-07T06:02:00.000 | 2 | 1.2 | true | 19,218,011 | 1 | 0 | 1 | 2 | I have the remote server with a few virtualenv environments (django projects).
How can I open, develop and debug these projects completely remote?
Shall I mount remote directory via sshfs to open a project?
(I can't open project other way than as local path)
I am working on debian and windows xp. |
pycharm remote project with virtualenv | 19,218,082 | -1 | 17 | 14,227 | 0 | python,django,virtualenv,pycharm | Debian:
From the file manager, click on Connect To server, connect to ssh by giving login credentials which will open your remote project on your file manager itself.
Or you can go to the server using ssh via terminal and edit your project via command line text editor.
IDE:
If you are working with IDE such as Aptana or... | 0 | 0 | 0 | 0 | 2013-10-07T06:02:00.000 | 2 | -0.099668 | false | 19,218,011 | 1 | 0 | 1 | 2 | I have the remote server with a few virtualenv environments (django projects).
How can I open, develop and debug these projects completely remote?
Shall I mount remote directory via sshfs to open a project?
(I can't open project other way than as local path)
I am working on debian and windows xp. |
What's the preferred method for accessing settings information in Django? | 19,229,607 | 2 | 0 | 76 | 0 | python,django | When accessing a setting defined by your app in your apps' defaults, I'd suggest if settings.name: - the default is defined by you already. On the other hand, when writing an external app - I'd suggest if hasattr(settings, 'name'): - you can't expect your apps users will define all the defaults. | 0 | 0 | 0 | 0 | 2013-10-07T15:57:00.000 | 2 | 1.2 | true | 19,229,316 | 0 | 0 | 1 | 1 | Please chime in if there are other methods but the ones I see most often are these two and they both exist in the django source.
if settings.DEBUG:
and
if hasattr(settings, 'POSTGIS_VERSION'):
The later has the advantage of having a default but in cases where a default would be an error (something is missing) is it... |
How best to handle relative urls in scraped content? | 19,233,083 | 0 | 1 | 358 | 0 | javascript,python,html | Keep track of the url of each page you scraped. One way would be to save it with the full URL as a filename. Then, you can resolve relative urls as per the HTML spec. | 0 | 0 | 1 | 0 | 2013-10-07T18:29:00.000 | 2 | 0 | false | 19,231,985 | 0 | 0 | 1 | 1 | What are some methods to make relative urls absolute in scraped content so that the scraped html appears like the original and css are not broken?
I found out <base> tag may help. But how can I find out what the original base of the URL is?
I don't care about interactions with the links, but do want them to appear corr... |
How to tell uWSGI to prefer processes to threads for load balancing | 19,326,373 | 11 | 14 | 9,291 | 0 | python,multithreading,process,load-balancing,uwsgi | So, the solution is:
Upgrade uWSGI to recent stable version (as roberto suggested).
Use --thunder-lock option.
Now I'm running with 50 threads per process and all requests are distributed between processes equally. | 0 | 1 | 0 | 0 | 2013-10-07T19:37:00.000 | 2 | 1.2 | true | 19,233,132 | 0 | 0 | 1 | 2 | I've installed Nginx + uWSGI + Django on a VDS with 3 CPU cores. uWSGI is configured for 6 processes and 5 threads per process. Now I want to tell uWSGI to use processes for load balancing until all processes are busy, and then to use threads if needed. It seems uWSGI prefer threads, and I have not found any config opt... |
How to tell uWSGI to prefer processes to threads for load balancing | 19,238,645 | 9 | 14 | 9,291 | 0 | python,multithreading,process,load-balancing,uwsgi | Every process is effectively a thread, as threads are execution contexts of the same process.
For such a reason there is nothing like "a process executes it instead of a thread". Even without threads your process has 1 execution context (a thread). What i would investigate is why you get (perceived) poor performances w... | 0 | 1 | 0 | 0 | 2013-10-07T19:37:00.000 | 2 | 1 | false | 19,233,132 | 0 | 0 | 1 | 2 | I've installed Nginx + uWSGI + Django on a VDS with 3 CPU cores. uWSGI is configured for 6 processes and 5 threads per process. Now I want to tell uWSGI to use processes for load balancing until all processes are busy, and then to use threads if needed. It seems uWSGI prefer threads, and I have not found any config opt... |
GAE: is putting all handlers in main.py gonna make my app slow? | 19,242,752 | 1 | 0 | 154 | 0 | google-app-engine,python-2.7,webapp2 | No, that doesn't affect the speed. Your code needs to be loaded anyway, so it makes no difference if it's all in one file or not. It will of course make the file more complex, but that's your problem, not GAE's. | 0 | 1 | 0 | 0 | 2013-10-08T06:01:00.000 | 2 | 0.099668 | false | 19,240,218 | 0 | 0 | 1 | 2 | I'm building a web application using GAE.
I've been doing some research by my own on GAE python project structures,
and found out that there isn't a set trend on how to place my handlers within the project.
As of now, I'm putting all the handlers(controllers) in main.py,
and make all urls (/.*) be directed to main.app... |
GAE: is putting all handlers in main.py gonna make my app slow? | 19,253,273 | 1 | 0 | 154 | 0 | google-app-engine,python-2.7,webapp2 | In general, this will not make your application slower, however it can potentially slow you down your instance start-up time, but it generally isn't a problem unless you have very large complicated apps.
The instance start up time comes into play whenever GAE spins up a new instance for you. For example, if your app i... | 0 | 1 | 0 | 0 | 2013-10-08T06:01:00.000 | 2 | 1.2 | true | 19,240,218 | 0 | 0 | 1 | 2 | I'm building a web application using GAE.
I've been doing some research by my own on GAE python project structures,
and found out that there isn't a set trend on how to place my handlers within the project.
As of now, I'm putting all the handlers(controllers) in main.py,
and make all urls (/.*) be directed to main.app... |
Django contrib.auth without permissions | 19,242,718 | 2 | 0 | 71 | 0 | python,django,authentication | It depends what you mean, really. Although the permissions are part of the auth app, there's no requirement to actually assign any, or check them at any point: that's entirely up to you. Most of the projects I have done use auth in exactly this way, to check logins and nothing else. | 0 | 0 | 0 | 0 | 2013-10-08T08:12:00.000 | 1 | 1.2 | true | 19,242,443 | 0 | 0 | 1 | 1 | Is it possible to use the built-in django.contrib.auth mechanism without enabling permissions at all?
I just need a simple registration and login system.
Thanks. |
Running web.py as a service on linux | 19,256,882 | 1 | 0 | 855 | 0 | python,centos,web.py | In general, there are two parts of this.
The "remote and event-based" part: Service used remotely over network needs certain set of skills: to be able to accept (multiple) connections, read requests, process, reply, speak at least basic TCP/HTTP, handle dead connections, and if it's more than small private LAN, it ne... | 0 | 1 | 0 | 0 | 2013-10-08T19:28:00.000 | 2 | 1.2 | true | 19,256,594 | 0 | 0 | 1 | 1 | I've used web.py to create a web service that returns results in json.
I run it on my local box as python scriptname.py 8888
However, I now want to run it on a linux box.
How can I run it as a service on the linux box?
update
After the answers it seems like the question isn't right. I am aware of the deployment proc... |
is there A chance to destroy a session via scripts(like python) before the IE/Chome exit? Not using browser options | 19,262,430 | 0 | 0 | 66 | 0 | python,security,session,cookies,browser | No. The server has no idea when a browser closes. Because the connection between the browser and the server is stateless, when a user closes a tab or shuts down the whole application, the server is unaware of it. It doesn't even destroy the session when you "manually close the browser or clean cookies". The Session do... | 0 | 0 | 1 | 0 | 2013-10-09T02:55:00.000 | 1 | 0 | false | 19,262,267 | 0 | 0 | 1 | 1 | As we login stackoverflow,there's a session created between the browser and server which only expired after we manually close the browser or clean cookies. But howto doing this by a programming way on CLIENT SYSTEM during all browser behavior acts normally ? Like nothing happened and just need another login action.
Ok... |
adding a custom language to django | 20,371,763 | 5 | 2 | 1,607 | 0 | python,django,multilingual | I found the solution, you have to manually add a folder in /django/conf/locale/ with the language extension you want. Actually you can just copy past the en (english) folder and name it after the missing language (in my case mt).
In this folder you can also edit the file formats.py to localize the dates, numbers etc.
R... | 0 | 0 | 0 | 0 | 2013-10-09T09:22:00.000 | 1 | 1.2 | true | 19,267,886 | 0 | 0 | 1 | 1 | I'm translating my website into the 24 languages of the European Union. These include the "Malti" language, that is not listed in django default supported languages.
I would like to know if there is a way to add a custom language to django so it can work with the native i18n url function.
Thanks! |
GeoDjango or just plain Django? | 19,279,589 | 1 | 0 | 144 | 0 | python,django,mongodb | One way is with straight django and raw sql. But it will look ugly. If you spend the time going through the pain of getting GeoDjango up and running you'll find it well worth the effort, as performing queries such as "find all locations within 5 miles" become very easy to implement. | 0 | 0 | 0 | 0 | 2013-10-09T13:29:00.000 | 1 | 0.197375 | false | 19,273,500 | 0 | 0 | 1 | 1 | I am working on a project that involves a spatial model, just 2 coordinates points with latitude and longitude - no areas, boundaries, lines etc. Can I get away just by using plain django or should I use GeoDjango? Do I need GeoDjango to do spatial queries (find all locations within 5 miles etc.)? Also, should I consid... |
Access call log from SL4A | 19,764,120 | 0 | 0 | 383 | 0 | android,python,sl4a | There is no explicit function for accessing the CallLog.Calls object.
It may be possible in the ContactsFacade e.g. queryAttributes or queryContent but you would need to investigate further there. | 0 | 0 | 0 | 0 | 2013-10-09T16:59:00.000 | 1 | 0 | false | 19,278,242 | 0 | 0 | 1 | 1 | Is it possible to access the call log (history of outgoing, incoming and missed calls) of an android phone using a python code in the SL4A environment? |
pylons route with period | 19,279,825 | 0 | 0 | 28 | 0 | python,pylons,ckan | I just figured out that all I needed to do was add {.format} and rename the original file because pylons with route to the static page first! | 0 | 0 | 0 | 0 | 2013-10-09T18:02:00.000 | 1 | 0 | false | 19,279,379 | 0 | 0 | 1 | 1 | I am currently trying to make a once static page into a dynamic page. The customers does not want to change the url to not have the .html at the end of the url. So, as an example the current static page is /foo/bar.html which is located in my public folder, no problem. I can easily make it /foo/bar, but once I have a... |
ReportLab import PDF, Acrobat | 19,321,562 | 0 | 1 | 561 | 0 | python,acrobat,reportlab | There is a python module, pyPDF, that can also be used to slice-and-dice PDF's.
This could be used if you had already exported you Assets using the native program (example printing an AutoCAD drawing as a PDF, from within AutoCAD itself). Acrobat is pretty good at magically guessing how this should be done when using... | 0 | 0 | 0 | 1 | 2013-10-09T20:49:00.000 | 1 | 0 | false | 19,282,409 | 0 | 0 | 1 | 1 | I am trying to embed various PDF documents into my ReportLab canvas. It seems that maybe you can hack in support for SVG (but I really need PDF).
If you want pure python, the proper way is to pay for the commercial ReportLab-PLUS addons, which includes PageCatcher, a mighty powerful artwork/PDF toolset.
Im not ready fo... |
Java Application Interacting with Flash on Web Application | 19,300,355 | 0 | 0 | 113 | 0 | java,php,python,actionscript-3,flash | GraniteDS will allow you to access your java objects via the Flex framework. | 0 | 0 | 0 | 0 | 2013-10-10T12:59:00.000 | 1 | 0 | false | 19,296,422 | 0 | 0 | 1 | 1 | Is there anyway I can make a Java application communicate with a Flash Player (application) that is on a website? The flash application is quite dynamic, meaning the data changes as i refresh and visit different pages. In fact the page itself is fully flash.
Where should i be looking at to get this working?
I'm thinki... |
Django and python3 | 24,934,345 | 0 | 1 | 367 | 0 | python,django,web-frameworks | Try using the latest GA version of mysql-connector-python. | 0 | 0 | 0 | 0 | 2013-10-10T14:29:00.000 | 3 | 0 | false | 19,298,609 | 1 | 0 | 1 | 1 | I'm currently testing frameworks to create a big multiplayers game. I choose Django.
But I have a question about the version of Python. I should to create that project from scratch with Python 3.x or Python 2.x?
Python 3.x and Django compatibly is ok, or not production usable for now? |
Load static Django database into memory | 19,311,615 | 0 | 2 | 1,409 | 1 | python,django,sqlite,orm,memcached | Does the disk IO really become the bottleneck of your application's performance and affect your user experience? If not, I don't think this kind of optimization is necessary.
Operating system and RDBMS (e.g MySQL , PostgresQL) are really smart nowdays. The data in the disk will be cached in memory by RDBMS and OS autom... | 0 | 0 | 0 | 0 | 2013-10-11T04:06:00.000 | 2 | 0 | false | 19,310,083 | 0 | 0 | 1 | 1 | I'm working with a somewhat large set (~30000 records) of data that my Django app needs to retrieve on a regular basis. This data doesn't really change often (maybe once a month or so), and the changes that are made are done in a batch, so the DB solution I'm trying to arrive at is pretty much read-only.
The total s... |
Create website with Python without using Django | 19,313,971 | 0 | 0 | 1,444 | 0 | python | Using a framework like Django will start you right into developing your application. They you intend to work will cost you years of work to create your own web application infrastructure without getting anything useful.
The strength of Python is the availability of countless modules, packages and frameworks to build up... | 0 | 0 | 0 | 0 | 2013-10-11T08:40:00.000 | 2 | 0 | false | 19,313,800 | 0 | 0 | 1 | 1 | I need to create a website using python but without Django or any other framework, since the website I need to create ts very custom (at the back-end level specially) like having a dashboard after login and stuff like that.
I want to know what are the best practices and/or tutorials that can help me in such a situation... |
Fast encrypt, slow decrypt method for NDB Datastore | 19,318,479 | 1 | 0 | 560 | 0 | python,google-app-engine,encryption | It sounds like conventional cryptographical methods should meet your needs, e.g. AES256. When it comes to crypto you should try to innovate as little as possible. Use well-established and well-trusted methods -- when "rolling your own" it's very easy to make mistakes, and you don't get the benefit of peer review from t... | 0 | 1 | 0 | 0 | 2013-10-11T11:32:00.000 | 1 | 0.197375 | false | 19,317,126 | 0 | 0 | 1 | 1 | I have unencrypted web request data (not under my jurisdiction) that I would like to quickly save into the Datastore so as not to slow down the request process.
The sensitive data occasionally is required to be opened by system users via the web. When a user makes such a request, it will require them to complete a reCA... |
Is it wise to rely on HTTP_REFERER in a web app? | 19,331,922 | 1 | 0 | 280 | 0 | python,web.py,http-referer | thefourtheye is right that you can't rely on REFERER.
But that doesn't mean you can't use it.
As a security measure (e.g., to prevent deep linking), it's laughably useless.
But for convenience features, there's nothing wrong with it. Assume, say, a third of your users won't supply it. Is your navigation good enough wit... | 0 | 0 | 1 | 0 | 2013-10-12T05:29:00.000 | 2 | 0.099668 | false | 19,330,905 | 0 | 0 | 1 | 1 | I'm writing a web app in Python/web.py where you go to the url /unfriend to unfriend someone. This link is spread out across multiple pages. After being unfriended, I would like the user to be redirected to the page they came from. Can I rely on HTTP_REFERER to implement this behavior? I don't want to have to add a par... |
Updating client page only when new entry comes in database in Django | 19,333,028 | 2 | 1 | 824 | 1 | python,mysql,django | you need to elemplments the poll/long poll or server push. | 0 | 0 | 0 | 0 | 2013-10-12T09:38:00.000 | 3 | 0.132549 | false | 19,332,760 | 0 | 0 | 1 | 1 | I have a simple python/Django Application in which I am inserting records in database through some scanning event. And I am able to show the data on a simple page. I keep reloading the page every second to show the latest inserted database records.But I want it to improve so that page should update the records when eve... |
How do I install simplejson 3.3.1 for a Python project in Netbeans IDE 7.3.1 | 19,340,898 | 0 | 0 | 2,016 | 0 | python,json,netbeans | Install Python setuptools
sudo apt-get install python-setuptools
Now using pip install simplejson
sudo pip install simplejson
In general most Python packages can be installed this way. | 0 | 0 | 0 | 0 | 2013-10-13T01:12:00.000 | 2 | 0 | false | 19,340,807 | 1 | 0 | 1 | 2 | I am trying to install simplejson-3.3.1.tar.gz so it can be accessed by my Python project in netbeans IDE 7.3.1.
I installed json.py in my src as a quick fix, but need more functionality.
I am using linus mint 15 as an OS.
I am unsure how to get my modules in netbeans to "see" methors e.g. json.dumps.
I am new to netbe... |
How do I install simplejson 3.3.1 for a Python project in Netbeans IDE 7.3.1 | 19,346,510 | 0 | 0 | 2,016 | 0 | python,json,netbeans | I found the issue ...
netbeans defaults to jython. I had to save my project files to another directory, delete my project (changing to python 2.7. for current project had no effect) and create a new project with netbeans with python 2.7 as the default.
Thanks for helping me get simplejson into my python 2.7 Nipun! Chri... | 0 | 0 | 0 | 0 | 2013-10-13T01:12:00.000 | 2 | 0 | false | 19,340,807 | 1 | 0 | 1 | 2 | I am trying to install simplejson-3.3.1.tar.gz so it can be accessed by my Python project in netbeans IDE 7.3.1.
I installed json.py in my src as a quick fix, but need more functionality.
I am using linus mint 15 as an OS.
I am unsure how to get my modules in netbeans to "see" methors e.g. json.dumps.
I am new to netbe... |
What’s the difference between a project and an app in Django world? | 66,488,574 | 1 | 85 | 35,473 | 0 | python,django | As per the official Django documentation
Projects vs. apps
What’s the difference between a project and an app? An app is a Web
application that does something – e.g., a Weblog system, a database of
public records or a small poll app. A project is a collection of
configuration and apps for a particular website. A proje... | 0 | 0 | 0 | 0 | 2013-10-13T22:00:00.000 | 4 | 0.049958 | false | 19,350,785 | 0 | 0 | 1 | 2 | I am creating my first real website using Django but I am still struggling to understand the diff between a project and an app.
For example, My website is a sports news website which will contain sections like articles, ranking tables and "fixtures and results", my question is should each one of these sections be in a ... |
What’s the difference between a project and an app in Django world? | 19,351,042 | 122 | 85 | 35,473 | 0 | python,django | A project refers to the entire application and all its parts.
An app refers to a submodule of the project. It's self-sufficient and not intertwined with the other apps in the project such that, in theory, you could pick it up and plop it down into another project without any modification. An app typically has its own ... | 0 | 0 | 0 | 0 | 2013-10-13T22:00:00.000 | 4 | 1.2 | true | 19,350,785 | 0 | 0 | 1 | 2 | I am creating my first real website using Django but I am still struggling to understand the diff between a project and an app.
For example, My website is a sports news website which will contain sections like articles, ranking tables and "fixtures and results", my question is should each one of these sections be in a ... |
Spyne with Flask application context | 26,411,467 | -1 | 1 | 1,738 | 0 | python,flask,spyne | I am assuming a shared config file approach is not possible for you, otherwise I would go for import from the config file in the spyne
e.g from config import blah blah
just a thought | 0 | 0 | 0 | 0 | 2013-10-14T09:05:00.000 | 2 | -0.099668 | false | 19,356,827 | 0 | 0 | 1 | 2 | I have Flask application and need to add SOAP server functionality to integrate with some services. The Spyne library was choosen for SOAP. I found how to combine Flask and Spyne wsgi apps together using werkzeug.wsgi.DispatcherMiddleware. But now I faced with issue of getting Flask app config inside Spyne service view... |
Spyne with Flask application context | 19,360,943 | 0 | 1 | 1,738 | 0 | python,flask,spyne | I don't know how to get hold of that config object outside of the Flask context, but if you can, you can setattr anything to the Application instance which is acccessible via ctx.app within Spyne's @rpc context. | 0 | 0 | 0 | 0 | 2013-10-14T09:05:00.000 | 2 | 1.2 | true | 19,356,827 | 0 | 0 | 1 | 2 | I have Flask application and need to add SOAP server functionality to integrate with some services. The Spyne library was choosen for SOAP. I found how to combine Flask and Spyne wsgi apps together using werkzeug.wsgi.DispatcherMiddleware. But now I faced with issue of getting Flask app config inside Spyne service view... |
In web.py, How to 301 redirect to another domain? | 19,360,420 | 0 | 0 | 384 | 0 | python,http,web,web.py | which is not what we want:
http://google.com
So why do you then redirect to www.google.com instead of http://google.com? | 0 | 0 | 1 | 0 | 2013-10-14T12:31:00.000 | 2 | 0 | false | 19,360,323 | 0 | 0 | 1 | 1 | Function seeother() and redirect() in web.py is no use. I try to use
web.header('Location', 'www.google.com')
web.header('status', '301')
or
web.HTTPError('301', {'Location': 'www.google.com'})
but still redirect to:
http://127.0.0.1:80/www.google.com
which is not what we want:
http://google.com
How to redirect correct... |
How can I avoid "Warning: Field 'xxx' doesn't have a default value" in Storm? | 20,010,872 | 0 | 1 | 770 | 1 | python,mysql,apache-storm | Is it not possible for you to remove the 'IsNull' constraint from your MySQL database? I'm not aware of any where it is not possible to do this. Otherwise you could set a default string which represents a null value. | 0 | 0 | 0 | 0 | 2013-10-15T04:26:00.000 | 1 | 0 | false | 19,373,289 | 0 | 0 | 1 | 1 | I'm just curious if there's a way to make the no default value warning I get from Storm to go away. I have an insert trigger in MySQL that handles these fields and everything is functioning as expected so I just want to remove this unnecessary information. I tried setting the default value to None but that causes an er... |
Extract header/footer from PDF (programmatically) | 19,401,254 | 6 | 4 | 4,166 | 0 | python,pdf,document | Page headers and footers are not (at least not necessarily) located in some content part separate from the rest of the page content. Thus, in general there is no way to reliably extract headers and footers from PDFs.
It is possible, though, to try and use heuristics which look at the whole PDF contents and try to guess... | 0 | 0 | 0 | 1 | 2013-10-15T09:15:00.000 | 1 | 1.2 | true | 19,377,427 | 0 | 0 | 1 | 1 | Is this possible to extract the header and/or footer from a PDF document?
As I tried a few options (including PDFMiner, the Ruby gem pdf-extract, study the PDF format specs), I'm starting to suspect that the header/footer information is not available whatsoever.
(I would like to do this from Python, if possible, but an... |
Django and file permissions problems | 39,356,674 | 0 | 0 | 125 | 0 | python,django,macos | I figured out the problem. Its the way I installed django in my system. Previously I used sudo easy_install , but this time I created a virtual env and installed django with pip and it worked well. Virtual environment is the best solution for package installation in python. It wont mess with system packages. | 0 | 0 | 0 | 0 | 2013-10-15T14:37:00.000 | 1 | 1.2 | true | 19,383,989 | 0 | 0 | 1 | 1 | I installed Django 1.5.4 on my MAC OSX 10.6.8. I created a test project.
And I am unable to edit any of those files, it says read only. I can sudo it and do the modifications.
But what are the other files it may try to access during run time, if they are read only then my application is not working, for example: sqlite... |
Parse HTML by line | 19,393,621 | 1 | 1 | 378 | 0 | python,html,parsing,beautifulsoup | consider this example: http://www.pythonforbeginners.com/python-on-the-web/web-scraping-with-beautifulsoup/ there is line-by-line processing and matching of href(you need td)
additionaly consider: soup.find_all("td", limit=3) | 0 | 0 | 1 | 0 | 2013-10-16T00:50:00.000 | 1 | 1.2 | true | 19,393,524 | 0 | 0 | 1 | 1 | I am parsing an HTML webpage with Python and Beautiful Soup (I am open to other solutions, though). I am wondering if it is possible to parse the file based on a line of HTML, i.e., get the td tag from line3. Is this possible? |
Multiple migrations in django south | 19,406,368 | 0 | 1 | 117 | 0 | python,django,django-models,django-south | South will run all the remaining migrations. | 0 | 0 | 0 | 0 | 2013-10-16T14:30:00.000 | 2 | 0 | false | 19,406,170 | 0 | 0 | 1 | 2 | I couldn't find a clear cut answer to this via google or the south docs, so i'm posting it here.
I've been using south for a while to manage my django models, however, until now i've always done one migration, pushed to the production server and migrated on there as well. I was wondering, is it possible to do multiple... |
Multiple migrations in django south | 19,406,489 | 1 | 1 | 117 | 0 | python,django,django-models,django-south | South keeps track of the migrations that were done in a history table.
In your production environment database, it will reflect the migrations you have done in there and once you push one or more new migrations and run migrate, it will check your migrations against the history table and do the necessary. | 0 | 0 | 0 | 0 | 2013-10-16T14:30:00.000 | 2 | 1.2 | true | 19,406,170 | 0 | 0 | 1 | 2 | I couldn't find a clear cut answer to this via google or the south docs, so i'm posting it here.
I've been using south for a while to manage my django models, however, until now i've always done one migration, pushed to the production server and migrated on there as well. I was wondering, is it possible to do multiple... |
customed message for a specific person via GCM(google cloud messaging) | 19,411,494 | 0 | 0 | 84 | 0 | python,push-notification,google-cloud-messaging | It is possible to send a notification to a single device on which the app is installed. Each device is assigned a registration ID when your app registers to GCM on that device. If you send this registration ID along with some identifier that identifies the user of the app on that device (the professor in your case), yo... | 0 | 0 | 0 | 0 | 2013-10-16T18:30:00.000 | 1 | 1.2 | true | 19,411,039 | 0 | 0 | 1 | 1 | just I want to ask you about GCM technology,I have to use it for my client in his application(college application). So my question : Is it possible to send a message for someone let's say a professor working in that college(Hi Sir, please you have to be present in administration today at 9 Am), of course as I said just... |
Run Function When Loggin To Django Admin | 19,418,721 | 1 | 0 | 63 | 0 | python,django,django-admin | There is the django.contrib.auth.signals.user_logged_in signal. If you only want to call the function for admin logins check the request against your admin urlconf. | 0 | 0 | 0 | 0 | 2013-10-17T02:47:00.000 | 1 | 1.2 | true | 19,417,402 | 0 | 0 | 1 | 1 | I thought this would be simple thing to figure out but I have not been able find any examples.
I just want to run a function whenever a user logs in to the Django Admin. |
Which Webserver shall i take for High-Traffic Python Web-Pages? | 19,431,028 | 1 | 0 | 227 | 0 | python,web,nginx,apache2,webserver | I would probably go with - Apache2(mod_wsgi) + Nginx(Proxy) . Where Nginx will be serving the static content and directing the dynamic content request to Apache2 server . This will improve the performance of your application . | 0 | 0 | 0 | 1 | 2013-10-17T15:18:00.000 | 2 | 1.2 | true | 19,430,713 | 0 | 0 | 1 | 1 | We want to write our Webapps in Python for High-Traffic use (800 req/sec), but we don't know which Webserver and module are the best one.
We actually think Apache2 + mod_wsgi is a good option, but maybe Apache2 + FastCGI or Nginx + mod_wsgi oder FastCGI could be better.
Any Ideas? |
Importing Packages in Ipython Notebook | 23,173,707 | 0 | 1 | 1,282 | 0 | python,module,beautifulsoup,ipython-notebook,anaconda | There are two possible answers to your question. If you have no need for running multiple copies of Python running different modules, you can simply change all instances of the string "Python27" in your PATH to "Anaconda" (assuming you want to run the Anaconda Python) as suggested in the comments.
Alternately, if you ... | 0 | 0 | 0 | 0 | 2013-10-17T17:41:00.000 | 1 | 0 | false | 19,433,585 | 1 | 0 | 1 | 1 | When I try and import BeautifulSoup into IPython Notebook I get an error message: ImportError: No module named BeautifulSoup. The package is installed and works perfectly in IDLE. When I check system version, it returns 2.7.5 |Anaconda 1.7.0 (64-bit)| (default, Jul 1 2013, 12:37:52) [MSC v.1500 64 bit (AMD64)]. This w... |
How do I find the time the user changed their password using the Google APIs? | 19,525,414 | 0 | 1 | 1,254 | 0 | google-api,google-apps,google-api-python-client,google-admin-sdk,google-apps-for-education | You cannot, that's the answer. | 0 | 0 | 1 | 0 | 2013-10-17T18:29:00.000 | 1 | 1.2 | true | 19,434,458 | 0 | 0 | 1 | 1 | This is for users in Google Apps for Business or Education.
Using the Reports API in the Admin SDK I can see when the admin changed another user's password, but I cannot find an API that will tell me when a user has changed their password. I have changed mine twice in the past couple days and it does not come up in Re... |
Error while executing django sphinx | 19,479,061 | 10 | 4 | 4,743 | 0 | django,python-sphinx | In for sphinx-doc (i have never used django-sphinx) it would never work to run make html inside the build folder. You need to go one folder level up so that the folders build and source ar visible. Most likely you will see the Makefile file here as well.
Try to change directories and run make html again. | 0 | 0 | 0 | 0 | 2013-10-18T09:45:00.000 | 1 | 1.2 | true | 19,446,500 | 0 | 0 | 1 | 1 | I have installed django sphinx for my project.After successful installation and sphinx quickstart operation, i tried for creating html inside the "build" folder using the command "make html" and it gives me the error
"make: * No rule to make target `html'. Stop.".
Any help..Thanks in advance. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.