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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Django: global variables in multi-connections | 32,396,689 | 2 | 1 | 295 | 0 | python,ajax,django,web,global | The answer is clear, surely: you should not be using global variables. If you need to store state for a user, do it in the session or the database. | 0 | 0 | 0 | 0 | 2015-09-04T10:52:00.000 | 1 | 1.2 | true | 32,396,300 | 0 | 0 | 1 | 1 | I developed a django web-application and I tested it in local.. good news, it works!
Know I am trying to move forward. I want to make it reachable via public Internet.. Bad news, it won't work!
The client-side interact with server using Ajax and execute some python script and get some result to display in the web page.... |
Mezzanine (Django) menu tree generation from lower branch level | 32,489,152 | 1 | 1 | 136 | 0 | python,django,mezzanine | Hello if you are far ahead in your development i am sorry for you. If not, run away as far as you can from mezzanine. The documentation for this CMS is scarce.
Lucky for you you can solve this by using "page.branch_level" instead of just "branch_level". The former, will give you the depth of the current branch, and th... | 0 | 0 | 0 | 0 | 2015-09-04T17:30:00.000 | 1 | 1.2 | true | 32,403,617 | 0 | 0 | 1 | 1 | I have the following menu structure:
Personal
PersonalOption1
Sub-Option1
Sub-Option2
PersonalOption2
Enterprise
EnterpriseOption1
EnterpriseOption2
From the Page on Sub-Option1, I'm trying to generate a page_menu to only show:
PersonalOption1
PersonalOption2
But based on the branch_level value, I'm getting:
... |
Automation in django: Celery | 32,410,234 | 0 | 1 | 131 | 0 | django,python-2.7,automation,celery,django-celery | You need, at minimum, a user model, comment model, article model, and most likely, a site model to store your RSS URLs and metadata about that site.
You will then need to create a function to parse the RSS from your URLs, and populate your article table. You will need to call this function on a periodic basis, either v... | 0 | 0 | 0 | 0 | 2015-09-04T18:49:00.000 | 1 | 1.2 | true | 32,404,764 | 0 | 0 | 1 | 1 | Django noob, please bear with me
How does to parse the rss/atom feed of an external site(any news site) and create a comments section for each post? Or simply on reddit where user submits the links; here the links are to be updated from a single/multiple websites and add a comment section.
Its easy to do with syndicati... |
Using SCM to synchronize PyDev eclipse projects between different computer | 32,408,606 | 0 | 0 | 86 | 0 | python,eclipse,version-control,synchronization,pydev | I use mercurial. I picked it because it seemed easier. But is is only easiER.
There is mercurial eclipse plugin.
Save a copy of your workspace and maybe your eclipse folder too before daring it :) | 0 | 1 | 0 | 1 | 2015-09-04T21:21:00.000 | 3 | 1.2 | true | 32,406,765 | 0 | 0 | 1 | 2 | I use eclipse to write python codes using pydev. So far I have been using dropbox to synchronize my workspace.
However, this is far from ideal. I would like to use github (or another SCM platform) to upload my code so I can work with it from different places.
However, I have found many tutorials kind of daunting... M... |
Using SCM to synchronize PyDev eclipse projects between different computer | 32,466,408 | 0 | 0 | 86 | 0 | python,eclipse,version-control,synchronization,pydev | I use bitbucket coupled with mercurial. That is my repository is on bitbucket and i pull and psuh to it from mercurial within eclipse
For my backup i have an independent carbonite process going to net back all hard disk files. But I imagine there is a clever free programatic way to do so. If one knew how to write the a... | 0 | 1 | 0 | 1 | 2015-09-04T21:21:00.000 | 3 | 0 | false | 32,406,765 | 0 | 0 | 1 | 2 | I use eclipse to write python codes using pydev. So far I have been using dropbox to synchronize my workspace.
However, this is far from ideal. I would like to use github (or another SCM platform) to upload my code so I can work with it from different places.
However, I have found many tutorials kind of daunting... M... |
NDB query by time part of DateTimeProperty | 32,419,523 | 2 | 1 | 519 | 0 | python,google-app-engine,datetime,google-cloud-datastore,app-engine-ndb | The only way would be to store the time of day as a separate property. An int will be fine, you can store it as seconds. You could do this explicitly (ie set the time property at the same time you set the datetime, or use a computedproperty to automatically set the value. | 0 | 0 | 0 | 0 | 2015-09-05T19:32:00.000 | 2 | 1.2 | true | 32,416,955 | 1 | 0 | 1 | 1 | I need to query items that where added at some time of day, ignoring which day. I only save the DateTime of when the item was added.
Comparing datetime.Time to DateTimeProperty gives an error, and DateTimeProperty does not have a time() method. |
Configuring an aiohttp app hosted by gunicorn | 32,440,342 | 1 | 1 | 273 | 0 | python-3.x,gunicorn,aiohttp | At least for now aiohttp is a library without reading configuration from .ini or .yaml file.
But you can write code for reading config and setting up aiohttp server by hands easy. | 0 | 0 | 0 | 1 | 2015-09-06T12:23:00.000 | 1 | 0.197375 | false | 32,423,519 | 0 | 0 | 1 | 1 | I implemented my first aiohttp based RESTlike service, which works quite fine as a toy example. Now I want to run it using gunicorn. All examples I found, specify some prepared application in some module, which is then hosted by gunicorn. This requires me to setup the application at import time, which I don't like. I w... |
Updating Scrapy Spider does not reflect changes | 32,700,014 | -1 | 1 | 610 | 0 | python,python-2.7,scrapy,scrapy-spider | As @alecxe recommended in the comments, removing the .pyc files followed by re-running the scrapy crawl crawler-name recompiles the python code and creates the new, update .pyc files. | 0 | 0 | 0 | 0 | 2015-09-06T15:39:00.000 | 1 | 1.2 | true | 32,425,245 | 0 | 0 | 1 | 1 | I'm using Scrapy 1.0.3 with Python 2.7.6. I've placed print statements in a file under the /spiders directory for debugging purposes. However, I've more recently added new print statements but scrapy isn't throwing it onto the console. Finding this suspicious, I removed the previous print statements to see if scrapy wo... |
OSQA Reaching to Page Files (Bitnami) | 32,460,787 | 1 | 0 | 36 | 0 | python,bitnami,osqa | When you install a Bitnami Stack the files of the application, OSQA in this case, are in /installdir/apps/osqa/htdocs, just changing installdir with the directory where you installed the stack. For instance on windows it is installed by default on C:\Bitnami\osqa\apps\osqa\htdocs.
On the \installdir\osqa directory you ... | 0 | 0 | 0 | 0 | 2015-09-07T15:33:00.000 | 1 | 1.2 | true | 32,442,067 | 0 | 0 | 1 | 1 | I've been trying to reach to OSQA pages to modify them. I've installed it to my pc with bitnami and I cannot find the files of the pages. I couldn't find anything on the wiki and readme files.
Is there a way to edit the pages? Not just css but also I'm going to add more stuff to it.
Thank you very much. |
Rails and Django migrations on a shared database | 32,450,497 | 1 | 0 | 254 | 1 | python,ruby-on-rails,django,postgresql,ruby-on-rails-4 | I think you need to maintain migrations at one system (in this case, Rails), because it will be difficult to check migrations between two different apps. What you'll do if you'll haven't access to another app?
But you can store something like db/schema.rb for django tracked in git. | 0 | 0 | 0 | 0 | 2015-09-08T06:11:00.000 | 1 | 0.197375 | false | 32,450,413 | 0 | 0 | 1 | 1 | Is it bad practice to have Django perform migrations on a predominantly Rails web app?
We have a RoR app and have moved a few of the requirements out to Python. One of the devs here has suggested creating some of the latest database migration using Django and my gut says this is a bad idea.
I haven't found any solid st... |
Django app with long running calculations | 32,456,170 | 2 | 1 | 359 | 0 | python,django,heroku,celery | I think Celery is a good approach. Not sure if you need Redis/RabbitMQ as a broker or you could just use MySQL - it depends on your tasks. Celery workers could be runned on the different servers, so Celery supports distributed queues.
Another approach - implement some queue engine with python, database as a broker and ... | 0 | 0 | 0 | 0 | 2015-09-08T10:50:00.000 | 2 | 1.2 | true | 32,455,821 | 0 | 0 | 1 | 1 | I'm creating a Django web app which features potentially very long running calculations of up to an hour. The calculations are simulation models built in Python. The web app sends inputs to the simulation model and after some time receives the answer. Also, the user should be able to close his browser after starting th... |
InterfaceError:(sqlte3.InterfaceError)Error binding parameter 0 | 32,471,731 | 0 | 2 | 454 | 1 | python,xpath,sqlite,scrapy | The problem that you're experiencing is that SQLite3 wants a datatype of "String", and you're passing in a list with a unicode string in it.
change:
item['title'] = sel.xpath('//*[@class="link_title"]/a/text()').extract()
to
item['title'] = sel.xpath('//*[@class="link_title"]/a/text()').extract()[0].
You'll be left wit... | 0 | 0 | 0 | 0 | 2015-09-08T14:13:00.000 | 1 | 1.2 | true | 32,460,120 | 0 | 0 | 1 | 1 | Recently, I used Python and Scrapy to crawl article information like 'title' from a blog. Without using a database, the results are fine / as expected. However, when I use SQLalchemy, I received the following error:
InterfaceError:(sqlite3.InterfaceError)Error binding parameter 0
-probably unsupported type.[SQL:u'I... |
Django testcase without database migrations and syncdb | 32,499,038 | 1 | 1 | 642 | 0 | python,django,django-testing,django-migrations | When you use django's TestCase, it has an explicit requirement that the database must be setup, which means all migrations must be applied. If you want to test things without the migrations happening, you cannot use TestCase.
Use a testing toolkit that doesn't depend on django, like pytest and write your own code to t... | 0 | 0 | 0 | 0 | 2015-09-10T07:10:00.000 | 1 | 0.197375 | false | 32,495,377 | 0 | 0 | 1 | 1 | I am trying to create test cases for my migration functions (called with migrations.RunPython). My idea was to create a test case that doesn’t run migrations before starting, neither syncdb to create the database in one step. After this, I’m planning to run the first step, run associated tests, run the second step then... |
Python and Java in internal command | 41,688,142 | 0 | 0 | 29 | 0 | java,python-2.7,python-3.4 | You can create a new variable name, for example MY_PYTHEN=C:\Pythen34 . Then you need to add the variable name into system variable PATH such as,
PATH = ...;%MY_PYTHEN%
PATH is a Windows system default variable. | 0 | 1 | 0 | 1 | 2015-09-10T08:56:00.000 | 2 | 0 | false | 32,497,329 | 0 | 0 | 1 | 1 | I have installed java and using it in internal command with variable name:PATH and variable value: C:\Program Files\Java\jdk1.8.0_60\bin . Now i want add python to internal command. What variable name do I give so that it works.I tried with Name: PTH and Value:C:\Python34; its not working. |
Can Django template variables be model instances? | 32,508,275 | 2 | 1 | 826 | 0 | python,django,django-templates | The issue isn't that the variables are static copies. It's just that the template language itself doesn't allow you to call methods which take arguments. It's still the same object under the hood you're accessing, you just have no way to express certain programmatic concepts (assignment, passing arguments, etc.) in the... | 0 | 0 | 0 | 0 | 2015-09-10T17:22:00.000 | 3 | 1.2 | true | 32,508,107 | 0 | 0 | 1 | 1 | I was asked this on an interview presumably to see if I understood the separation between the Template layer and the Model layer.
My understanding is that template variables are essentially:
A static copy of the instance (such that all the properties can be accessed)
An instance that has all of the method with argumen... |
Is it smart to use django as backend only? | 32,510,043 | 2 | 0 | 903 | 0 | python,angularjs,django,project,project-structure | If you're truly dealing with a scaling issue, you want to decouple every single component. That way you can pour resources into the part of your system under the heaviest load. That would involve things like spinning up multiple front-end web/cache servers, compute nodes, etc, etc.
That said, very few companies need to... | 0 | 0 | 0 | 0 | 2015-09-10T18:52:00.000 | 2 | 0.197375 | false | 32,509,598 | 0 | 0 | 1 | 1 | I'm creating right now a new application which will be kind of start'up. User can register it and use many tools inside. I hope there will be at least thousands hits per day.
I'm sure that it will be using python & django because it's technology I work with. I'm not sure about project structure and communication in a ... |
Hosting API docs generated with mkdocs at a URL within a Django project | 32,511,724 | 4 | 2 | 1,356 | 0 | python,django,mkdocs | Django is just a framework you need to host your static files and serve them with something like Nginx or Apache etc. | 0 | 0 | 0 | 0 | 2015-09-10T21:05:00.000 | 3 | 0.26052 | false | 32,511,575 | 0 | 0 | 1 | 1 | I tend to write my API documentation in Markdown and generate a static site with MkDocs. However, the site I'd like to host the documentation on is a Django site. So my question is, and I can't seem to find an answer Googling around, is how would I go about hosting the MkDocs static generated site files at a location... |
How does Django's extends work? | 32,513,994 | 3 | 1 | 716 | 0 | python,django,django-templates | You cannot extend from multiple django templates.. it's a single line inheritance.
If you want /templates/index.html to be your base index template, and /templates/hello/index.html to be your index template for the hello part of your application.. then you should have /templates/hello/index.html start with {% extends '... | 0 | 0 | 0 | 0 | 2015-09-11T00:52:00.000 | 1 | 1.2 | true | 32,513,828 | 0 | 0 | 1 | 1 | I have my index.html file in /templates directory and I have another index.html located in /templates/hello.
I've created a file named templates.html in /templates/hello and it should extend index.html.
Can I make template.html extends both index.html files (from both directories) using {% extends index.html %} tag i... |
Google App Engine Server to Server OAuth Python | 32,524,341 | 0 | 0 | 163 | 0 | python,google-app-engine,gmail,google-oauth,service-accounts | A service account isn't you its it's own user. Even if you could access Gmail with a service account which I doubt you would only be accessing the service accounts GMail account (Which I don't think it has) and not your own.
To my knowledge the only way to access Gmail API is with Oauth2.
Service accounts can be used... | 0 | 1 | 1 | 0 | 2015-09-11T13:04:00.000 | 2 | 0 | false | 32,524,226 | 0 | 0 | 1 | 1 | I can't find a solution to authorize server-to-server authentication using Google SDK + Python + MAC OSx + GMAIL API.
I would like testing GMail API integration in my local environment, before publishing my application in GAE, but until now I have no results using samples that I have found in GMail API or OAuth API doc... |
ImportError: No module named spiders | 40,071,747 | 1 | 1 | 4,316 | 0 | python,scrapy | Don't delete __init__.py from any place in your project directory. Just because it's empty doesn't mean you don't need it. Create a new empty file called __init__.py in your spiders directory, and you should be good to go. | 0 | 0 | 1 | 0 | 2015-09-11T14:00:00.000 | 6 | 0.033321 | false | 32,525,307 | 1 | 0 | 1 | 3 | from scrapy.spiders import CrawlSpider
Rule is giving error
I am using ubuntu
I have Scrapy 0.24.5 and Python 2.7.6
I tried with tutorial project of scrapy
I am working on pycharm |
ImportError: No module named spiders | 32,531,370 | 0 | 1 | 4,316 | 0 | python,scrapy | Make sure scrapy is installed. Try running scrapy when your terminal directory is python, or you can try to update scrapy.. | 0 | 0 | 1 | 0 | 2015-09-11T14:00:00.000 | 6 | 0 | false | 32,525,307 | 1 | 0 | 1 | 3 | from scrapy.spiders import CrawlSpider
Rule is giving error
I am using ubuntu
I have Scrapy 0.24.5 and Python 2.7.6
I tried with tutorial project of scrapy
I am working on pycharm |
ImportError: No module named spiders | 46,567,274 | 0 | 1 | 4,316 | 0 | python,scrapy | Mostly the tutorial you are fallowing and your version is mismatched.
Simply replace this (scrapy.Spider) with (scrapy.spiders.Spider).
Spider function is put into spiders module. | 0 | 0 | 1 | 0 | 2015-09-11T14:00:00.000 | 6 | 0 | false | 32,525,307 | 1 | 0 | 1 | 3 | from scrapy.spiders import CrawlSpider
Rule is giving error
I am using ubuntu
I have Scrapy 0.24.5 and Python 2.7.6
I tried with tutorial project of scrapy
I am working on pycharm |
django imagekit - list view and details view image | 32,639,949 | 0 | 1 | 95 | 0 | python,django,django-class-based-views,django-imagekit | Based on the answer provided by kicker86. I plan to retain single image. | 1 | 0 | 0 | 0 | 2015-09-11T20:03:00.000 | 1 | 1.2 | true | 32,531,308 | 0 | 0 | 1 | 1 | I have just started using django imagekit. I have a list view page where the images are of dimensions 270 x 203 (30 KB approx.) and same images have a size of 570 x 427 (90 KB approx.) in the details view page.
I wanted to know;
Should have create 2 different images for each image with different size and dimensions.
i... |
How to Pickle Django Model | 32,554,191 | 2 | 1 | 1,634 | 0 | python,django,pickle | While it's not really the "answer" to my question, the best solution I found was to implement a dehydrate() method on the model, allowing me to alter the model's __dict__ and store that instead.
On recovery from the cache, it's as simple as using the ** syntax and you'll have your original model back. | 0 | 0 | 0 | 0 | 2015-09-11T22:53:00.000 | 2 | 1.2 | true | 32,533,228 | 0 | 0 | 1 | 1 | I'm currently trying to pickle certain Django models. I created a __getstate__ and __setstate__ method for the model, but it looks like pickle.dumps() is using the default __reduce__ instead.
Is there a way to force use of __getstate__ and __setstate__ ? If not, what is the best way to overwrite __reduce__ ?
I am cur... |
What is the Django HOST_DOMAIN setting for? | 32,543,440 | 2 | 0 | 44 | 0 | python,django,django-settings | That is not a Django setting.
It's perfectly good practice to define your own project-specific settings inside settings.py, and that is presumably what the original developer did here. | 0 | 0 | 0 | 0 | 2015-09-12T20:32:00.000 | 2 | 0.197375 | false | 32,543,419 | 0 | 0 | 1 | 1 | Despite googling I can't find any documentation for the Django HOST_DOMAIN setting in the settings.py.
I am going through a settings.py file I have been given and this is the only part of the file I am not 100% clear on. |
What is the right way in Django to generate random URLs for user uploaded items? | 49,653,008 | 0 | 1 | 508 | 0 | python,django,url | What I usually do is create a dir with uploaded date as name, e.g. 04042018/ and then I rename the uploaded file with an uuid4, e.g. 550e8400-e29b-41d4-a716-446655440000.jpg
So the fullpath for the uploaded file will be something like this:
site_media/media/04042018/550e8400-e29b-41d4-a716-446655440000.jpg
Personally I... | 0 | 0 | 0 | 0 | 2015-09-16T07:11:00.000 | 1 | 1.2 | true | 32,601,954 | 0 | 0 | 1 | 1 | For example, uploading a gif to gfycat generates URLs in the form of Adjective-Adjective-Noun such as ForkedTestyRabbit.
Obviously going to this URL allows you to view the model instance that was uploaded.
So I'm thinking the post upload generates a unique random URL, e.g. /uploads/PurpleSmellyGiraffe. The model will h... |
xhtml2pdf is not displaying GBP ("£") signs while creating PDF | 33,307,465 | 0 | 0 | 319 | 0 | python,django,pdf-generation,xhtml2pdf | When you call pisa.CreatePDF() make sure to include encoding.
Here's what we use, obviously its a bit out of context but it was mostly copied from the example documentation.
pisaStatus = pisa.CreatePDF(html.encode('UTF-8'), encoding="UTF-8", dest=f, link_callback=link_callback) | 0 | 0 | 0 | 0 | 2015-09-16T14:20:00.000 | 1 | 0 | false | 32,611,297 | 0 | 0 | 1 | 1 | While creating PDF using xhtm2pdf we are unable to print "£" sign but works for dollar and euro. We have used setting font face and changed font family but still we are not able to print GBP. |
PyCharm throws "AttributeError: 'module' object has no attribute" when running tests for no reason | 32,615,089 | 1 | 5 | 7,129 | 0 | python,django,testing,django-rest-framework | Given all the others paths were already covered:
Import order
Virtual Env created
Project's Interpreter using the Virtual Env
The only thing that occurred to me was do run the following command within the vurtal env:
pip install -r requirements.txt
And it worked! In the end, someone had updated the requirements which... | 0 | 0 | 0 | 0 | 2015-09-16T17:31:00.000 | 2 | 0.099668 | false | 32,615,088 | 1 | 0 | 1 | 2 | So, I have a Django-REST Framework project and one day it simply ceased being able to run the tests within PyCharm.
From the command line I can run them both using paver or the manage.py directly.
There was a time when that would happen when we didn't import the class' superclass at the top of the file, but that's not ... |
PyCharm throws "AttributeError: 'module' object has no attribute" when running tests for no reason | 37,061,343 | 2 | 5 | 7,129 | 0 | python,django,testing,django-rest-framework | I had the same problem but my solution was different.
When I tried to run a test from PyCharm, the target path looked like this:
tests.apps.an_app.models.a_model.ATestCase
But since ATest was a class inside a_model.py, the targ path should actually be:
tests.apps.an_app.models.a_model:ATestCase
Changing the target ... | 0 | 0 | 0 | 0 | 2015-09-16T17:31:00.000 | 2 | 0.197375 | false | 32,615,088 | 1 | 0 | 1 | 2 | So, I have a Django-REST Framework project and one day it simply ceased being able to run the tests within PyCharm.
From the command line I can run them both using paver or the manage.py directly.
There was a time when that would happen when we didn't import the class' superclass at the top of the file, but that's not ... |
web2py database configuration | 32,618,356 | 2 | 0 | 939 | 1 | python,database,web2py | Files in the /models folder are executed in alphabetical order, so just put the DAL definition at the top of the first model file that needs to use it (it will then be available globally in all subsequent model files as well as all controllers and views). | 0 | 0 | 0 | 0 | 2015-09-16T19:00:00.000 | 2 | 1.2 | true | 32,616,625 | 0 | 0 | 1 | 1 | I found this line to help configure Postgresql in web2py but I can't seem to find a good place where to put it :
db = DAL("postgres://myuser:mypassword@localhost:5432/mydb")
Do I really have to write it in all db.py ? |
Django 1.8 migrate: django_content_type does not exist | 32,637,043 | 1 | 6 | 10,126 | 1 | django,python-2.7,django-1.7,django-migrations,django-1.8 | Well, I found the issue. I have auditlog installed as one my apps. I removed it and migrate works fine. | 0 | 0 | 0 | 0 | 2015-09-17T00:45:00.000 | 6 | 1.2 | true | 32,620,930 | 0 | 0 | 1 | 4 | I just upgraded my django from 1.7.1 to 1.8.4. I tried to run python manage.py migrate but I got this error:
django.db.utils.ProgrammingError: relation "django_content_type" does not exist
I dropped my database, created a new one, and ran the command again. But I get the same error. Am I missing something? Do I need to... |
Django 1.8 migrate: django_content_type does not exist | 67,501,508 | 0 | 6 | 10,126 | 1 | django,python-2.7,django-1.7,django-migrations,django-1.8 | i had drop the database and rebuild it, then in the PyCharm Terminal py manage.py makemigrations and py manage.py migrate fix this problem. I think the reason is the table django_content_type is the django's table, if it misssed can not migrate, so have to drop the database and rebuild. | 0 | 0 | 0 | 0 | 2015-09-17T00:45:00.000 | 6 | 0 | false | 32,620,930 | 0 | 0 | 1 | 4 | I just upgraded my django from 1.7.1 to 1.8.4. I tried to run python manage.py migrate but I got this error:
django.db.utils.ProgrammingError: relation "django_content_type" does not exist
I dropped my database, created a new one, and ran the command again. But I get the same error. Am I missing something? Do I need to... |
Django 1.8 migrate: django_content_type does not exist | 32,623,157 | 6 | 6 | 10,126 | 1 | django,python-2.7,django-1.7,django-migrations,django-1.8 | Delete all the migration folder from your app and delete the database then migrate your database......
if this does not work delete django_migration table from database and add the "name" column in django_content_type table ALTER TABLE django_content_type ADD COLUMN name character varying(50) NOT NULL DEFAULT 'anyName'... | 0 | 0 | 0 | 0 | 2015-09-17T00:45:00.000 | 6 | 1 | false | 32,620,930 | 0 | 0 | 1 | 4 | I just upgraded my django from 1.7.1 to 1.8.4. I tried to run python manage.py migrate but I got this error:
django.db.utils.ProgrammingError: relation "django_content_type" does not exist
I dropped my database, created a new one, and ran the command again. But I get the same error. Am I missing something? Do I need to... |
Django 1.8 migrate: django_content_type does not exist | 37,074,120 | 2 | 6 | 10,126 | 1 | django,python-2.7,django-1.7,django-migrations,django-1.8 | Here's what I found/did. I am using django 1.8.13 and python 2.7. The problem did not occur for Sqlite. It did occur for PostgreSQL.
I have an app the uses a GenericForeignKey (which relies on Contenttypes). I have another app that has a model that is linked to the first app via the GenericForeignKey. If I run makemig... | 0 | 0 | 0 | 0 | 2015-09-17T00:45:00.000 | 6 | 0.066568 | false | 32,620,930 | 0 | 0 | 1 | 4 | I just upgraded my django from 1.7.1 to 1.8.4. I tried to run python manage.py migrate but I got this error:
django.db.utils.ProgrammingError: relation "django_content_type" does not exist
I dropped my database, created a new one, and ran the command again. But I get the same error. Am I missing something? Do I need to... |
How to create a record from one to one relationship reverse direction in Django? | 32,631,283 | 2 | 2 | 325 | 0 | python,django,models | No, there is no way of doing that because there is no queryset between class A and class B, like it was with ManyToMany or ForeignKey. You must create B directly and assign A to proper field on B. | 0 | 0 | 0 | 0 | 2015-09-17T11:35:00.000 | 1 | 1.2 | true | 32,629,369 | 0 | 0 | 1 | 1 | Django offers Related objects for oneToMany or manyToMany relationship.
Using this object, It can create a record from the reverse direction.
(for example with XXXX_set.create(.....) or XXXX_set.get_or_create(.....))
I want to use this kind of function with an oneToOne relationship.
Is there any way to create an one to... |
Use migrations like in Django in Rails models | 32,639,897 | 5 | 4 | 433 | 0 | python,ruby-on-rails,ruby,django,ruby-on-rails-3 | The db/schema.rb file keeps track of the current state, and you can delete your migrations at any point and use the rake db:schema:load task to load the db/schema.rb into your DB. | 0 | 0 | 0 | 0 | 2015-09-17T20:48:00.000 | 1 | 1.2 | true | 32,639,706 | 0 | 0 | 1 | 1 | I was developing in both RoR and Django based projects, and I don't like the way how RoR deals with migrations. For example, if I make huge changes to my models over 2 years, in Django I can delete all migrations and make new, single file, basing on actual state of my models. In RoR I will have, like 50 files, where so... |
Add models to specific user (Django) | 32,660,678 | 0 | 2 | 1,112 | 0 | python,mysql,django | You could create a model UserItems for each user with a ForeignKey pointing to the user and an item ID pointing to items. The UserItems model should store the unique item IDs of the items that belong to a user. This should scale better if items can be attached to multiple users or if items can exist that aren't attache... | 0 | 0 | 0 | 0 | 2015-09-18T20:27:00.000 | 2 | 0 | false | 32,660,496 | 0 | 0 | 1 | 1 | Good evening,
I am working on some little website for fun and want users to be able to add items to their accounts. What I am struggling with is coming up with a proper solution how to implement this properly.
I thought about adding the User Object itself to the item's model via ForeignKey but wouldn't it be necessary... |
Python - Rebuild Javascript generated code using Requests Module | 32,680,624 | 2 | 0 | 84 | 0 | javascript,python,browser,beautifulsoup,python-requests | In most cases, it is enougth to analyze the "network" tab of the developer tools and see the requests that are fired when you hit that button you metioned.
As you understand those requests, you will be able to implement your scraper to run similar requests and grab the relevant data. | 0 | 0 | 1 | 0 | 2015-09-20T14:35:00.000 | 1 | 0.379949 | false | 32,680,534 | 0 | 0 | 1 | 1 | I'm facing a new problem.
I'm writing a scraper for a website, usually for this kind of tasks I use selenium, but in this case I cannot use anything that simulate a web-browser.
Researching on StackOverflow, I read the best solution is to undestand what javascript did and rebuild the request over HTTP.
Yeah, I understa... |
How to find Post_ID which related to Facebook ADS API | 32,905,674 | 0 | 0 | 502 | 0 | python,facebook,api,ads | You can get the post that is used for a creative by fetching the object_story_id field on an Ad Creative.
In the hierarchy of Facebook ads products, this is located here: Ad Account -> Ad Campaign -> Ad Set -> Ad -> Ad Creative.
There is no way to reversely look up which ads objects are using a particular post for thei... | 0 | 0 | 0 | 0 | 2015-09-20T17:04:00.000 | 1 | 1.2 | true | 32,682,020 | 0 | 0 | 1 | 1 | I use Python Facebook Ads API.
I got AD_SET_ID.
How Can I find boosted post ID (looks like 204807582871020_615180368500404) which is related to AD_SET_ID |
Best server configuration for site with heavy calculations | 32,682,202 | 1 | 1 | 229 | 0 | python,nginx,apache2,server,uwsgi | Andrew,
I believe that you can move some pieces of your deployment topology.
My suggestion is use nginx for delivering HTTP content, and expose your application using some web framework, i.e. tornadoweb (my preference, considering async core, and best documented if compared to twisted, even twisted being a really great... | 0 | 0 | 0 | 1 | 2015-09-20T17:10:00.000 | 1 | 1.2 | true | 32,682,065 | 0 | 0 | 1 | 1 | I have a site, that performs some heavy calculations, using library for symbolic math.
Currently average calculation time is 5 seconds.
I know, that ask too broad question, but nevertheless, what is the optimized configuration for this type of sites? What server is best for this?
Currently, I'm using Apache with mod_ws... |
django migrations - workflow with multiple dev branches | 38,489,436 | 9 | 62 | 11,656 | 0 | python,django,git,migration | I don't have a good solution to this, but I feel the pain.
A post-checkout hook will be too late. If you are on branch A and you check out branch B, and B has fewer migrations than A, the rollback information is only in A and needs to be run before checkout.
I hit this problem when jumping between several commits tryi... | 0 | 0 | 0 | 0 | 2015-09-20T17:32:00.000 | 3 | 1 | false | 32,682,293 | 0 | 0 | 1 | 1 | I'm curious how other django developers manage multiple code branches (in git for instance) with migrations.
My problem is as follows:
- we have multiple feature branches in git, some of them with django migrations (some of them altering fields, or removing them altogether)
- when I switch branches (with git checkout s... |
Python/Django run development server | 44,451,289 | 2 | 1 | 844 | 0 | django,python-2.7,django-1.8,manage.py | It seems pretty clear that Django is unable to find your database at specified location, reasons can be,
You have created django project using "sudo" or with any other other linux user than your current user, thats why your current user might not have permissions to access that database. You can check permissions of f... | 0 | 0 | 0 | 0 | 2015-09-21T19:50:00.000 | 2 | 1.2 | true | 32,703,401 | 0 | 0 | 1 | 1 | I'm trying to create a project using Django 1.8.4 and Python 2.7.10, but I can't execute the command python manage.py runserver. I can create the project and apps, but can't run the server.
Please somebody help me, I'm new with Python/Django and I couldn't advance more.
The cmd show the next error when the command is e... |
Python - global Serial obj instance accessible from multiple modules | 32,709,121 | 0 | 3 | 328 | 0 | python,global | Delegate the opening and management of the serial port to a separate daemon, and use a UNIX domain socket to transfer the file descriptor for the serial port to the client programs. | 0 | 0 | 0 | 1 | 2015-09-22T04:53:00.000 | 2 | 0 | false | 32,708,630 | 1 | 0 | 1 | 1 | I have 5 different games written in python that run on a raspberry pi. Each game needs to pass data in and out to a controller using a serial connection. The games get called by some other code (written in nodeJS) that lets the user select any of the games.
I'm thinking I don't want to open and close a serial port ever... |
Python CGI With Data Return | 32,710,858 | 1 | 0 | 490 | 0 | javascript,python,html,cgi | Well if you don't know what CGI is and find that what you ask for is "far more complicated than it should be", you first have to learn the HTTP protocol, obviously, and that's way to broad for a SO answer.
Basically what you want requires:
an html document
some javascript code, either linked from the document or embe... | 0 | 0 | 0 | 0 | 2015-09-22T07:00:00.000 | 2 | 0.099668 | false | 32,710,348 | 0 | 0 | 1 | 1 | I'm trying to accomplish the following:
Pull information from a module through Python. [Accomplished]
Constantly pull information from Python for use in HTML.
Avoid writing the entire HTML/CSS/JS document in print statements.
I've seen the term CGI thrown around, but don't really understand how it works. Simply put, ... |
Django not providing CSRF token for AngularJS frontend | 32,714,567 | 1 | 1 | 49 | 0 | javascript,python,angularjs,django,cookies | You won't be able to get cookies on other domain because all cookies are set per domain, this is for security reasons.
If you want to access session and cookies in other domain, you must copy them. You can do it by sending some request with special token (for validation) and create view in django that will fetch data f... | 0 | 0 | 0 | 0 | 2015-09-22T10:25:00.000 | 1 | 1.2 | true | 32,714,470 | 0 | 0 | 1 | 1 | I'm trying to send a cross domain PUT request from AngularJS frontend to Django backend. It's all fine when I'm running on the same domain (frontend at localhost:8000 and backend at localhost:8001), I'm getting my csrftoken from $cookies and can send a successful request. The problem begins when I switch the backend to... |
No Module Named MySqlDb in Python Virtual Enviroment | 32,723,517 | 1 | 0 | 660 | 1 | python,mysql,django | This approach worked ! I was able to install the mysqlclient inside the virtual environment through the following command:-
python -m pip install mysqlclient
Thanks Much..!!!!! | 0 | 0 | 0 | 0 | 2015-09-22T11:02:00.000 | 3 | 0.066568 | false | 32,715,175 | 0 | 0 | 1 | 1 | I had posted about this error some time back but need some more clarification on this.
I'm currently building out a Django Web Application using Visual Studio 2013 on a Windows 10 machine (Running Python3.4). While starting out I was constantly dealing with the MySQL connectivity issue, for which I did a mysqlclient pi... |
Lifetime of objects in a flask app | 32,732,460 | 1 | 1 | 958 | 0 | python-3.x,flask | Short answer: Depends on when and where the class is initialised.
Objects have little to do with a user logging in and logging out. Object lifetimes are dependent on when and where they are initialised.
Objects initialised outside a function or class are effectively singletons and last as long as the application insta... | 0 | 0 | 0 | 0 | 2015-09-22T19:42:00.000 | 1 | 1.2 | true | 32,725,493 | 0 | 0 | 1 | 1 | I have a web app that retrieves data from a database and displays it on a UI. I have a class called table that handles the database requests based on the URL variables.
My question is: Does flask recycle objects when a new URL is requested? Or does it keep the objects in memory until the user logs out?
Should I have o... |
Modelica Parameter studies with python | 32,745,918 | 2 | 3 | 738 | 0 | python,modelica | It might be a strcutrual parameter, these are evaluated also. It should work if you explicitly set Evaluate=False for the parameter that you want to study.
Is it not visible in the variable browser or is it just greyed out and constant? If it is not visible at all you should check if it is protected. | 0 | 0 | 0 | 0 | 2015-09-23T12:19:00.000 | 2 | 0.197375 | false | 32,739,428 | 0 | 0 | 1 | 1 | I want to run parameter studies in different modelica building libraries (buildings, IDEAS) with python: For example: change the infiltration rate.
I tried: simulateModel and simulateExtendedModel(..."zone.n50", [value])
My questions:Why is it not possible to translate the model and then change the parameter: Warning:... |
Python Django DRF API one time session/token/pass authentication without a username/password | 32,759,648 | 1 | 2 | 1,261 | 0 | python,django,authentication,django-rest-framework,one-time-password | You can create a view that generates a time-based OTP and then use it in a custom auth module to authenticate against a single user. You can also use JWT with an expiry time to authenticate against a single user. | 0 | 0 | 0 | 0 | 2015-09-23T15:28:00.000 | 1 | 1.2 | true | 32,743,668 | 0 | 0 | 1 | 1 | I have a Django and django rest framework project where I want a mobile to be able to request a token and then use that token for x minutes before they're disconnected. I do not want to create a user for each mobile device, I just want a one time password.
I tried using the auth system built into drf, however it requir... |
Is it necessary to use virtualenv to use Flask framework? | 32,756,729 | 12 | 6 | 2,441 | 0 | python,flask,virtualenv | No, there is no requirement to use a virtualenv. No project ever would require you to use one; it is just a method of insulating a collection of Python libraries from other projects.
I personally do strongly recommend you use a virtualenv, because it makes it much, much easier to swap out versions of libraries and not ... | 0 | 0 | 0 | 0 | 2015-09-24T08:25:00.000 | 1 | 1.2 | true | 32,756,711 | 1 | 0 | 1 | 1 | I just started exploring Flask. Earlier I tried to explore Django but found it a bit complicated. However, Installing Flask requires us to install virtualenv first which, As I can recall, is not required in the case of Django.
In case it is not required, how to go ahead without virtualenv? |
Can Django send multi-part responses for a single request? | 32,759,144 | 2 | 2 | 1,409 | 0 | python,django,api,rest,response | As far as I know, No you can't send Multipart http response not yet atleast. Multipart response is only valid in http requests. Why? Because no browser as I know of completely supports this.
Firefox 3.5: Renders only the last part, others are ignored.
IE 8: Shows all the content as if it were text/plain, including the... | 0 | 0 | 0 | 0 | 2015-09-24T10:30:00.000 | 1 | 1.2 | true | 32,759,082 | 0 | 0 | 1 | 1 | I apologise if this is a daft question. I'm currently writing against a Django API (which I also maintain) and wish under certain circumstances to be able to generate multiple partial responses in the case where a single request yields a large number of objects, rather than sending the entire JSON structure as a single... |
Django - Server error 500 with URL tag | 32,765,111 | 1 | 1 | 419 | 0 | python,django,url,tags,server-error | I solved the issue by adding #-*- coding: utf-8 -*- at the begenning of all my Python (*.py) files because it's an old version about python (2.6)
Thank's to all :) | 0 | 0 | 0 | 0 | 2015-09-24T11:55:00.000 | 1 | 0.197375 | false | 32,760,681 | 0 | 0 | 1 | 1 | I have an issue when I put online my Django Project.
If I have an {% url ... %} tag in my main html file (base.html), I see "Server Error 500".
If I remove all these lines with {% url ... %}, my django website works fine and the "Server Error 500" disappears ! I have this issue only with the URL tag.
For information,... |
How to generate temporary downloads in Flask? | 32,772,507 | 0 | 2 | 684 | 0 | python,apache,flask | You could use S3 to host the file with a temporary URL. Use Flask to upload the file to S3 (using boto3), but use a dynamically-generated temporary key.
Example URL: http://yourbucket.s3.amazon.com/static/c258d53d-bfa4-453a-8af1-f069d278732c/sound.mp3
Then, when you tell the user where to download the file, give them t... | 0 | 0 | 0 | 0 | 2015-09-24T23:06:00.000 | 1 | 0 | false | 32,772,343 | 0 | 0 | 1 | 1 | I have a Flask app that lets users download MP3 files. How can I make it so the URL for the download is only valid for a certain time period?
For example, instead of letting anyone simply go to example.com/static/sound.mp3 and access the file, I want to validate each request to prevent an unnecessary amount of bandwidt... |
Can anyone offer a full example of django-haystack with solr 5.x? | 32,996,183 | 2 | 2 | 520 | 0 | python,django,solr | It seems Django-Haystack does not support SOLR 5 well. SOLR 5's solrconfig.xml file for its core uses ManagedIndexSchemaFactory as default schemaFactory. If you change it to ClassicIndexSchemaFactory, you will run in troubles with your schema.xml which is generated by python manage.py build_solr_schema. Lots of fields... | 0 | 0 | 0 | 0 | 2015-09-25T04:25:00.000 | 1 | 1.2 | true | 32,774,796 | 0 | 0 | 1 | 1 | Trying to find an example of how to build an application using solr 5.x with django-haystack, but most examples online are using solr 4.x or solr 3.x. Can anyone give some instructions on how to work with solr 5.x using django-haystack, or just offer some example project? Thanks! |
How to remove Group and Permission models from Django | 32,786,679 | 2 | 1 | 3,099 | 0 | python,django,django-admin | If you don't want to use Django's Group and Permission, maybe you don't want to use django.contrib.auth at all? If that is the case, simply remove django.contrib.auth from INSTALLED_APPS.
However, I want to point out that I can't really think of a usecase where this would make sense. You have to have a really good reas... | 0 | 0 | 0 | 0 | 2015-09-25T16:15:00.000 | 2 | 1.2 | true | 32,786,482 | 0 | 0 | 1 | 1 | I want to create my own Group and Permission model. However, Django has its built-in models for this which are giving me naming conflicts on it's own modelGroup. I know you can deregister to remove it from this admin, but this does not help me.
What is best here?
Is it possible to use Django's own and models for Group... |
When should HStoreField be used instead of JSONField? | 32,792,698 | 20 | 21 | 4,193 | 0 | python,django,postgresql,hstore,jsonb | If you need indexing, use jsonb if you're on 9.4 or newer, otherwise hstore. There's really no reason to prefer hstore over jsonb if both are available.
If you don't need indexing and fast processing and you're just storing and retrieving validated data, use plain json. Unlike the other two options this preserves dupli... | 0 | 0 | 0 | 0 | 2015-09-25T23:03:00.000 | 1 | 1.2 | true | 32,791,851 | 0 | 0 | 1 | 1 | Django 1.8 provides HStoreField and Django 1.9 will provide JSONField (which uses jsonb) for PostgreSQL.
My understanding is that hstore is faster than json, but does not allow nesting and only allows strings.
When should one be used over the other? Should one be preferred over the other? Is hstore still the clear winn... |
Detect page is fully loaded using requests library | 32,796,957 | 0 | 0 | 522 | 0 | python,python-requests,loaded | First requests GET will return you the entire page but requests is no a browser, it does not parse the content.
When you load a page with the browser, it does usually 10-50 requests for each resource, runs the JavaScript, .... | 0 | 0 | 1 | 0 | 2015-09-26T11:35:00.000 | 1 | 0 | false | 32,796,751 | 0 | 0 | 1 | 1 | I want to know if there is a response from requests.get(url) when the page is fully loaded. I did tests with around 200 refreshes of my page and it happens randomly that once or twice the page does not load the footer. |
Format python code in Spyder IDE | 33,624,414 | 2 | 3 | 5,911 | 0 | python,ide,format,spyder | I tried this
Source -> Fix Indentation, Remove Trailing Spaces
This is not the most efficient way, but it seems there are no key combinations to do these. Even in preferences, they have not allowed to add new shortcut for this. | 0 | 0 | 0 | 0 | 2015-09-27T20:57:00.000 | 1 | 0.379949 | false | 32,812,765 | 1 | 0 | 1 | 1 | Can anyone please advice the key combination to format python code in annaconda/Spyder IDE? In Eclipse IDE when coding in Java I usually use command F, however in Spyder IDEthe key combination causes search window to pop up. |
Send element from BeautifulSoup to Selenium | 32,815,252 | 0 | 3 | 386 | 0 | python,selenium,beautifulsoup | These are completely different tools that, in general, cannot be considered alternatives, though they somewhat cross on the "Locating Elements" front. The located elements though are very different - one is a Tag instance in BeautifulSoup and the other one is a webdriver WebElement instance that can actually be interac... | 0 | 0 | 1 | 0 | 2015-09-27T22:49:00.000 | 1 | 0 | false | 32,813,646 | 0 | 0 | 1 | 1 | I am using Selenium to navigate a webpage. To analyze the elements and data, I use BeautifulSoup because of the excellent options they give, including searching with regex.
So now I have an element located in BeautifulSoup. I want to select it in Selenium.
I figured I could somehow pass a XPath or CSS selector from the... |
how to keep django models in database for users customized view? | 32,830,790 | 0 | 1 | 106 | 0 | python,django,django-models | it is not clear what you mean by "my user" .
is this just the admin user who set this configuration globaly for the site .
or do you mean evey user of the site has his/her own preferences ?
if the latter case then make a new model called Preferences which has one to one relation to the user model .
then in your query y... | 0 | 0 | 0 | 0 | 2015-09-28T06:36:00.000 | 2 | 0 | false | 32,816,966 | 0 | 0 | 1 | 1 | suppose i have three models, at my view I am showing all the item of these models, i want to give my user privilege to set which model's objects are to be shown at view at first, second and third.
what is the best way to implement this? |
How to load balance celery tasks across several servers? | 58,830,493 | 3 | 6 | 4,182 | 0 | python,rabbitmq,celery | Best option is to use celery.send_task from the producing server, then deploy the workers onto n instances. The workers can then be run as @ealeon mentioned, using celery -A proj worker -l info -Ofair.
This way, load will be distributed across all servers without having to have the codebase present on the consuming se... | 0 | 1 | 0 | 0 | 2015-09-28T20:18:00.000 | 2 | 0.291313 | false | 32,831,111 | 0 | 0 | 1 | 1 | I'm running celery on multiple servers, each with a concurrency of 2 or more and I want to load balance celery tasks so that the server that has the lowest CPU usage can process my celery tasks.
For example, lets say I have 2 servers (A and B), each with a concurrency of 2, if I have 2 tasks in the queue, I want A to ... |
javascript accepting multiple date format | 32,847,574 | 0 | 0 | 163 | 0 | javascript,python,date,web,format | You can use Javascript to give the user the feedback that the correct format(s) is being used. But if you are taking any data to your server be sure verify the data on the server.
To verify the correct dataformat you can use Regular expressions and check if any format is correct. You should iterate through all allowed... | 0 | 0 | 1 | 0 | 2015-09-29T15:04:00.000 | 2 | 0 | false | 32,847,487 | 1 | 0 | 1 | 1 | I should preface this post by saying that I am a very elementary developer with a generic IS degree. Without going into too much detail, I was given a moderately large web application from an interning software engineer to support an enhance if need be. It was written primarily in Python, JavaScript and HTML5 and utili... |
Maya right click context sensitive menu | 32,870,983 | 0 | 0 | 955 | 0 | python,contextmenu,menuitem,maya,right-click | Okay i think I have found a solution, that's the best I have found but this is not very handy...
create a copy of the buildobjectMenuItemsNow.mel and dagMenuProc.mel in your script folder so Maya will read those ones instead of the native ones. Once you have done that you can modify the dagMenuProc.mel without destruct... | 0 | 0 | 0 | 0 | 2015-09-29T16:35:00.000 | 1 | 1.2 | true | 32,849,325 | 0 | 0 | 1 | 1 | I am trying to edit the right click context sensitive menu from Maya. I have found how to add a menuItem but I would like to have this Item in the top of the list not at the bottom... I think in this case I need to deleteAllItems from the menu, add mine and then re-add the default Maya ones but I don't know how to re-a... |
Redirect to a specific search result | 32,870,284 | 0 | 0 | 66 | 0 | python,django,web-scraping,url-redirection | Are you storing the results in a database or some persistent storage mechanism (maybe even in a KV store)?
Once you hold the results somewhere on your website, you can redirect from your results page via the Book Now button to a view withs the result's identifying value (say some hash) and have that view redirect to th... | 0 | 0 | 1 | 0 | 2015-09-30T15:34:00.000 | 1 | 1.2 | true | 32,870,164 | 0 | 0 | 1 | 1 | I have a scraper to pull search results from a number of travel websites. Now that I have the search results nicely displayed with "Book Now" buttons, I want those "Book Now" buttons to redirect to the specific search result so the user can book that specific travel search result. These search results are dynamic so th... |
Run Django 1.9 on Python 3.5 instead of 2.7 | 32,871,849 | 3 | 4 | 13,030 | 0 | python,django | Virtualenv is your friend. My life got so much easier when I started using it. You can create a virtualenv to use a particular version of Python, then set up your requirements.txt file to install all the packages you need using pip. | 0 | 0 | 0 | 0 | 2015-09-30T16:29:00.000 | 5 | 0.119427 | false | 32,871,265 | 0 | 0 | 1 | 2 | I have Python 2.7 and 3.5 running on OSX 10.10 and also Django 1.9a -- which is support for both Python version. The problem is I want to run Django on Python 3.5 instead of 2.7. On some threads I found suggestions to run it by including the Python version e.g: python3.5 manage.py runserver, but I found this error:
Fil... |
Run Django 1.9 on Python 3.5 instead of 2.7 | 32,871,487 | 1 | 4 | 13,030 | 0 | python,django | You first have to install Django for 3.5, which is a separate install from Django for 2.7.
If you're using pip, make sure to use pip3. Otherwise, make sure to run setup.py using python3.5. | 0 | 0 | 0 | 0 | 2015-09-30T16:29:00.000 | 5 | 0.039979 | false | 32,871,265 | 0 | 0 | 1 | 2 | I have Python 2.7 and 3.5 running on OSX 10.10 and also Django 1.9a -- which is support for both Python version. The problem is I want to run Django on Python 3.5 instead of 2.7. On some threads I found suggestions to run it by including the Python version e.g: python3.5 manage.py runserver, but I found this error:
Fil... |
Google app engine, full text search for empty (None) field | 57,089,611 | 0 | 1 | 428 | 0 | python,google-app-engine,full-text-search | Have you tried with:
NOT logo_url: Null | 0 | 1 | 0 | 0 | 2015-10-01T08:28:00.000 | 2 | 0 | false | 32,882,856 | 0 | 0 | 1 | 1 | I'd like to use Google AppEngine full text search to search for items in an index that have their logo set to None
tried
"NOT logo_url:''"
is there any way I write such a query, or do I have to add another property which is has_logo? |
Flask: 'session' vs. 'g'? | 32,910,056 | 92 | 66 | 16,777 | 0 | python,session,flask | No, g is not an object to hang session data on. g data is not persisted between requests.
session gives you a place to store data per specific browser. As a user of your Flask app, using a specific browser, returns for more requests, the session data is carried over across those requests.
g on the other hand is data sh... | 0 | 0 | 0 | 0 | 2015-10-02T14:47:00.000 | 1 | 1.2 | true | 32,909,851 | 1 | 0 | 1 | 1 | I'm trying to understand the differences in functionality and purpose between g and session. Both are objects to 'hang' session data on, am I right? If so, what exactly are the differences and which one should I use in what cases? |
Django: loaddata in migrations errors | 32,912,200 | 2 | 8 | 5,546 | 0 | python,django,database-migration | When you run python manage.py migrate it's trying to load your testmodel.json in fixtures folder, but your model (after updated) does not match with data in testmodel.json. You could try this:
Change your directory from fixture to _fixture.
Run python manage.py migrate
Optional, you now can change _fixture by fixture... | 0 | 0 | 0 | 0 | 2015-10-02T16:54:00.000 | 3 | 0.132549 | false | 32,912,112 | 0 | 0 | 1 | 1 | Something really annoying is happening to me since using Django migrations (not south) and using loaddata for fixtures inside of them.
Here is a simple way to reproduce my problem:
create a new model Testmodel with 1 field field1 (CharField or whatever)
create an associated migration (let's say 0001) with makemigratio... |
Should I dockerize different servers running on a single machine? | 33,002,100 | 0 | 0 | 27 | 0 | python,docker,webserver | Yes, Docker prefers "one process per container" approach. I would not see this as an overkill, quite to the contrary - at your case it might rather soon be beneficial to have instances of different users better isolated: less security risks, easier to maintain - say you need new version of everything for new version of... | 0 | 1 | 0 | 0 | 2015-10-02T18:00:00.000 | 1 | 1.2 | true | 32,913,119 | 0 | 0 | 1 | 1 | I want to make simple service that each user will have his own (simple and light) webserver.
I want to use an AWS instance to do this.
I understand that I can do that by starting Python's SimpleHTTPserver (Proof of concept) multiple times on different ports, and that the number of servers I can have depends on the res... |
Creating a webpage crawler that finds and maches user input | 32,915,448 | 1 | 0 | 41 | 0 | java,php,python,html,mysql | The programing language does not realy matter for the way to solve the problem. You can implement it in the language which you are comfortable with.
There are two basic ways to solve the problem:
Use a crawler which creates a index of words found on the different pages
The use that index to lookup the searched word
o... | 0 | 0 | 1 | 0 | 2015-10-02T18:46:00.000 | 1 | 1.2 | true | 32,913,859 | 0 | 0 | 1 | 1 | I made a website with many pages, on each page is a sample essay. The homepage is a page with a search field. I'm attempting to design a system where a user can type in a word and when they click 'search', multiple paragaphs containing the searched word from the pages with a sample essays are loaded on to the page.
I'm... |
GAE/P: Storing list of keys to guarantee getting up to date data | 32,941,257 | 1 | 0 | 60 | 1 | python,google-app-engine,google-cloud-datastore,eventual-consistency | if, like you say in comments, your lists change rarely and cant use ancestors (I assume because of write frequency in the rest of your system), your proposed solution would work fine. You can do as many get(multi) and as frequently as you wish, datastore can handle it.
Since you mentioned you can handle having that key... | 0 | 1 | 0 | 0 | 2015-10-02T20:35:00.000 | 2 | 1.2 | true | 32,915,462 | 0 | 0 | 1 | 1 | In my Google App Engine App, I have a large number of entities representing people. At certain times, I want to process these entities, and it is really important that I have the most up to date data. There are far too many to put them in the same entity group or do a cross-group transaction.
As a solution, I am cons... |
Where does PyCharm keep the error log for Python/Django projects? | 32,924,415 | 3 | 1 | 213 | 0 | python,django,pycharm | This isn't PyCharm specific, but it might help. If DEBUG=True, Django will include the traceback in the response. If DEBUG=False, then by default Django will email a report to the users in the ADMINS settings. | 0 | 0 | 0 | 0 | 2015-10-03T15:40:00.000 | 1 | 0.53705 | false | 32,924,392 | 0 | 0 | 1 | 1 | I am running a Django project locally using PyCharm and it is returning a 500 error on an API call. I think this signifies an internal server error so I am assuming the reason for and nature of this error will be in a log somewhere. But I can't find where it is.
Is such an error log kept? If so where? |
Django's philosophy on updates? | 32,938,503 | 4 | 1 | 55 | 0 | python,django | Possibly not a question for that site, but i will answer anyway.
Django does not have strict policy if you should update or not and if you can touch core files or not, it is totally up to you. But as always - touching core files is not good idea. Django core files usually lives outside of your project so there is no re... | 0 | 0 | 0 | 0 | 2015-10-04T21:07:00.000 | 1 | 1.2 | true | 32,938,416 | 0 | 0 | 1 | 1 | With WordPress and other CMS out there, there is a philosophy that you should always keep it up to date, no matter what. And never change the core files. How does Django as a framework stand on this topic? |
Network error(Request timeout) in Heroku Django app | 32,949,624 | 0 | 0 | 324 | 0 | python,django,heroku | The problem turned out to be in ALLOWED_HOSTS variable in settings file.
I set it to ['appname.herokuapp.com'] and it is working fine now. | 0 | 0 | 0 | 0 | 2015-10-05T11:52:00.000 | 1 | 1.2 | true | 32,947,993 | 0 | 0 | 1 | 1 | I just started a new project and pushed it to heroku.
I set up everything: Procfile, dyno and environment variables.
Everything is working fine in localhost.
But I get Network error on browser and logs show me Request timeout and Workder timeout error in heroku.
I read that this happens when some request takes a lot of... |
while spawning the fab file it asks me the login password for 'ubuntu' | 33,025,966 | 0 | 0 | 219 | 0 | python,django,amazon-web-services | Looks like there's an issue with your "ec2 key pairs". Make sure you have the correct key and that the permission of that key are 400.
To know if the key is working try to manually connect to the instance with
ssh -i ~/.ssh/<your-key> ubuntu@<your-host> | 0 | 1 | 0 | 1 | 2015-10-05T12:25:00.000 | 1 | 0 | false | 32,948,568 | 0 | 0 | 1 | 1 | I wrote the default password of my ami i.e. 'ubuntu' but it didn't work. I even tried with my ssh key. I've browsed enough and nothing worked yet.Can anybody please help me out?
[] Executing task 'spawn'
Started...
Creating instance
EC2Connection:ec2.us-west-2.amazonaws.com
Instance state: pending
Instance state: pendi... |
Is it possibile to use PhantomJS like a mobile driver in Selenium? | 32,953,131 | 3 | 1 | 370 | 0 | python,selenium,mobile,selenium-webdriver,phantomjs | There is no such thing as a "phantom mobile driver".
You can change the user agent string and the viewport/window size in order to suggest to the website to deliver the same markup that a mobile client would receive. | 0 | 0 | 1 | 0 | 2015-10-05T15:54:00.000 | 1 | 1.2 | true | 32,952,744 | 0 | 0 | 1 | 1 | I'm using Selenium with PhantomJS in order to scrape a dynamic website with infinite scroll.
It's working but my teacher suggested to use a mobile phantom driver in order to get the mobile version of the website. With the mobile version I expect to see less Ads or JavaScript and retrieve the information faster.
There i... |
Keeping state in a Django view to improve performance for pagination | 32,962,651 | 1 | 1 | 541 | 0 | python,django,postgresql,datatables | There are multiple way of improving your code structure,
First is you fetch only that data which is required according to your page number using Django ORM hit, second is you cache your ORM output and reuse that result if same query is passed again.
First goes like this.
In your code
Pizza.objects.all()
paginated = fi... | 0 | 0 | 0 | 0 | 2015-10-05T23:29:00.000 | 2 | 0.099668 | false | 32,959,469 | 0 | 0 | 1 | 1 | I'm designing a data-tables-driven Django app and have an API view that data-tables calls with AJAX (I'm using data-tables in its server-side processing mode). It implements searching, pagination, and ordering.
My database recently got large (about 500,000 entries) and performance has greatly suffered, both for searche... |
How to conciliate REST and JSONschema? | 33,002,536 | 1 | 1 | 237 | 0 | python,rest,extjs,pyramid,jsonschema | If I understand you correctly, you want to use JSON Schema for input validation, but you are struggling to figure out how to validate query parameters with JSON Schema in a RESTful way.
Unfortunately, there isn't a definitive answer. JSON Schema just wasn't designed for that. Here are the options I have considered in... | 0 | 0 | 0 | 0 | 2015-10-07T14:48:00.000 | 3 | 1.2 | true | 32,995,454 | 1 | 0 | 1 | 1 | I'm starting a new project that consists in an Extjs 6 application with a pyramid/python backend.
Due to this architecture, the backend will only provide an RPC and won't serve any page directly. My implementation of such a thing is usually based on REST and will fit nicely this CRUD application.
Regarding data validat... |
Is there a metod to have a trash can in Plone? | 33,016,003 | 2 | 1 | 166 | 0 | python,plone,plone-4.x | If you don't find a proper add-on, know that in Plone a trash can only be a matter of workflow.
You can customize your workflow adding a new trash transition that move the content in a state (trashed) where users can't see it (maybe keep the visibility open for Manager and/or Site Administrators).
Probably you must als... | 0 | 0 | 0 | 1 | 2015-10-08T07:55:00.000 | 4 | 0.099668 | false | 33,009,839 | 0 | 0 | 1 | 2 | I want to give at all members of a Plone (4.3.7) site the possibility to restore a file accidentally deleted.
I only found ecreall.trashcan for this purpose, but I've some problem with installation. After add it in buildout.conf and do a bin/buildout the output contain some error like...
File "build/bdist.linux-x86_64... |
Is there a metod to have a trash can in Plone? | 33,026,043 | 1 | 1 | 166 | 0 | python,plone,plone-4.x | I've found the solution(!!!) working with -Content Rules- in the control panel.
First I've created a folder called TRASHCAN , after in content rule I've added a rule that copy the file/page/image in folder trashcan if it will be removed.
This rule can be disable in trashcan folder, so you could delete definitely the ob... | 0 | 0 | 0 | 1 | 2015-10-08T07:55:00.000 | 4 | 0.049958 | false | 33,009,839 | 0 | 0 | 1 | 2 | I want to give at all members of a Plone (4.3.7) site the possibility to restore a file accidentally deleted.
I only found ecreall.trashcan for this purpose, but I've some problem with installation. After add it in buildout.conf and do a bin/buildout the output contain some error like...
File "build/bdist.linux-x86_64... |
How to send an email on python without authenticating | 33,017,245 | 1 | 0 | 286 | 0 | python,django,email,smtplib | You connect to the SMTP server, preferably your own, that doesn't require authentication or on which you do have an account, then you create an email that has the users e-mail in the from field, and you just send it.
Which lib you will use to do it, smtplib, some Django stuff, or anything else, is irrelevant. If you wa... | 0 | 0 | 0 | 1 | 2015-10-08T12:57:00.000 | 1 | 0.197375 | false | 33,016,533 | 0 | 0 | 1 | 1 | I'm trying to send a notification from my Django Application everytime the user perform specific actions, i would like to send those notifications from the email of the person who performed these actions.
I don't want them to have to put their password on my application or anything else. I know this is possible because... |
Sudden performance drop going from 1024 to 1025 bytes | 33,051,195 | 1 | 2 | 68 | 0 | python,django,django-rest-framework | This turned out to be related to libcurl's default "Expect: 100-continue" header. | 0 | 1 | 0 | 0 | 2015-10-09T02:34:00.000 | 1 | 0.197375 | false | 33,028,985 | 0 | 0 | 1 | 1 | I am running a dev server using runserver. It exposes a json POST route. Consistently I'm able to reproduce the following performance artifact - if request payload is <= 1024 bytes it runs in 30ms, but if it is even 1025 bytes it takes more than 1000ms.
I've profiled and the profile points to rest_framework/parsers.py ... |
Passing binary data from java to python | 38,824,000 | 0 | 0 | 250 | 0 | java,python,subprocess,jython,processbuilder | If there is no limit to the length of the string argument for launching the python script, you could simply encode the binary data from the image into a string, and pass that. The only problem you might encounter with this approach would be null characters and and negative numbers. | 1 | 0 | 0 | 0 | 2015-10-09T03:13:00.000 | 1 | 0 | false | 33,029,293 | 0 | 0 | 1 | 1 | I have a working program written in Java (a 3d game) and some scripts in Python written with theano to process images.
I am trying to capture the frames of the game as it is running and run these scripts on the frames.
My current implementation grabs the binary data from each pixel in the frame, saves the frame as a p... |
Adding custom attributes to django scheema | 33,340,454 | 0 | 1 | 79 | 0 | python,django,saml-2.0,okta | Once again I have a privilege to answer my own question. So hear is the solution.
Django has a user profile module which is to be turned on by giving the module location in the settings.py
i.e -
"AUTH_PROFILE_MODULE = appTitle.UserProfile"
The UserProfile needs to be specified in modules.py specifying the required ... | 0 | 0 | 0 | 0 | 2015-10-09T14:29:00.000 | 1 | 0 | false | 33,040,841 | 0 | 0 | 1 | 1 | I am trying to authenticate my django application written in python with okta IDP. I have almost configured everything at SP side and IDP side too. Now I need to pass a custom variable from IDP which assert SP that user is a publisher,editor or admin and further save this to the django format database (in auth_user_gro... |
Sending a message between HTML and python on the raspberry pi | 33,235,245 | 0 | 1 | 1,183 | 0 | javascript,python,html,raspberry-pi,raspberry-pi2 | Maybe you can try to create a nodejs script that create a websocket.
You ca connect to the websocket with python and so, you are able to send data from your website to nodejs and from nodejs to python in real-time.
Have a nice day | 0 | 0 | 0 | 1 | 2015-10-11T00:05:00.000 | 3 | 0 | false | 33,060,256 | 0 | 0 | 1 | 1 | I want to do the following. I want to have a button on a HTML page that once It gets pressed a message is sent to some python script I'm running.
For example, once the button is pressed some boolean will turn true, we will call the boolean bool_1. Then that boolean is sent to my python code, or written to a text file. ... |
How to define critical section in django | 33,072,629 | 0 | 2 | 341 | 0 | python,django | It depends what are your queries, Your single query to the database will never face any race condition due to ACID principle impose by the database. But if there is any condition like first you are reading the data from database and after some operation on application level you are writing the updated data back to the ... | 0 | 0 | 0 | 0 | 2015-10-12T02:54:00.000 | 2 | 0 | false | 33,072,577 | 0 | 0 | 1 | 1 | Is there any simple way to define critical section?
when a user during the updating some database table, I'd force to make the other user cannot update on the same tables. |
encrypting data on server and decrypting it on client | 33,080,475 | -3 | 0 | 1,327 | 0 | javascript,python,ios,swift,encryption | It's very wide question and the variety of ways to do that.
First of all, you need to choose a method of the encryption and purpose why you encrypt the data.
There are 3 main encryption methods:
1. Symmetric Encryption
Encrypter and Decrypter have access to the same key. It's quite easy, but it has one big drawback ... | 0 | 0 | 0 | 1 | 2015-10-12T11:32:00.000 | 3 | -0.197375 | false | 33,080,063 | 0 | 0 | 1 | 1 | I have a very simple iOS and Android applications that download a txt file from a web server and preset it to the user. I'm looking for a way that only the application will be able to read the file so no one else can download and use it.
I would like to take the file that is on my computer, encrypt it somehow, upload t... |
Control Libreoffice Impress from Python | 33,251,685 | 0 | 1 | 3,178 | 0 | python,libreoffice | Finally, I found a way to solve this using Python, in an elegant and easy way. Instead of libraries or APIs, Im using a socket to connect to Impress and control it.
At the end of the post you can read the full-text that indicates how to control Impress this way. It is easy, and amazing.
You send a message using Python ... | 0 | 1 | 0 | 0 | 2015-10-13T00:46:00.000 | 3 | 1.2 | true | 33,092,424 | 0 | 0 | 1 | 1 | Im writing an application oriented to speakers and conferences. Im writing it with Python and focused on Linux.
I would like to know if its possible to control LibreOffice Impress with Python, under Linux in some way.
I want to start an instance of LibreOffice Impress with some .odp file loaded, from my Python app. The... |
python: APScheduler in WSGI app | 33,232,473 | 3 | 5 | 1,030 | 0 | python,mod-wsgi,wsgi,apscheduler | You're right -- the scheduler won't start until the first request comes in.
Therefore running a scheduler in a WSGI worker is not a good idea. A better idea would be to run the scheduler in a separate process and connect to the scheduler when necessary via some RPC mechanism like RPyC or Execnet. | 0 | 1 | 0 | 0 | 2015-10-15T10:01:00.000 | 1 | 0.53705 | false | 33,145,523 | 0 | 0 | 1 | 1 | I would like to run APScheduler which is a part of WSGI (via Apache's modwsgi with 3 workers) webapp. I am new in WSGI world thus I would appreciate if you could resolve my doubts:
If APScheduler is a part of webapp - it becomes alive just after first request (first after start/reset Apache) which is run at least by o... |
How to send command to receipt printers from Django app? | 57,876,597 | 0 | 1 | 1,911 | 0 | python,django,printing,receipt | For a web app to use a device on the client, it has to go through the browser. I may be wrong, but I seriously doubt this is a built-in feature for receipt printers. I see three options:
1) Find/make a normal printer driver that works with your receipt printer, put it on the client box, and just use the normal print js... | 0 | 0 | 0 | 0 | 2015-10-15T10:35:00.000 | 1 | 0 | false | 33,146,245 | 0 | 0 | 1 | 1 | I have created a simple POS application. I now have to send a command to the receipt printer to print the receipt. I don't have any code related to this problem as I don't know where to start even. My questions are:
1) Is Windows a good choice for working with receipt printers as every shop I went to use a desktop appl... |
Can I have multiple django projects in the same virtualenv folder | 56,910,915 | 1 | 2 | 1,645 | 0 | python,django | It really depends on the situation. Suppose if your Project A need to use Pip version 17.01 to run while your project B need to use Pip version 18.01 to run. So It is not possible to use 1 virtual env to run multiple project but the downside of having multiple virtual environments is it consume much space & resource of... | 0 | 0 | 0 | 0 | 2015-10-15T15:43:00.000 | 1 | 1.2 | true | 33,152,869 | 1 | 0 | 1 | 1 | Another newbie to django here. I was wondering if it is recommended/not-recommended to run two different projects in the same virtualenv folder that have the same django version. To be more clear, is it necessary to create separate virtualenv everytime I want to start a new project when i know that i am using same djan... |
How to use Django 1.8.5 ORM without creating a django project? | 67,953,078 | 0 | 26 | 15,755 | 0 | python,django,orm | I had to add import django, and then this worked. | 0 | 0 | 0 | 0 | 2015-10-16T12:01:00.000 | 5 | 0 | false | 33,170,016 | 0 | 0 | 1 | 1 | I've used Django ORM for one of my web-app and I'm very much comfortable with it. Now I've a new requirement which needs database but nothing else that Django offers. I don't want to invest more time in learning one more ORM like sqlalchemy.
I think I can still do
from django.db import models
and create models, but th... |
Multi-threading on Google app engine | 33,184,298 | 0 | 0 | 921 | 0 | multithreading,python-2.7,sockets,google-app-engine,apple-push-notifications | Found the issue. I was calling start_background_thread with argument set to function(). When I fixed it to calling it as function it worked as expected. | 0 | 1 | 0 | 0 | 2015-10-17T07:18:00.000 | 1 | 0 | false | 33,183,963 | 0 | 0 | 1 | 1 | Does Google App engine support multithreading? I am seeing conflicting reports on the web.
Basically, I am working on a module that communicates with Apple Push Notification server (APNS). It uses a worker thread that constantly looks for new messages that need to be pushed to client devices in a pull queue.
After it ... |
Command line programs in a web (python) | 33,184,244 | 1 | 1 | 179 | 0 | python-2.7,web-applications,command-line,pycharm | Based on what you've described, there are many ways to approach this:
Create a terminal emulator on your webpage.
If you want nicer UI, you can set up any web framework and have your command line programs in the backend, while exposing frontend interfaces to allow users to input parameters and see the results.
If you'... | 0 | 1 | 0 | 0 | 2015-10-17T07:40:00.000 | 1 | 1.2 | true | 33,184,127 | 0 | 0 | 1 | 1 | I am new to programming and web apps so i am not even sure if this question is obvious or not.
Sometimes I find command line programs more time efficient and easy to use (even for the users). So is there a way to publish my command line programs with command line interface to a web as a web app using cgi or Wsgi?
For ... |
Making an alias for an attribute field, to be used in a django queryset | 33,187,887 | 0 | 1 | 452 | 0 | python,django | Even if you could do this, it wouldn't help solve your ultimate problem. You can't use order_by on concatenated querysets from different models; that can't possibly work, since it is a request for the database to do an ORDER BY on the query. | 0 | 0 | 0 | 0 | 2015-10-17T14:11:00.000 | 2 | 0 | false | 33,187,572 | 0 | 0 | 1 | 2 | In Django, how does one give an attribute field name an alias that can be used to manipulate a queryset?
Background: I have a queryset where the underlying model has an auto-generating time field called "submitted_on". I want to use an alias for this time field (i.e. "date"). Why? Because I will concatenate this query... |
Making an alias for an attribute field, to be used in a django queryset | 33,192,349 | 0 | 1 | 452 | 0 | python,django | It seems qset1 = qset1.annotate(date=Max('submitted_on')) is the closest I have right now. This, or using exclude(). I'll update if I get a better solution. Of course other experts from SO are welcome to chime in with their own answers. | 0 | 0 | 0 | 0 | 2015-10-17T14:11:00.000 | 2 | 1.2 | true | 33,187,572 | 0 | 0 | 1 | 2 | In Django, how does one give an attribute field name an alias that can be used to manipulate a queryset?
Background: I have a queryset where the underlying model has an auto-generating time field called "submitted_on". I want to use an alias for this time field (i.e. "date"). Why? Because I will concatenate this query... |
Multiple user logins on a development server using Django | 33,193,714 | -1 | 1 | 103 | 0 | django,python-3.3 | The easiest way is to use multiple browsers, and if necessary, multiple dev servers on alternate ports. 8000, 8001, etc. | 0 | 0 | 0 | 0 | 2015-10-18T01:52:00.000 | 1 | -0.197375 | false | 33,193,501 | 0 | 0 | 1 | 1 | I was wondering whether it is possible to have more than one user log in on a development server using Django 1.8
I am creating an app, where these "active" users are able to view one another details (or fields) respective to the relative models I designed.
Currently, I am only able to log in as a single user and wonde... |
Create New Model Instance with API Call in Django | 33,209,925 | 1 | 2 | 305 | 0 | python,django | Do I put the code in a specific view
a django view is a callable that must accept an HTTP request and return an HTTP response, so unless you need to be able to call your code thru HTTP there's no point in using a view at all, and even if you want to have a view exposing this code it doesn't mean the code doing the API... | 0 | 0 | 0 | 0 | 2015-10-19T07:26:00.000 | 3 | 0.066568 | false | 33,208,805 | 0 | 0 | 1 | 1 | I'm unsure how to approach this problem in general in my Django app:
I need to make a call to an API every n days. I can make this call and fetch the data required via Python, but where exactly should I put the code?
Do I put the code in a specific view and then map the view to a URL and have that URL called whenever I... |
Sent RSA Key Through Autobahn | 33,211,565 | 0 | 0 | 120 | 0 | python,encryption,autobahn | You haven't provided information on how you are encrypting your data. But you should never send the private keys over the network. Never. Doing that is as secure as locking your house but leave the key in the keyhole. If you've done it even once, throw the key away and generate a new one.
The strength of RSA comes from... | 0 | 0 | 1 | 0 | 2015-10-19T08:38:00.000 | 1 | 0 | false | 33,210,021 | 0 | 0 | 1 | 1 | I'm new in python and websocket programmer.
I want to sent data that was encrypted with RSA key (in Python) through websocket to server in cloud (using nodeJs). For decrypt that data I need that key, right?
How I can sent RSA to server and use that key to decrypt?
Thankyou |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.