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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Mule Exception Payload | 30,016,140 | 0 | 0 | 334 | 0 | python,exception,flask,mule,payload | did you try with getExceptionMessage().
Note point here is when exception occurs payload will be lost in the mule message. You have to store payload in session var to get it during the exception case. | 0 | 0 | 0 | 0 | 2014-09-16T13:31:00.000 | 1 | 0 | false | 25,870,184 | 0 | 0 | 1 | 1 | I'm testing my REST API on Mule ESB, and when the API, implemented using Python Flask, returns a 200 http status Mule correctly exhibits the message returned (a JSON, as it is expecting). But when I return any other status, I can't seem to exhibit the message returned, which is a string.
I'm trying to configure the ex... |
Python and Django 1.7 I need to change the source of some of the supporting modules | 25,871,179 | 3 | 0 | 53 | 0 | python,django,pip,monkeypatching | Almost everyone's on GitHub these days. Fork the repos, make your changes, and point your requirements file to your forks.
You might even want to make pull requests back to the maintainers, which will help these issues be fixed even more quickly. | 0 | 0 | 0 | 0 | 2014-09-16T14:10:00.000 | 1 | 1.2 | true | 25,871,082 | 0 | 0 | 1 | 1 | I've just upgraded to Django 1.7 and I've found that a couple of the modules we rely on which are installed by pip have small issues.
I've played on a test box and found that each of these modules only needs a couple of lines to be changed to support Django 1.7. Both have import errors which are easily fixed.
What woul... |
Not using "admin interface" is a barrier for developing with Django? | 25,871,904 | 0 | 0 | 229 | 0 | python,django,python-2.7,flask,tornado | Disclaimer: questions like "what framework is better" often doesn't have exact answer. It depends on many factors, and one of them is personal preference. So below is just my opinion.
I think, that django is the best choice in case you don't have strong arguments for other frameworks. Even if you don't plan to use it's... | 0 | 0 | 0 | 0 | 2014-09-16T14:34:00.000 | 2 | 0 | false | 25,871,611 | 0 | 0 | 1 | 2 | We are up to developing an "accounting software" with Python. The software will based on SOA (rest) and hosted on cloud.
We are actually PHP developers but we'd like to switch Python for our future software. Our Python experience is 3 months and we developed a mid-sized social media software with Python / Tornado.
Afte... |
Not using "admin interface" is a barrier for developing with Django? | 25,872,121 | 1 | 0 | 229 | 0 | python,django,python-2.7,flask,tornado | It's certainly not the case that the only benefit from Django is the admin. As you say, there are many good features: the ORM, template language, forms, authentication, and especially the third-party ecosystem are all great reasons to use Django. Now you can get all those same features with Flask if you're prepared to ... | 0 | 0 | 0 | 0 | 2014-09-16T14:34:00.000 | 2 | 1.2 | true | 25,871,611 | 0 | 0 | 1 | 2 | We are up to developing an "accounting software" with Python. The software will based on SOA (rest) and hosted on cloud.
We are actually PHP developers but we'd like to switch Python for our future software. Our Python experience is 3 months and we developed a mid-sized social media software with Python / Tornado.
Afte... |
Django session scope | 25,891,456 | 0 | 0 | 684 | 0 | python,django,session,satchless | You haven't shown any code at all, which would have been helpful. But I expect the problem is that you're not passing the request object to the template context in your "home" view: usually this happens automatically if you are using a RequestContext or the render shortcut, which presumably you are doing in the other v... | 0 | 0 | 0 | 0 | 2014-09-17T11:42:00.000 | 1 | 1.2 | true | 25,889,636 | 0 | 0 | 1 | 1 | I'm currently developing an e-commerce website using Django 1.6 and Satchless. I have two applications in my project: home and nos_produits.
I'm trying to store the satchless cart object in the django session in order to display the related informations in my templates. Everything works fine in the scope of my applica... |
Weasprint and Twitter Bootstrap | 25,938,231 | 0 | 0 | 512 | 0 | python,twitter-bootstrap,pdf,flask,weasyprint | I figured out what the problem was. When I declared the style sheet i set media="screen", I removed that tag element and it seemed to fix it. Further research indicated I could also declare a separate stylesheet and set media="print". | 0 | 0 | 0 | 1 | 2014-09-17T22:48:00.000 | 1 | 1.2 | true | 25,901,582 | 0 | 0 | 1 | 1 | Does anybody have any experience rendering web pages in weasyprint that are styled using twitter Bootstrap? Whenever I try, the html renders completely unstyled as if there was no css applied to it. |
DJANGO default/error url | 25,908,284 | 0 | 0 | 59 | 0 | python,django,url-pattern | You should create
404.html
file inside your TEMPLATE_DIRS path | 0 | 0 | 0 | 0 | 2014-09-18T08:53:00.000 | 2 | 0 | false | 25,908,254 | 0 | 0 | 1 | 1 | Is there a way for an url in django to be triggered when no pattern matched the url requested by the client, something like:
defaulturl = "/path/to/default/page"
errorpage = "/path/to/error/page"
Thank you! |
Testing an ORM for RethinkDB | 25,922,468 | 3 | 3 | 484 | 1 | python,unit-testing,testing,orm,rethinkdb | You can create all your databases/tables just once for all your test.
You can also use the raw data directory:
- Start RethinkDB
- Create all your databases/tables
- Commit it.
Before each test, copy the data directory, start RethinkDB on the copy, then when your test is done, delete the copied data directory. | 0 | 0 | 0 | 1 | 2014-09-18T15:32:00.000 | 1 | 1.2 | true | 25,916,839 | 0 | 0 | 1 | 1 | I am close to finishing an ORM for RethinkDB in Python and I got stuck at writing tests. Particularly at those involving save(), get() and delete() operations. What's the recommended way to test whether my ORM does what it is supposed to do when saving or deleting or getting a document?
Right now, for each test in my s... |
Can I run Python 2.7 Libraries (Impacket, Pcapy) on Django | 25,932,635 | 1 | 0 | 151 | 0 | python,django,flask | You can run anything from Django, it just provides a framework to get stuff to the web.
As long as the Django application is running as a user which has privileges to access your NIC there won't be an issue with that.
You can simply call your code you already have from the Django Views.
The time this stuff takes may be... | 0 | 0 | 0 | 0 | 2014-09-19T04:28:00.000 | 1 | 1.2 | true | 25,926,384 | 0 | 0 | 1 | 1 | Hi I just want to ask if its possible to run Impacket to Django,
On my project I am already done on my sniffing and parsing using Impacket and Pcapy but my clients requested that the GUI will be web based. I picked Django because its the most widely used and all but I am having doubts that it can run my Libraries.
Fo... |
Avoiding Exception Value: maximum recursion depth exceeded while calling a Python object in Django signals | 25,955,108 | 0 | 1 | 478 | 0 | python,django | Alter your need. "Overcoming" the recursion would just mean that you succeed at creating infinite objects, which is inadvisable.
If what you really need is to create a second Invoice only when the first one was created manually, well, that's different. Make your function do nothing unless the sender is manually-creat... | 0 | 0 | 0 | 0 | 2014-09-21T02:01:00.000 | 1 | 1.2 | true | 25,955,073 | 1 | 0 | 1 | 1 | I need to create an invoice object whenever an invoice is created from inside post_save.connect(after_saving_invoice, sender=Invoice). This is causing Exception Value: maximum recursion depth exceeded while calling a Python object.
The reason of the exception is clear but how can I overcome it? |
Display the number of duplicate requests filtered in the post-crawler stats | 25,967,819 | 0 | 1 | 108 | 0 | python,scrapy | You can maintain a list of urls that u have crawled , whenever you came across a url that is already in the list you can log it and increment a counter. | 0 | 0 | 1 | 0 | 2014-09-22T01:33:00.000 | 1 | 0 | false | 25,965,606 | 0 | 0 | 1 | 1 | One of the Scrapy spiders (version 0.21) I'm running isn't pulling all the items I'm trying to scrape.
The stats show that 283 items were pulled, but I'm expecting well above 300 here. I suspect that some of the links on the site are duplicates, as the logs show the first duplicate request, but I'd like to know exactly... |
Is there a way to select more than one option in django admin filters? | 25,978,053 | 0 | 2 | 495 | 0 | python,django,django-admin | For your first question:
I think it's possible. I've made a quick test on the admin interface for Users, and if you play with the URL querystring, you can combine filters : /admin/auth/user/?is_superuser=1&is_superuser=0 will list both super and non-super users.
You'll have to override admin filters template to generat... | 0 | 0 | 0 | 0 | 2014-09-22T04:14:00.000 | 1 | 1.2 | true | 25,966,602 | 0 | 0 | 1 | 1 | I actually have two questions, please answer what you can:
Question 1:
In django admin, if you have list_filters = ["book"], and your options were "red carpet" & "Bingo the Dinosaur", you can only select one book at a time; either "red carpet" or "Bingo the Dinosaur". Is there a way to make it so that the user can sele... |
User data through Google APIs without authorization flow | 26,019,429 | 0 | 0 | 664 | 0 | heroku,google-api,google-calendar-api,google-authentication,google-api-python-client | So, you want to be remembered.
If you want to dispose of any kind of authenticacion but yet the user needs to be recognized you should be using a cookie.
On the server side that cookie should be used to select the offline token.
Of course, without that cookie the user needs to be authenticated in any way. I would make ... | 0 | 0 | 0 | 0 | 2014-09-23T00:28:00.000 | 2 | 0 | false | 25,985,069 | 0 | 0 | 1 | 1 | I'm writing a web application that reads my personal calendar data, crunches stats, and then spits them out for the world to see. I don't need an authorization flow. Is it possible to leverage the Google APIs without going through a user sign-in flow? In other words, I want my personal Google account permanently and se... |
Better to maintain a list in datastore or csv file? | 25,990,090 | 0 | 0 | 98 | 0 | python,google-app-engine,google-cloud-datastore,app-engine-ndb | As I know get_by_id() (small) operations are free of charge. So you will pay only for instance hours. But I think it would be better to store subscription emails in another kind, because storage is cheap, and denormalization of data is a good practice on GAE. Anyway CSV does not looks like a good idea. | 0 | 0 | 0 | 0 | 2014-09-23T07:46:00.000 | 2 | 0 | false | 25,989,667 | 0 | 0 | 1 | 1 | I want to maintain an email blacklist of people who don't want to ever receive email from my service.
Before I send each email, I want to do a lookup on whether the recipient is in the list.
Which of 2 choices is better?
I can create a BlacklistEmail model in datastore and key it on the email address so I can have f... |
dev_appserver.py doesn't load appengine_config.py | 25,990,536 | 3 | 5 | 698 | 0 | python,google-app-engine | I had the same problem before. Solved by changing the loading method in app.yaml to wsgi, for example, from:
script: my_app/main.py
To:
script: my_app.main.application
Let me know if it works for you. | 0 | 1 | 0 | 0 | 2014-09-23T08:06:00.000 | 1 | 1.2 | true | 25,990,036 | 0 | 0 | 1 | 1 | I have an App Engine app running locally using dev_appserver.py. In the app directory I have the standard appengine_config.py that is supposed to execute on every request made to the app. In the past it used to execute the module, but suddenly it stopped doing it.
In another app runs on the same machine it works fine.
... |
Edx Studio not showing with a theme | 26,646,633 | 0 | 0 | 276 | 0 | python,django,django-templates,mako,edx | port 18010 is forwaded via nginx, So you have to run studio collectstatic.
ie..update_assets for cms(studio) in edx. | 1 | 0 | 0 | 0 | 2014-09-24T07:59:00.000 | 2 | 0 | false | 26,011,567 | 0 | 0 | 1 | 1 | The Studio app that is served on port 18010 shows with no theme. It only shows black text on a white background and with no images... that happens while the other counterpart LMS (on port 80) app shows fine.
Where shall I start troubleshooting this problem? |
Why is Django creating my TextField as a varchar in the PostgreSQL database? | 26,030,265 | 1 | 2 | 1,186 | 1 | python,sql,django,postgresql,psycopg2 | I'm not sure what the exact cause was, but it seems to be related to django's migration tool storing migrations, even on a new database.
What I did to get this behavior:
Create django project, then apps, using CharField
syncdb, run the project's dev server
kill the devserver, modify fields to be TextField
Create a new... | 0 | 0 | 0 | 0 | 2014-09-24T23:35:00.000 | 1 | 1.2 | true | 26,028,200 | 0 | 0 | 1 | 1 | Django 1.7, Python 3.4.
In my models I have several TextFields defined.
When I go to load a JSON fixture (which was generated from an SQLite3 dump), it fails on the second object, which has 515 characters for one of its fields.
The error printed is
psycopg2.DataError: value too long for type character varying(500)
I c... |
How to post a form to django site, securely and from another site | 26,081,085 | 1 | 0 | 389 | 0 | javascript,python,django,forms,security | I have a django app which need to receive post requests from another
site using html+javascript.
You don't have to ! You can build an API instead ;)
You create an API call - small site calls the API of main site. In that situation, the form is handled by a view in small site and the API is called via the server. Che... | 0 | 0 | 0 | 0 | 2014-09-28T01:13:00.000 | 1 | 0.197375 | false | 26,080,694 | 0 | 0 | 1 | 1 | I have a django app which need to receive post requests from another site using html+javascript.
For example i have mydjangosite.com and smallhtmlsite.com
What i want is : user visit smallhtmlsite.com and fill a form, then he pushing submit button and mydjangosite.com receive request and create objects(form saving mo... |
When using a flask application does using print negatively affect performance? | 26,085,702 | 2 | 1 | 349 | 0 | python,logging,heroku,flask | Both outputs (print and logger) end up in a file, the only difference is that a logger typically allows for some filtering of the output and tries to add as little overhead as possible when messages are filtered out. This means its not possible to say without testing, IE comparing the two. You should be able to use the... | 0 | 0 | 0 | 0 | 2014-09-28T04:32:00.000 | 1 | 1.2 | true | 26,081,637 | 0 | 0 | 1 | 1 | I've deployed an flask app on heroku and since it's relatively small I never bothered to setup the logger. I have found by using a print statement I can see everything I need on one of herokus add-on loggers. What I'm wondering is does that negatively affect performance vs had I just used the built in logger in flask? ... |
How can I get the "old" zip() in Python3? | 26,090,123 | 8 | 6 | 4,304 | 0 | python,django,python-3.x | Just make a list of the result by doing list(zip(...)). | 0 | 0 | 0 | 0 | 2014-09-28T22:02:00.000 | 1 | 1.2 | true | 26,090,117 | 1 | 0 | 1 | 1 | I migrated from Python 2.7 to Python 3.3 and zip() does not work as expected anymore.
Indeed, I read in the doc that it now returns an iterator instead of a list.
So, how I am supposed to deal with this? Can I use the "old" zip() in my Python3 code?
Find bellow the way it worked before in a Django project:
in views.py:... |
Want to create a new application for website traffic monitoring ( analysis ) | 26,095,512 | 1 | 0 | 153 | 0 | javascript,python,django,node.js,evercookie | You will have to break down your application as it is a humongous task to create something like GA.
You will have to track many user activities(click,spend time etc).so you can do that in plain js or use a cross-platform lightweight library(angular.js) that can make your life a little easy.
Now since you will have to s... | 0 | 0 | 0 | 0 | 2014-09-29T08:03:00.000 | 1 | 1.2 | true | 26,095,180 | 0 | 0 | 1 | 1 | I want to create my own application for monitoring traffic of my website without using any third party tools like google analytics. In which I want to log screenshots, user details, page details and cookies. So what technology should I opt so as to achieve this goal and which will be best suited and what work flow shou... |
how do i configure python/flask for public access with windows firewall | 28,746,633 | 1 | 3 | 8,285 | 0 | python,flask,windows-firewall | When running as a service the program running the service is not python.exe but rather pythonservice.exe. You will have to add that to the allowed programs in the Windows Firewall Setup. In my case it is located under C:\Python33\Lib\site-packages\win32\pythonservice.exe. | 0 | 0 | 0 | 0 | 2014-09-29T14:49:00.000 | 2 | 0.099668 | false | 26,102,680 | 0 | 0 | 1 | 1 | We have developed an app in python and are using flask to expose its api via http requests.
all this on WINDOWS -
Everything works ok and we have tested in-house with no problems and we are now trying to use the app in the real world - we have gotten our IT dept to give us a public facing ip/port address (forwarded ... |
use dev_appserver.py for specific file in a directory | 26,136,777 | 1 | 0 | 52 | 0 | python,google-app-engine,cmd | dev_appserver doesn't "run a file" at all. It launches the GAE dev environment, and routes requests using the paths defined in app.yaml just like the production version.
If you need to route your requests to a specific Python file, you should define that in app.yaml. | 0 | 1 | 0 | 0 | 2014-10-01T07:53:00.000 | 1 | 1.2 | true | 26,136,643 | 0 | 0 | 1 | 1 | In order to start Google app engine through the cmd i use: dev_appserver.py --port=8080, but i can't figure how does it pick a file to run from the current directory.
My question is, is there an argument specifying a file to run in the server from all possible files in the directory? |
WLST - force stop application | 26,177,888 | 1 | 1 | 3,907 | 0 | java,python,weblogic,weblogic-10.x,wlst | Try again without the options. Just the stopApplication(appName).
This is what the admin console does, kills all existing sessions and drags it to prepared state. You are trying to stop it gradually and hence the delay.
You had mentioned, "when one of this application fail to deploy for X/Y reason, I just want to force... | 0 | 1 | 0 | 0 | 2014-10-01T08:06:00.000 | 1 | 1.2 | true | 26,136,844 | 0 | 0 | 1 | 1 | I am currently working with weblogic and the thing is that I deploy several applications on my weblogic server. Sadly, when one of this application fail to deploy for X/Y reason, I just want to force stop this application and to pass to the other one.
I've already looked into the WLST doc and I don't find what I am sea... |
Python/Django get country flag from IP | 26,143,098 | 0 | 0 | 1,719 | 0 | python,django,geodjango,django-countries | Personally I would set a generic flag as a fallback (django flag perhaps?) if user does not set their country, and to be fair there must be a reason if user doesn't. Or you can simply make that country field mandatory.
And assuming that person in that country based on their existing IP just doesn't sound right.
Imagine... | 0 | 0 | 0 | 0 | 2014-10-01T13:23:00.000 | 2 | 0 | false | 26,142,468 | 0 | 0 | 1 | 1 | I am using django-countries to get a flag from the CountryField and it works. However, some users don't have a country set on their profiles, but I still have to display a flag. My idea was to get a country from IP and then get a flag from the country or anything similar to that.
Unfortunately, this is not happening in... |
django multiple database for multiple organisation in a single project | 26,158,170 | 1 | 0 | 181 | 1 | mysql,django,python-2.7 | It doesn't make sense to create a new database for each organization. Even if the number of customers or organizations grows to the hundreds or thousands, keeping data in a single database is your best option.
Edit:
Your original concern was that an increase in the number of organizations would impact performance. Well... | 0 | 0 | 0 | 0 | 2014-10-02T09:07:00.000 | 1 | 0.197375 | false | 26,157,625 | 0 | 0 | 1 | 1 | In my project there is two models ,ORGANISATION and CUSTUMER .Here what i am doing is while i am adding new customer to the organisation i save the organisation_id to the table CUSTOMER .But now i am worrying about the performance of my project when the database becomes huge.
So now i am planning to create new database... |
Get the current company without ids or uid in Odoo / OpenERP | 26,207,355 | 1 | 1 | 5,993 | 0 | python,openerp,openerp-7 | Not sure I completely understand your question.
A user may be able to do something in any company depending on their list of allowed companies, but a user can only ever do something in one company at a time.
Any user can change their current company to one of the companies they are allowed but when they do this, the co... | 0 | 0 | 0 | 0 | 2014-10-02T16:29:00.000 | 2 | 0.099668 | false | 26,165,247 | 0 | 0 | 1 | 1 | I need to create a function that takes a default value, this value is distinct for each company.
Thing is that I can't use the uid because the user can do this in any company, and I have no object to ask ids for because its for a default field.
Is there any way to get the current company without using ids or the uid ?
... |
Python - install Pillow and MySQL-python on 1and1 hosting | 26,166,726 | 0 | 0 | 390 | 0 | python,mysql,django,pillow | There's not really enough detail here to help. But one possibility is that you don't have the development package for python installed. If you are using Debian or Ubuntu, you can do sudo apt-get install python-dev to install it. | 0 | 0 | 0 | 0 | 2014-10-02T17:15:00.000 | 1 | 0 | false | 26,166,024 | 1 | 0 | 1 | 1 | I've created python virtual environment, installed django using pip and now I would like to install Pillow and MySQL-python using pip but it fails during compile process.
(starting with python.h no such file or directory)
Has anyone tried intall some of these on 1and1 hosting ?
Maybe compile it on different machine or ... |
Django sqlite3 database dump | 26,179,396 | 0 | 0 | 1,114 | 1 | python,django,database,sqlite | You could also use fixtures. And generate fixtures for your app. Dependes on what you're planing to do with them.
You'll just make a loaddata after that. | 0 | 0 | 0 | 0 | 2014-10-03T12:07:00.000 | 2 | 0 | false | 26,178,633 | 0 | 0 | 1 | 1 | How can i create Django sqlite3 dump file (*.sql) using terminal?
There is a fabric fabfile.py with certain dump scripts, but when i try to use fab command next massage shows up:
The program 'fab' is currently not installed. To run fab please ask your administrator to install the package 'fabric'.
But there are fabri... |
How do I duplicate an appengine app | 26,194,692 | 1 | 0 | 59 | 0 | python,google-app-engine | You could create a new application, use Datastore Admin to copy your entities to the new application's Datastore, then re-deploy your application. Is there anything else that needs duplicating? | 0 | 1 | 0 | 0 | 2014-10-04T00:47:00.000 | 2 | 0.099668 | false | 26,188,548 | 0 | 0 | 1 | 2 | I want to backup my python app and restore it to a different app on Appengine. In the Application Setting Page, under Duplicate Applications, I add a new application identifier.
When I click the Duplicate Application button, I get this error: "The developer does not own the app id being forked".
Further research ind... |
How do I duplicate an appengine app | 26,194,002 | 1 | 0 | 59 | 0 | python,google-app-engine | Do you have more than one google account? I have found that app engine does unexpected things when you are logged into more than one google account at a time.
I suggest logging into only a single google account and trying the operations again. | 0 | 1 | 0 | 0 | 2014-10-04T00:47:00.000 | 2 | 0.099668 | false | 26,188,548 | 0 | 0 | 1 | 2 | I want to backup my python app and restore it to a different app on Appengine. In the Application Setting Page, under Duplicate Applications, I add a new application identifier.
When I click the Duplicate Application button, I get this error: "The developer does not own the app id being forked".
Further research ind... |
Append choices to choice list in Django models dynamically | 26,194,172 | 1 | 0 | 785 | 0 | python,mysql,django | I think your choice of type field is incorrect. Basically CharField with choices has limited functionality and you can't do this with it you can only filter the choices you declared initially but you can't add new ones on the fly (you will see them but they will not pass the field validation). I think you should go wit... | 0 | 0 | 0 | 0 | 2014-10-04T04:17:00.000 | 1 | 0.197375 | false | 26,189,557 | 0 | 0 | 1 | 1 | I want to select the options from a list in my django models. But the options in the list are populated in the post_save() method.The situation is like this:
I enter some attributes in the table1 based on which the value of other attributes of the table is calculated using different algorithms in post_save() method.
N... |
Is there a ways to take out the artist and song from the array? | 26,199,110 | 0 | 0 | 27 | 0 | python,python-2.7 | Assuming this array is a string array of x strings, you can create a substring from the index of the second instance of '|' to the end of the string. | 0 | 0 | 0 | 0 | 2014-10-05T02:30:00.000 | 1 | 0 | false | 26,199,088 | 0 | 1 | 1 | 1 | Suppose you have this type of array (Sonny Rollins|Who Cares?|Sonny Rollins And Friends|Jazz|
Various|, Westminster Philharmonic Orchestra conducted by Kenneth Alwyn|Curse of the Werewolf: Prelude|Horror!|Soundtrack|1996). Is there any possible way to only take out Sonny Rollins and Who cares from the array? |
Execute the script in command line or in Rest client | 28,648,892 | 0 | 1 | 663 | 0 | java,python,web-services,architecture | I would personally recommend wrapping the Python code in an HTTP layer and turning it into a REST web service. I don't doubt that many successful applications have been written by calling scripts from the command line, but I think there are a couple things that are really nice when it comes to the freedoms of a web ser... | 0 | 0 | 1 | 0 | 2014-10-07T12:21:00.000 | 2 | 0 | false | 26,235,884 | 0 | 0 | 1 | 2 | I have a java web application that needs to make use of a python script. The web application will give the script a file as input and take some text as output.
I have two options:
Wrap the python script with HTTP and call it from the web application as a REST service
Simply execute command line from the web applicati... |
Execute the script in command line or in Rest client | 26,236,230 | 0 | 1 | 663 | 0 | java,python,web-services,architecture | Try both things but try to execute in command line to know the output line by line.
you can find any error in the line when that line will execute
while at rest service it will return you an Http response. | 0 | 0 | 1 | 0 | 2014-10-07T12:21:00.000 | 2 | 0 | false | 26,235,884 | 0 | 0 | 1 | 2 | I have a java web application that needs to make use of a python script. The web application will give the script a file as input and take some text as output.
I have two options:
Wrap the python script with HTTP and call it from the web application as a REST service
Simply execute command line from the web applicati... |
authentication on webserver | 26,238,910 | 2 | 0 | 50 | 0 | php,python,django,web-frameworks | You can use any of these framework since the have authetications nativly implemented but you don't need to, you can build your own authentication system: You will need a database/file to store credentails and a authentication program verifying credentials against this given storage in any language your webserver can us... | 0 | 0 | 0 | 1 | 2014-10-07T14:14:00.000 | 1 | 1.2 | true | 26,238,097 | 0 | 0 | 1 | 1 | on my beaglebone i have installed hostapd, iscdhcp and lighttpd so i can build a router and webserver.
let say my network is not secured so every on can be connected to it, and will get an ip-address from the beaglebone-server.
After the person is connected to the network and he starts a browser he should be redirecte... |
How can I save every Outlook Express Email as an html without clicking "Save As" for every email | 26,245,689 | 1 | 0 | 123 | 0 | javascript,python,html,email,outlook | Outlook Express, unlike real Outlook, does not provide any API to enumerate its messages. The only API exposed by OE is Simple MAPI. | 0 | 0 | 0 | 1 | 2014-10-07T21:18:00.000 | 1 | 1.2 | true | 26,245,476 | 0 | 0 | 1 | 1 | I am trying to save a whole slew of emails as html in Outlook Express, but the program only lets me save them individually. If I click "Save As" on more than one email Outlook only lets me save them all in one .txt file. I was able to drag all of the files into a folder outside of outlook, but their file type is Outloo... |
Using Django Settings to cache a timestamp | 26,723,457 | 0 | 0 | 129 | 0 | python,django,django-settings | So the short answer to this question: Do not store global runtime data in Django's settings. Each new process thread will create its own instance of settings, meaning that your application will behave differently in each thread, or you'll have to run your app in single threaded mode (bad for performance).
If you need t... | 0 | 0 | 0 | 0 | 2014-10-08T00:15:00.000 | 1 | 1.2 | true | 26,247,293 | 0 | 0 | 1 | 1 | I want to use the Django Settings to indefinitely store a value. This value will change throughout the life span of the server process and should not be forgotten. See, what I am trying to do is generate a static file on my server's file system and store its generation time in django.conf.settings.
I am more than aware... |
does django-nonrel is compatible with django 1.7 | 26,293,980 | 0 | 1 | 250 | 1 | django,python-2.7,django-nonrel | Django-nonrel isn't "compatible" with anything. It is actually a fork of Django, currently based on the 1.5 release. | 0 | 0 | 0 | 0 | 2014-10-10T06:49:00.000 | 1 | 0 | false | 26,293,481 | 1 | 0 | 1 | 1 | I am using Django 1.7 and I want to use MongoDB, So for that I try to install django-nonrel. Please let me know django-nonrel is compatible with Django 1.7? |
Paypal loses session data | 27,332,269 | 1 | 0 | 151 | 0 | django,python-2.7,django-paypal,paypal,django-oscar | The problem was i was using get method for redirecting to paypal,later i changed that to post and it worked for me.I have used oscar for this, in that checkout view i wrote redirection in post function,which made it work | 0 | 0 | 0 | 0 | 2014-10-10T09:16:00.000 | 1 | 1.2 | true | 26,295,908 | 0 | 0 | 1 | 1 | Am using django oscar paypal and django oscar-0.7, when i submit for payment page get redirected to paypal site. After continuing that step and redirecting back to my site, it shows basket is empty and all paypal session is lost. Am stuck up here. Please help me in this? |
odoo mod_wsgi schedulers not working | 26,330,930 | 0 | 0 | 246 | 0 | python,apache,deployment,openerp,mod-wsgi | The schedulers don't work when running through wsgi because your Odoo instances are just workers. AFAIK you just run a standalone instance on a 127.0.0.1 port and it runs your scheduled tasks. | 0 | 1 | 0 | 0 | 2014-10-10T15:18:00.000 | 1 | 0 | false | 26,302,718 | 0 | 0 | 1 | 1 | When I deploy openerp/odoo using mod_wsgi, I found my schedulers stop working, can any one help how can I get my cron/schedulers working. If I deploy it using mod_proxy it will solve the issue but I want to deploy using mod_wsgi. |
Django apps structure | 26,305,048 | 0 | 1 | 73 | 0 | python,django | When you say "procedures" i guess you're talking about pages (or views in Django). So I would implement a single "app" to do that.
Remember a project is composed of apps. When you create a project a main app (with the same name of the project) is created. This is a good place to code the procedures you said.
Think of a... | 0 | 0 | 0 | 0 | 2014-10-10T16:57:00.000 | 1 | 0 | false | 26,304,413 | 0 | 0 | 1 | 1 | I'm learning Django but it's difficult to me to see how should I divide a project into apps?
I've worked on some Java EE systems, almost for procedures for government and all that stuff but I just can't see how to create a Django project for this purposes?
For example, if you should have to do a web app for making easi... |
Best way to display real-time data from an SSH accesible file on webpage | 26,307,516 | 1 | 1 | 856 | 0 | php,python,wordpress,ssh,webpage | Have a program monitor the file, either locally or via SSH. Have that program push updates into your web backend, via HTTP API or such. | 0 | 1 | 0 | 1 | 2014-10-10T19:58:00.000 | 2 | 0.099668 | false | 26,307,163 | 0 | 0 | 1 | 1 | I have a temperature logger that measures the records temperature values at specified time intervals. Currently I push these to a google spreadsheet but would like to display the values automatically on a web-page.
I have no experience with anything to do with web-pages, except setting up a few Wordpress sites but am ... |
Android - ADB/MonkeyRunner Setting API Levels | 26,311,559 | 0 | 0 | 225 | 0 | android,python,adb,monkeyrunner | You are trying to install an APK which is intended for a higher version onto API level 8 and thus the package manager refuses to install it. It has nothing to do with adb or monkeyrunner. | 0 | 0 | 0 | 0 | 2014-10-11T04:20:00.000 | 1 | 1.2 | true | 26,311,022 | 0 | 0 | 1 | 1 | I've downloaded an APK onto a Velocity Cruz Tablet running Android 2.2.1 (API Level 8), and I'm trying to install it via whatever I can manage to make work. I already had ADT on my computer (Windows 8.1 if this helps) for API Level 19 for use with my phone. So I used the SDK Manager to get API Level 8. I can't for the ... |
unable to save a .py file in sublime using django | 26,313,332 | 1 | 0 | 619 | 0 | django,python-2.7,sublimetext3 | please check if you are permitted to write on that directory. | 0 | 0 | 0 | 0 | 2014-10-11T05:42:00.000 | 1 | 0.197375 | false | 26,311,527 | 0 | 0 | 1 | 1 | I am a total noob in python.I am trying to save a .py file which I wrote it using the sublime3 editor but it doesn't allow me to save it.It says the file is read only.I am using django framework .Any suggestions ? |
How to manually copy folder to /app/.heroku/python/lib/python2.7/site-packages/? | 26,317,020 | 0 | 1 | 248 | 0 | python,heroku,importerror,psycopg2 | You could keep the psycopg2 directory in the same directory of apps, but that's actually a hack and you should try fix on installing psycopg2 on Heroku. | 0 | 0 | 0 | 1 | 2014-10-11T15:34:00.000 | 1 | 0 | false | 26,316,273 | 0 | 0 | 1 | 1 | I have deployed my local python web service project to Heroku. I have all my dependencies in requirement.txt file. But, one module psycopg2 is not getting installed properly and I am getting installation error. So, I removed it from requirement.txt and thought I will push everything to heroku first, and then I will man... |
Open a URL with default broswer? | 26,428,421 | 1 | 3 | 1,277 | 0 | android,segmentation-fault,android-browser,qpython,pyjnius | Apparently, this happens just in console mode, so in other QPython mods it works fine. | 1 | 0 | 0 | 0 | 2014-10-11T19:16:00.000 | 2 | 1.2 | true | 26,318,326 | 0 | 0 | 1 | 1 | I'm new developer in QPython (experienced with python), I want to open an url with user's default browser.
I tried AndroidBrowser().open("...") but, to my surprise, I got Segmentation Fault!
So I said OK, let's try to open it manually as activity, then I tried to import jnius and got Segmentation Fault as well.
Any sug... |
Gunicorn workers restart by connection reset | 26,890,297 | 0 | 2 | 882 | 0 | python,deployment,pyramid,wsgi,gunicorn | I mis-diagnosed the problem. It seems that both Firefox and Chrome perform certain optimizations when loading the same page address multiple times. I thought the server was becoming irresponsive, but in fact there were no requests generated to serve. | 0 | 0 | 0 | 0 | 2014-10-12T00:30:00.000 | 1 | 0 | false | 26,320,645 | 0 | 0 | 1 | 1 | It seems to me that my gunicorn workers are restarted each time there is connection reset by a browser (e.g. by reloading a page while a request is still progress or as a result of connectivity problems).
This doesn't seem to be a sensible behaviour. Effectively I can bring down all the workers just by refreshing a pag... |
google app engine dev_appserver.py file not found | 39,908,883 | 1 | 2 | 1,087 | 0 | python,google-app-engine,python-2.7 | On my PC it is found under this directory:
C:\Users\Bob\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine
I would assume that on Apple OS it will be similar based on where you decided to install the Cloud SDK. | 0 | 1 | 0 | 0 | 2014-10-12T11:28:00.000 | 1 | 0.197375 | false | 26,324,636 | 0 | 0 | 1 | 1 | i have searched through many python issues and none seem to help me with mine or i just don't understand it enough to resolve the issue. basically i am trying to learn python so in the process on my mac i have installed serveral versions and had many version issues which so far i have been able to resolve by looking up... |
Module rest_framework not found on pythonanywhere.com app | 26,351,856 | 3 | 2 | 1,418 | 0 | python,django,django-rest-framework,pythonanywhere | It turns out that it was a python version issue. It was installing rest_framework under python 2.7 and my application was using python 3.3. To install it for python 3.3 I ran the following.
pip3.3 install djangorestframework | 0 | 0 | 0 | 0 | 2014-10-14T01:55:00.000 | 1 | 1.2 | true | 26,351,509 | 0 | 0 | 1 | 1 | I am having trouble deploying my app on pythonanywhere.com. I have followed instructions to get teh django rest frameowrk package installed via pip by running the following
pip install --user djangorestframework
When I go into my console and run pip freeze it outputs djangorestframework==2.4.3 as one of the installed p... |
How to store data crawled in scrapy in specfic order? | 26,378,448 | 0 | 0 | 262 | 0 | python-2.7,scrapy,web-crawler | For this we have to make a list in fields_to_export in the BaseItemExporter class
field_iter = ['Offer', 'SKU', 'VendorCode'] like this
and then have to pass this list in the field | 0 | 0 | 0 | 0 | 2014-10-14T07:35:00.000 | 2 | 0 | false | 26,355,152 | 0 | 0 | 1 | 1 | I have to crawl data from a web page in a specfic order as liked i declared fields in my item class and then have to put them in csv file.problem now occuring is there its stores data not in specfic order as like its scrapping data of any field and putting in csv file but i want it should store data as i declared in my... |
Make an object exists in all templates | 26,358,812 | 1 | 0 | 58 | 0 | python,django,templates,variables | You can add variables to context | 0 | 0 | 0 | 0 | 2014-10-14T10:26:00.000 | 2 | 0.099668 | false | 26,358,511 | 0 | 0 | 1 | 1 | I have a django and I wrote some views. I know how to pass my variables to template, but I also has some external modules with their own views, which I wont modify. Please help me understand how can I get one of my object "Menu.objects.all()" exist in all templates? So for example a I have django-registration and i wan... |
How to search for JavaScript variables in a file, using Python? | 26,358,654 | -3 | 1 | 1,278 | 0 | javascript,python | If you use an IDE such as phpstorm, it can easily find variables for you. I don't see the use in programming something in Python to do this. | 0 | 0 | 0 | 0 | 2014-10-14T10:28:00.000 | 2 | -0.291313 | false | 26,358,543 | 1 | 0 | 1 | 1 | I have directory with many JaveScript files. Here I want to scan each file and want to replace each JavaScript variable with string like 'str1', 'str2', 'str3', ..., 'strn' and so on.
My question is: how to identify a JavaScript variable?
Doubts:
If I say keyword after var is a variable, however there is no compulsion... |
Can I configure Django runserver to reload when static or non-python files are changed? | 49,406,541 | 1 | 5 | 3,709 | 0 | python,django | There is no need to reload server, but sometimes there is need to copy static files to be visible for the server.
Instead running collectstatic while developing, which copy recently edited static files (like javascript) from one directory to the directory, used by server.
here is a trick:
link source directory to beha... | 0 | 0 | 0 | 0 | 2014-10-15T16:29:00.000 | 5 | 0.039979 | false | 26,387,529 | 0 | 0 | 1 | 4 | By default, Django's runserver command auto reloads the server when python or template files are changed.
Is it possible to configure Django to extend its file monitoring for this purpose to other directories or sets of files, such as JavaScript or CSS files being served statically (during development)?
This would be u... |
Can I configure Django runserver to reload when static or non-python files are changed? | 26,405,259 | 1 | 5 | 3,709 | 0 | python,django | The static files are automatically served from disk, so there is no need to reload the dev server.
But your browser has it's own cache, and is keeping some of your static files in it...
To reload it use this shortcut :
Ctrl + Shift + r
OR
Ctrl + f5
If your on mac use CMD button instead of ctrl | 0 | 0 | 0 | 0 | 2014-10-15T16:29:00.000 | 5 | 0.039979 | false | 26,387,529 | 0 | 0 | 1 | 4 | By default, Django's runserver command auto reloads the server when python or template files are changed.
Is it possible to configure Django to extend its file monitoring for this purpose to other directories or sets of files, such as JavaScript or CSS files being served statically (during development)?
This would be u... |
Can I configure Django runserver to reload when static or non-python files are changed? | 26,388,429 | 0 | 5 | 3,709 | 0 | python,django | As the comments on your question say, Django always pulls the file from the filesystem on every request, so they are not cached.
However, there is a check (indjango.views.static) for the mtime of the file if the browser sends an If-Modified-Since header which is why you may be seeing 304 Not Modified.
Regardless, woul... | 0 | 0 | 0 | 0 | 2014-10-15T16:29:00.000 | 5 | 0 | false | 26,387,529 | 0 | 0 | 1 | 4 | By default, Django's runserver command auto reloads the server when python or template files are changed.
Is it possible to configure Django to extend its file monitoring for this purpose to other directories or sets of files, such as JavaScript or CSS files being served statically (during development)?
This would be u... |
Can I configure Django runserver to reload when static or non-python files are changed? | 71,053,904 | 0 | 5 | 3,709 | 0 | python,django | The answer to this is YES, all you need to do is touch your settings file which will trigger a runserver reload. If all you need to do is source new static files, you don't need this, but if you need to trigger a reload for another reason, it is possible with a simple touch. | 0 | 0 | 0 | 0 | 2014-10-15T16:29:00.000 | 5 | 0 | false | 26,387,529 | 0 | 0 | 1 | 4 | By default, Django's runserver command auto reloads the server when python or template files are changed.
Is it possible to configure Django to extend its file monitoring for this purpose to other directories or sets of files, such as JavaScript or CSS files being served statically (during development)?
This would be u... |
Pyramid app with handlebar.js: I don't need a template for this view; how to disable? | 26,392,168 | 1 | 0 | 68 | 0 | javascript,python,templates,pyramid | This was a red herring; the URL was wrong but the log file mentioned a missing template so I was focused in the wrong direction.
I had to get a custom redirection piece of code from one of the developers on this project and I have it working now. | 0 | 0 | 0 | 0 | 2014-10-15T20:09:00.000 | 1 | 0.197375 | false | 26,391,208 | 0 | 0 | 1 | 1 | I'm adding a page to a complex Pyramid-based app that uses Handlebar templates.
I need a file download URL that doesn't need a template, but the system is giving me a 404
code for missing template anyway.
How do I tell a view at configuration time "do not use a handlebar template with this one?" |
The time to queue tasks in celery bottlenecks my application - how to parallelize .delay()? | 26,732,448 | 0 | 0 | 349 | 0 | python,parallel-processing,rabbitmq,celery,django-celery | If queuing up your tasks takes longer than the task, how about you increase the scope of the tasks so they operate on N files at a time. So instead of queuing up 1000 tasks for 1000 files. You queue up 10 tasks that operate on 100 files at a time.
Make your task take a list of files, rather than a file for input. Then ... | 0 | 1 | 0 | 0 | 2014-10-15T23:00:00.000 | 1 | 0 | false | 26,393,540 | 0 | 0 | 1 | 1 | I'm having a major problem in my celery + rabbitmq app where queuing up my jobs is taking longer than the time for my workers to perform jobs. No matter how many machines I spin up, my queuing time will always overtake my task time.
This is because I have one celery_client script on one machine doing all the queuing (c... |
Generate long-lived access token from short-lived one? | 26,395,567 | 2 | 1 | 236 | 0 | python,google-app-engine,google-oauth | there is no reason why generating more access tokens from refresh tokens would cause an error. existing non-expired access tokens are not invalidated when a new one is produced from the refresh token.
check your code for errors there.
also there is no way to generate a long lived access token. what you ask is how oau... | 0 | 0 | 0 | 0 | 2014-10-16T01:20:00.000 | 1 | 1.2 | true | 26,394,754 | 0 | 0 | 1 | 1 | Our app uses the usual short-lived access + refresh tokens to do a bunch of background services for users. This means that every now and then the services need to refresh the tokens.
We've run into an issue where 2 services try to refresh a token at the same time, thus resulting in an invalid token.
Is there a better w... |
pdfminer3k has no method named create_pages in PDFPage | 43,130,993 | 3 | 6 | 8,846 | 0 | python,pdfminer | Perhaps,you could use pdfminer.six.
It's description:
fork of PDFMiner using six for Python 2+3 compatibility
After installing it using pip:
pip install pdfminer.six
The usage of it is just like pdfminer, at least in my code.
Hope this could save your day :) | 0 | 0 | 0 | 0 | 2014-10-16T20:21:00.000 | 2 | 0.291313 | false | 26,413,216 | 0 | 0 | 1 | 1 | Since I want to move from python 2 to 3, I tried to work with pdfmine.3kr in python 3.4. It seems like they have edited everything. Their change logs do not reflect the changes they have done but I had no success in parsing pdf with pdfminer3k. For example:
They have moved PDFDocument into pdfparser (sorry, if I spell ... |
Openerp full access for a group | 26,478,950 | 2 | 0 | 59 | 0 | python,openerp | You can set access rights from Menu :
Settings --> Groups --> Access Rights tab | 0 | 0 | 0 | 0 | 2014-10-17T12:33:00.000 | 2 | 0.197375 | false | 26,425,120 | 0 | 0 | 1 | 2 | How to set full access to a group in my custom module in OpenErp? Now some users doesn't have access everywhere because they are filtered by domain_filters. |
Openerp full access for a group | 26,483,435 | 2 | 0 | 59 | 0 | python,openerp | You can create an ir.model.access.csv file, and give access rights to all the objects you want for the particular user group. | 0 | 0 | 0 | 0 | 2014-10-17T12:33:00.000 | 2 | 1.2 | true | 26,425,120 | 0 | 0 | 1 | 2 | How to set full access to a group in my custom module in OpenErp? Now some users doesn't have access everywhere because they are filtered by domain_filters. |
How can I find the current apps name from python on heroku? | 26,463,868 | 1 | 0 | 82 | 0 | python,heroku | Via Heroku support:
Finding the app's name is not something currently possible to do,
sorry. The only thing you can potentially do is to analyse the
hostname requests are coming from and deduce the app's name with it. | 0 | 0 | 0 | 0 | 2014-10-17T14:02:00.000 | 1 | 1.2 | true | 26,426,780 | 0 | 0 | 1 | 1 | How can I find the current apps name from python on heroku? I want to know, because I'm using the heroku button to start and instance automatically. Can it be made part of os.environ somehow? |
heroku - get app IP to whitelist queries | 26,444,744 | 0 | 0 | 388 | 0 | python,mysql,heroku | Heroku dynos are ephemeral. Even if you manually figure out your dyno's IP, it's going to change frequently. IP whitelisting isn't a viable scheme for securing connections between Heroku apps and other services. You should use TLS. | 0 | 0 | 0 | 0 | 2014-10-18T01:08:00.000 | 2 | 0 | false | 26,435,360 | 0 | 0 | 1 | 1 | I've pushed my first app to heroku and everything looks good except for an issue w/ MySQL.
I'm pushing/pulling a remote server that asks me to whitelist specific ip addresses. I can't find the ip address for the heroku app I've deployed so all of the queries return errors.
Any thoughts on the best way to get that?
Than... |
Creating login for a websocket application? | 26,441,656 | 0 | 1 | 83 | 0 | javascript,python,websocket | Cookie is available with websocket. Just login and store a session/cookie for the user as normal. The you will know who it is.
Or, just send the cookie as the first message after connecting. | 0 | 0 | 1 | 0 | 2014-10-18T09:04:00.000 | 1 | 1.2 | true | 26,438,022 | 0 | 0 | 1 | 1 | I've created a websocket avatar chat application where a user is given an avatar and they can move around with this avatar and send messages.
I want to design a login which connects to my database (already has several accounts stored). When a user has logged in with the correct details, I'd like for their username to b... |
Where to store software generated user-specific image files in Python Django? | 26,440,891 | 1 | 0 | 50 | 0 | python,django,django-templates,project-structure,filestructure | There are a few options, and the answer depends on the specifics of your software and hardware.
Are the images small and can they be generated quickly? Generate the images on-the-fly from a Django view. Do not store them anywhere. Have a url such as /user/some-important-widget-image/5/ which outputs a PNG of the some-i... | 0 | 0 | 0 | 0 | 2014-10-18T13:10:00.000 | 1 | 0.197375 | false | 26,440,093 | 0 | 0 | 1 | 1 | I want to view html page with images dynamically generated on user's request by Python script in Django. I do not need to store them permanently, only to generate response html page from template. Where should I store these images (or should I)? When should I delete the images if I store them somewhere on server? |
Do rest servers need to be hosted on a website or CMS? | 26,446,258 | 0 | 1 | 141 | 0 | python,rest,content-management-system,hosting | The beauty of REST is precisely that it doesn't matter where your API is, as long as its accessible from your Drupal server, or from the client if you have a javascript API client.
If it's a simple application and you have admin access to your Drupal server, there's nothing preventing you from hosting the Python webser... | 0 | 0 | 1 | 0 | 2014-10-18T21:09:00.000 | 1 | 1.2 | true | 26,444,590 | 0 | 0 | 1 | 1 | I need to create a REST server of a python module/API of a BCI, so that the application can be accessed on my Drupal website. Will I need to create and host the REST server on a python-based website or CMS, so that it can be accessed by my Drupal website, or is the api and rest server uploaded and hosted directly on my... |
Django haystack. How to alter names of check boxes? | 26,449,620 | 0 | 0 | 36 | 0 | python,django,django-haystack,whoosh | is it not the label=_("Field_name") parameter in the checkbox field?
if its about the verbose name there is also verbose_name_plural which can be set up in models | 0 | 0 | 0 | 0 | 2014-10-19T08:25:00.000 | 1 | 0 | false | 26,448,733 | 0 | 0 | 1 | 1 | I installed django haystack using whoosh. Everything works great, but I want to alter the names displayed next to the check boxes. I know they are generated using the verbose name set up on the models but I still have an issue with the 's' being added at the end of the names. I know there are custom forms and custom vi... |
Django Rest Framework, can I use ViewSet to generate a json from django view function? | 32,542,169 | 3 | 6 | 6,147 | 0 | python,django,rest,django-rest-framework | Yes, you can call YourViewSet.as_view()(self.request) in your Django view.
Make sure you call the ViewSet like below:
YourViewSet.as_view({'get': 'list'})(self.request)
Else it will raise an exception
The actions argument must be provided when calling .as_view() on a ViewSet. For example .as_view({'get': 'list'}) | 0 | 0 | 0 | 0 | 2014-10-20T07:08:00.000 | 1 | 0.53705 | false | 26,460,151 | 0 | 0 | 1 | 1 | I know I can use drf serializer from django views, but queryset, pagination setting is all duplicated in drf viewset and django view.
Can I reuse viewset to generate json data and include it in regular django response?
Update:
ie, Can I call ViewSet.as_view()(self.request) from django view?
it's not documented way, so ... |
web.py how to get message from request when the contentType is 'text/xml' | 26,498,875 | 1 | 0 | 86 | 0 | python,web.py | Use web.data(). | 0 | 0 | 1 | 0 | 2014-10-21T06:04:00.000 | 1 | 0.197375 | false | 26,479,903 | 0 | 0 | 1 | 1 | My situation is : A server send a request to me, the request's contentType is 'text/xml', and the request content is an xml. First I need to get the request content. But when I use 'web.input()' in 'POST' function, I couldn't get any message, the result just is ''. I know web.py can get form data from a request, so how... |
How to avoid duplicating context-setting-up procedure when using base template? | 26,513,516 | 0 | 2 | 81 | 0 | python,flask,jinja2 | One way I can think of is to use a decorator that provides extra context variables to each view's result. | 0 | 0 | 0 | 0 | 2014-10-21T12:31:00.000 | 3 | 0 | false | 26,486,808 | 0 | 0 | 1 | 1 | When using jinja2, base "skeleton" template are often extended by many other templates.
One of my base templates require certain variables in the context, and everywhere I use this base template I have to duplicate the setting up procedure.
For example, I may need to read some category names from DB and render them as ... |
Run specific django manage.py commands at intervals | 26,487,761 | 1 | 0 | 368 | 0 | python,django,django-chronograph | I would suggest you to configure cron to run your command at specific times/intervals. | 0 | 1 | 0 | 0 | 2014-10-21T13:14:00.000 | 3 | 0.066568 | false | 26,487,648 | 0 | 0 | 1 | 2 | I need to run a specific manage.py commands on an EC2 instance every X minutes. For example: python manage.py some_command.
I have looked up django-chronograph. Following the instructions, I've added chronograph to my settings.py but on runserver it keeps telling me No module named chronograph.
Is there something I'm m... |
Run specific django manage.py commands at intervals | 26,488,221 | 0 | 0 | 368 | 0 | python,django,django-chronograph | First, install it by running pip install django-chronograph. | 0 | 1 | 0 | 0 | 2014-10-21T13:14:00.000 | 3 | 0 | false | 26,487,648 | 0 | 0 | 1 | 2 | I need to run a specific manage.py commands on an EC2 instance every X minutes. For example: python manage.py some_command.
I have looked up django-chronograph. Following the instructions, I've added chronograph to my settings.py but on runserver it keeps telling me No module named chronograph.
Is there something I'm m... |
python '14 fast SOAP Client | 26,581,414 | 0 | 1 | 342 | 0 | python,soap-client,suds | While I couldn't find an alternate lib, I was able to run suds over multiprocessing using pathos.multiprocessing package. | 0 | 0 | 0 | 1 | 2014-10-21T13:20:00.000 | 1 | 0 | false | 26,487,774 | 0 | 0 | 1 | 1 | I am using suds-jurko==0.6, but its very slow when i try to connect to remote SOAP Server with caching and local WSDL.
Can anyone suggest faster, more active/recent SOAP client for Python? |
How to tell if my AWS account "owns" a given IP address in Python boto | 26,495,168 | 0 | 1 | 1,555 | 0 | python,amazon-web-services,amazon-ec2,boto | Here's the method I have come up with:
To look up all IPs to see if they are EIPs associated with our AWS account
Get a list of all our EIPs
Get a list of all instances
Build list of all public IPs of instances
Merge lists/use same list
Check desired IPs against this list.
Comments welcome. | 0 | 0 | 1 | 1 | 2014-10-21T18:00:00.000 | 2 | 0 | false | 26,493,207 | 0 | 0 | 1 | 1 | So I have a list of public IP addresses and I'd like to see if they are a public IP that is associated with our account. I know that I can simply paste each IP into the search box in the AWS EC2 console. However I would like to automate this process via a Python program.
I'm told anything you can do in the console, y... |
Ghost.py links through javascript | 26,505,780 | 1 | 0 | 565 | 0 | javascript,python,ghost.py | I solved my problem. There is an optional parameter to the Ghost class' click() method called expect_loading and when set to true it sets an internal boolean self.loaded = False and then calls wait_for_page_loaded() which then works, I guess because of the loaded boolean. | 0 | 0 | 1 | 0 | 2014-10-21T18:10:00.000 | 1 | 1.2 | true | 26,493,370 | 0 | 0 | 1 | 1 | I'm having an issue with Ghost.py. The site I am trying to crawl has links for a paginated list that work with javascript, rather than direct hrefs. When I click the links, I can't really wait for selectors because the selectors are the same on each page, so ghost doesn't wait since the selector is already present. I c... |
Why does Django make migrations for help_text and verbose_name changes? | 57,603,582 | 1 | 54 | 7,359 | 0 | python,django,database-migration,django-1.7,django-1.9 | From Django 2.X, using ugettext_lazy instead of ugettext or gettext fixes it. | 0 | 0 | 0 | 0 | 2014-10-22T09:01:00.000 | 8 | 0.024995 | false | 26,503,826 | 0 | 0 | 1 | 1 | When I change help_text or verbose_name for any of my model fields and run python manage.py makemigrations, it detects these changes and creates a new migration, say, 0002_xxxx.py.
I am using PostgreSQL and I think these changes are irrelevant to my database (I wonder if a DBMS for which these changes are relevant exis... |
Celery: Abort or revoke all tasks in a chord | 26,513,120 | 0 | 4 | 3,818 | 0 | python,task,celery,chord | Instead of chording the tasks themselves you may want to consider having the chords tasks that watch the A tasks. What I mean by this is the chord would contain tasks that check the running tasks(A) every so often to see if they are done or revoked. When all of those return successfully the chord with then chain into... | 0 | 1 | 0 | 0 | 2014-10-22T16:24:00.000 | 2 | 0 | false | 26,512,324 | 0 | 0 | 1 | 1 | I use the following setup with a Redis broker and backend:
chord([A, A, A, ...])(B)
Task A does some checks. It uses AbortableTask as a base and regularly checks the task.is_aborted() flag.
Task B notifies the user about the result of the calculation
The user has the possibility to abort the A tasks. Unfortunately, w... |
django-registration POST 405 | 26,518,127 | 0 | 0 | 51 | 0 | python,django,django-registration | I changed django-registration's template views to specific views and it works now. | 0 | 0 | 0 | 0 | 2014-10-22T21:33:00.000 | 1 | 1.2 | true | 26,517,504 | 0 | 0 | 1 | 1 | I have moved login form into my base.html and I added this line to my template tag to make the login form work.:
login(request, template_name='base.html')
It works in my links and the auth links but it doesn't work with django-registration's links such as /accounts/registration/complete/. I want to make them work but I... |
User Registration and Authentication to a Database using Javascript | 26,518,519 | 0 | 0 | 959 | 1 | javascript,python,ruby-on-rails,angularjs,node.js | Welcome to the world of development.
In general, javascript is only used to give more resources to the user's navigation on the site (ex: visual effects).
As you're starting out, I advise you to start studying the part of the server-side login. For security purposes who confirms whether the user is logged in or not is ... | 0 | 0 | 0 | 0 | 2014-10-22T22:41:00.000 | 3 | 0 | false | 26,518,355 | 0 | 0 | 1 | 1 | I'm new to Web Dev and I came across a problem. I was wondering if there's a Javascript Framework that will allow me to register and authenticate users to a database like when using PHP and MySql.
Also, when the user is granted access to the site, such user will be required to upload files that will be written to the l... |
Blank page in OpenERP after module install | 37,538,805 | 0 | 2 | 1,658 | 0 | python,openerp,odoo | I had same experience like yours. I think most of the time this happened because of a permission issue for certain files or database issue.
You cannot drop database on a production environment right?. So best way to solve it is removed last updated module source from addon folder and restart the odoo service.
Then up... | 0 | 0 | 0 | 0 | 2014-10-23T13:07:00.000 | 2 | 0 | false | 26,528,833 | 0 | 0 | 1 | 2 | Maybe someone could help me.
I've installed Odoo (OpenERP) on localhost and I've installed many basic modules (15). I have a problem, after install Expense Tracker module the web client displays a blank page, in any section. I can't see also the Settings page, just the menu bar at the top.
If I install just the Expense... |
Blank page in OpenERP after module install | 41,838,775 | 0 | 2 | 1,658 | 0 | python,openerp,odoo | I is likely that you installed a corrupt module. Refer to the addons and delete a module that you installed last. This should sort out your problem as it did on my end | 0 | 0 | 0 | 0 | 2014-10-23T13:07:00.000 | 2 | 0 | false | 26,528,833 | 0 | 0 | 1 | 2 | Maybe someone could help me.
I've installed Odoo (OpenERP) on localhost and I've installed many basic modules (15). I have a problem, after install Expense Tracker module the web client displays a blank page, in any section. I can't see also the Settings page, just the menu bar at the top.
If I install just the Expense... |
PyUSB read multiple frames from bulk transfer with unknown length | 26,553,765 | 1 | 0 | 2,500 | 0 | python,python-3.x,usb,pyusb | Solved my own issue. After running my code on a full linux machine, capturing the data and comparing it to the wireshark trace I took on the windows application, I realized the length of the read was not the issue. The results were very similar and the windows app was actually requesting 4096 bytes back instead of 2 or... | 0 | 1 | 0 | 1 | 2014-10-23T21:45:00.000 | 1 | 1.2 | true | 26,538,004 | 0 | 0 | 1 | 1 | So I'm relatively new to USB and PyUSB. I am trying to communicate with a bluetooth device using PyUSB. To initialize it, I need to send a command and read back some data from the device. I do this using dev.write(0x02, msg) and ret = dev.read(0x81, 0x07). I know the command structure and the format of a successful res... |
In Odoo / OpenERP 8, How to visible button Attachment for a specific group on a specific model form? | 26,581,186 | 0 | 0 | 1,038 | 0 | python,openerp,odoo | You can add groups attribute to that button in .xml file. like
Eg:
groups="group_eg" | 0 | 0 | 0 | 0 | 2014-10-24T04:01:00.000 | 1 | 0 | false | 26,541,264 | 0 | 0 | 1 | 1 | In Odoo / OpenERP 8, How do I visible button Attachment for a specific group on a specific model form? Thanks very much! |
Interrelated resources | 27,251,344 | 0 | 0 | 88 | 0 | python-2.7,simpy,traffic-simulation | I guess you can just request the other resources (B and C; maybe using preemption) once you get resource A and release all three resources once you are done with A. | 0 | 0 | 0 | 0 | 2014-10-24T17:45:00.000 | 1 | 0 | false | 26,553,392 | 0 | 0 | 1 | 1 | I am modelling a train station(using simpy, with python 2.7) where there are some incoming routes, some outgoing routes and some platforms. Now, when one of these resources is occupied, I can't assign a train to certain other resources.
Now when a train engages a route - i.e. traverses it - some other routes in the st... |
Make Tornado able to handle new requests while waiting response from RPC over RabbitMQ | 27,069,239 | 0 | 0 | 199 | 0 | python,asynchronous,rabbitmq,tornado,rpc | Use nginx with embedded perl.. It works like superman.. We are using this for our analytics tool. | 0 | 1 | 0 | 0 | 2014-10-24T19:22:00.000 | 1 | 0 | false | 26,554,857 | 0 | 0 | 1 | 1 | I have web-server listening clients and when someone hit handler server send an RPC message to RabbitMQ and waiting for response while keeping connection. When response from RMQ came server pass it to the client as response to request.
All async examples in Tornado docs works with their own http.fetch_async() or someth... |
What is the simplest way to create a NON-REST API in Django? | 26,557,044 | 1 | 0 | 914 | 0 | python,json,django,api,rest | I'm answering myself to the question:
I just found out that the creator of Tastypie made a second Python API framework named Restless.
Inspite of the name, it's still a Restfull framework, but the philosophy is very different from the former framework.
In building Tastypie, I tried to create something extremely comple... | 0 | 0 | 0 | 0 | 2014-10-24T20:55:00.000 | 2 | 1.2 | true | 26,556,120 | 0 | 0 | 1 | 1 | There are debates about the pro's and con's of REST.
I personnaly don't need it in my project, and this topic is not to debate about the fact I actally need it ^^
Just note that I used Tastypie in a "REST mode" and decided to switch to a non-REST mode because my app is not CRUD based at all. My API is an application AP... |
Custom metric alarm function Amazon Cloudwatch | 26,566,582 | 1 | 0 | 356 | 0 | python,amazon-ec2,boto,amazon-cloudwatch | An alarm can only publish to an SNS topic but there are a number of ways to subscribe to that topic. You can get an SMS message, get email, or you can have your own program called via HTTP or HTTPS. You would have to write a small web application that listens for the SNS messages and then perform whatever action you ... | 0 | 0 | 0 | 0 | 2014-10-25T16:35:00.000 | 1 | 1.2 | true | 26,564,698 | 0 | 0 | 1 | 1 | I am playing around with boto and Amazon EC2 instances. I am able to create an alarm on a metric for cpu utilisation that sends an email via an SNS Topic. However what I would like to do is call a function in my code when the alarm is triggered to launch a new instance. I don't see a way of placing anything besides an ... |
How does a mobile phone know to use a different page? | 26,598,616 | 3 | 0 | 115 | 0 | python,html,css,django | You can have a single Django project for many screens by using i.e. front-end responsive framework such like Bootstrap or Fundation. | 0 | 0 | 0 | 0 | 2014-10-27T23:28:00.000 | 5 | 0.119427 | false | 26,598,571 | 0 | 0 | 1 | 1 | I'm making a website in Django, but i want to make two sites one for the phone and one for the computer.
How do you instruct phones to load my phone friendly page instead of the normal website? |
Django CAS and TGT(Ticket Granting Tickets) and service ticket validation | 26,826,648 | 0 | 0 | 477 | 0 | python,django,cas | Turns out django-cas handles TGT using django sessions. However, for validation of the service ticket, you have to manually make a validation request including the ST(service ticket) granted after login and the service being accessed. | 0 | 0 | 0 | 0 | 2014-10-28T20:27:00.000 | 1 | 0 | false | 26,617,865 | 0 | 0 | 1 | 1 | I'm using CAS to provide authentication for a number of secure services in my stack. The authentication front-end is implemented using Django 1.6 and the django-cas module. However, I'm reading around and I don't seem to get information on how django-cas handles Ticket Granting Tickets and also validation of service ti... |
How can I programmatically execute command line commands at a different leveled directory at a certain time interval? | 26,708,022 | 1 | 0 | 190 | 0 | python,command-line,cron,scrapy,twython | Use a cron job. This allows you to run a command line command at a time interval. You can combine commands with && and as a result can change directories with the normal bash command cd.
So in this case you can call cd /directory/folder && scrapy crawl scrape_site && python twitter.py
To run this every fifteen minutes ... | 0 | 0 | 1 | 1 | 2014-10-29T02:00:00.000 | 1 | 1.2 | true | 26,621,636 | 0 | 0 | 1 | 1 | I wrote a web scraper in Scrapy that I call with scrapy crawl scrape_site and a twitter bot in Twython that I call with python twitter.py. I have all the proper files in a directory called ScrapeSite. When I execute these two commands on the command line while in the directory ScrapeSite they work properly.
However, I ... |
Accessing Python webserver remotely on Amazon EC2 | 26,626,875 | 6 | 4 | 1,858 | 0 | python,amazon-web-services,amazon-ec2,webserver | you should open the 8080 port and ip limitation in security croups, such as:
All TCP TCP 0 - 65535 0.0.0.0/0
the last item means this server will accept every request from any ip and port, you also | 0 | 0 | 1 | 1 | 2014-10-29T08:37:00.000 | 2 | 1.2 | true | 26,625,845 | 0 | 0 | 1 | 1 | I work on a project in which I need a python web server. This project is hosted on Amazon EC2 (ubuntu).
I have made two unsuccessful attempts so far:
run python -m SimpleHTTPServer 8080. It works if I launch a browser on the EC2 instance and head to localhost:8080 or <ec2-public-IP>:8080. However I can't access the s... |
Common celery workers for different clients having different DBs | 26,644,301 | 1 | 0 | 412 | 1 | python,django,celery,django-celery | Eventually you will have duplicates. Many people ignore this issue because it is a "low probability", and then are surprised when it hits them. And then a story leaks how someone was logged into another uses Facebook account. If you require them to always be unique then you will have to prefix each ID with something th... | 0 | 1 | 0 | 0 | 2014-10-29T18:06:00.000 | 1 | 1.2 | true | 26,637,631 | 0 | 0 | 1 | 1 | I'm using celery with django and am storing the task results in the DB.
I'm considering having a single set of workers reading messages from a single message broker. Now I can have multiple clients submitting celery tasks and each client will have tasks and their results created/stored in a different DB.
Even though th... |
Python: how to read 'Chunked Transfer Coding' from a request in web.py server | 26,651,096 | -1 | 1 | 599 | 0 | python,web.py | web.py runs CherryPy as the web server and it has support for handling requests with chunked transfer coding. Have you misread the documentation? | 0 | 0 | 1 | 0 | 2014-10-30T09:38:00.000 | 2 | -0.099668 | false | 26,649,495 | 0 | 0 | 1 | 1 | I am using web.py to run a server. I need to get a request from a remote server, however, the request sends me a data with Chunked Transfer Coding.
I can use web.ctx.env['wsgi.input'].read(1000) to get the data. But this is not what I need since I don't know the length of the data (because it is chunked). But if I use... |
urllib vs cloud storage (Google App Engine) | 26,660,144 | 0 | 0 | 199 | 0 | python,google-app-engine,parsing,google-cloud-storage,urllib | They will likely be very close. the AppEngine cloud storage library uses the URL fetch service, just like urllib.
Nonetheless, like any performance tuning, I'd suggest measuring on your own. | 0 | 1 | 1 | 0 | 2014-10-30T12:08:00.000 | 2 | 0 | false | 26,652,617 | 0 | 0 | 1 | 1 | I'm developing an app (with Python and Google App Engine) that requires to load some content (basically text) stored in a bucket inside the Google Cloud Storage. Everything works as expected but I'm trying to optimize the application performance. I have two different options: I can parse the content via the urllib libr... |
Could gunicorn cause an issue with exscript/paramiko? | 29,862,343 | 1 | 10 | 436 | 0 | python,django,gunicorn,paramiko,f5 | Total guess, but perhaps this will be helpful in debugging. Basically, ensure you've removed all output buffering, which can often be hiding what is really happening when layering multiple big frameworks (like you are doing here).
Ensure that you disable all output buffering in Python, both for your foreground webserv... | 0 | 0 | 0 | 0 | 2014-10-30T18:22:00.000 | 1 | 0.197375 | false | 26,660,542 | 0 | 0 | 1 | 1 | I have a Django project running behind Nginx, and Gunicorn. One of the applications interacts with network devices using Exscript, which is in turn using Paramiko. Some devices do not work properly when they are behind Gunicorn.
The same exact code will work fine from within the django-admin shell.
It will also work... |
How to handle mqtt loop_forever function when using Django? | 26,665,495 | 5 | 7 | 3,352 | 0 | python,django,multithreading,mqtt,paho | Use the threaded interface to paho-mqtt instead. This starts a background thread to handle the network processing and can be accessed with loop_start(). Alternatively you could make your own thread and just call loop() yourself. | 0 | 0 | 0 | 0 | 2014-10-30T20:12:00.000 | 1 | 1.2 | true | 26,662,422 | 0 | 0 | 1 | 1 | I am working on a website and am using Django for development. I have a few devices that communicate to the website using MQTT, and I plan to use paho-mqtt client. My issue is that for paho-mqtt to function I must call a function that loops forever while paho-mqtt continues to listen for messages. What is the best w... |
Using wsdl in pysimplesoap | 26,923,483 | 1 | 0 | 448 | 0 | python,wsdl,pysimplesoap | Probably that is because you must be using ver 1.10.
Try
a. comment out the line where you set trace = True or trace = False.
Trace has been probably removed in ver 1.10.
Or
b. revert back to version 1.05a | 0 | 0 | 0 | 0 | 2014-11-03T05:14:00.000 | 1 | 0.197375 | false | 26,708,170 | 0 | 0 | 1 | 1 | Not able to view debugged output and when tried with trace, gives an error:init() got an unexpected keyword argument 'trace' |
How to make flask response in one tcp packet? | 26,717,670 | 1 | 2 | 299 | 0 | python,flask | Flask is microframework, it is used for developing webapp or related stuff,
Flask has its own response building way, you can not control response packets from flask.
What you are talking is of different layer, it comes about networking layer. | 0 | 0 | 1 | 0 | 2014-11-03T07:47:00.000 | 1 | 0.197375 | false | 26,709,879 | 0 | 0 | 1 | 1 | I am using flask for a very simple app. The response is right but split into multiple tcp packets. It seems that flask put every http header in a tcp packet.
Why flask response is split into multiple tcp packets? How do I disable this feature? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.