Where do I put my own object instances?
Hi,
i'm woking with django channels and I have realtime data incoming into my django server wich I then write into a custom object. When I call update() on my object it submits the Data to a Vue.js frontend.
It works but I'm not shure where to put the instance of my object. I'm asking because on a server farm my guess is that the object would be in different RAMs and therefor have differnt values, is this correct? Where do I instaniate objects so that they are handled properly?
/r/django
https://redd.it/7oc1bt
Hi,
i'm woking with django channels and I have realtime data incoming into my django server wich I then write into a custom object. When I call update() on my object it submits the Data to a Vue.js frontend.
It works but I'm not shure where to put the instance of my object. I'm asking because on a server farm my guess is that the object would be in different RAMs and therefor have differnt values, is this correct? Where do I instaniate objects so that they are handled properly?
/r/django
https://redd.it/7oc1bt
reddit
Where do I put my own object instances? • r/django
Hi, i'm woking with django channels and I have realtime data incoming into my django server wich I then write into a custom object. When I call...
Unsure which flask user system to use
I'm building a website and I need a user system. I have found multiple libraries that handle this but I'm having some difficulties finding the right one. I thought some of you might have experience with these.
I'm looking for a library that has all the basic stuff like login, logout, remembering the user's session, etc. But I'm also looking for some customisability like using something different for confirmations (when you forgot your password for example) than emails.
Help is much appreciated.
/r/flask
https://redd.it/7obuuc
I'm building a website and I need a user system. I have found multiple libraries that handle this but I'm having some difficulties finding the right one. I thought some of you might have experience with these.
I'm looking for a library that has all the basic stuff like login, logout, remembering the user's session, etc. But I'm also looking for some customisability like using something different for confirmations (when you forgot your password for example) than emails.
Help is much appreciated.
/r/flask
https://redd.it/7obuuc
reddit
Unsure which flask user system to use • r/flask
I'm building a website and I need a user system. I have found multiple libraries that handle this but I'm having some difficulties finding the...
Any Cactus forks/alternatives?
I've been tasked with rewriting a medium-sized e-commerce website where I work. The site is written in Django and uses Wagtail. (We've decided to re-write it because the company we outsourced it to did such a poor job on it that it's very difficult to work with.)
Anyway, nobody has actually made use of the Wagtail admin since the site was originally deployed over a year ago. So I've decided to make the site almost entirely static with a Django-Rest-Framework backend. I'm going to be reusing most of the templates and stylesheets from the original site, so I've decided to use [Cactus](https://github.com/eudicots/Cactus/). (It's a static site generator which uses Django to render templates.) However, after looking around a bit, it seems that Cactus is not a very active project -- its last version was released almost one year ago, and its last commit was over five months ago. And it uses Django version 1.6 to render the templates. However, I really like how it's set up and the fact that it uses Django templates means that I can do most of the conversion automatically.
Does anybody know of an active fork of Cactus, or of a similar alternative? I want to keep the Django templates in case we ever have to move it back to Wagtail or to be a full-on Django site, or if I want to write a custom CMS with Django to allow users here to edit pages. If there isn't anything more up to date, then I'll just continue with Cactus.
I appreciate any input. Thanks!
/r/django
https://redd.it/7oe31d
I've been tasked with rewriting a medium-sized e-commerce website where I work. The site is written in Django and uses Wagtail. (We've decided to re-write it because the company we outsourced it to did such a poor job on it that it's very difficult to work with.)
Anyway, nobody has actually made use of the Wagtail admin since the site was originally deployed over a year ago. So I've decided to make the site almost entirely static with a Django-Rest-Framework backend. I'm going to be reusing most of the templates and stylesheets from the original site, so I've decided to use [Cactus](https://github.com/eudicots/Cactus/). (It's a static site generator which uses Django to render templates.) However, after looking around a bit, it seems that Cactus is not a very active project -- its last version was released almost one year ago, and its last commit was over five months ago. And it uses Django version 1.6 to render the templates. However, I really like how it's set up and the fact that it uses Django templates means that I can do most of the conversion automatically.
Does anybody know of an active fork of Cactus, or of a similar alternative? I want to keep the Django templates in case we ever have to move it back to Wagtail or to be a full-on Django site, or if I want to write a custom CMS with Django to allow users here to edit pages. If there isn't anything more up to date, then I'll just continue with Cactus.
I appreciate any input. Thanks!
/r/django
https://redd.it/7oe31d
GitHub
GitHub - eudicots/Cactus: Static site generator for designers. Uses Python and Django templates.
Static site generator for designers. Uses Python and Django templates. - eudicots/Cactus
Deleting object that that has a M2M relation yields a None object.
Labor model has a M2M field of LaborSelections.
`LaborSelection.objects.get(pk=my_id).delete()`
This leaves an object in the database with as each field is set to None and the object has no `pk`.
How can I make sure these are properly getting deleted?
/r/djangolearning
https://redd.it/7od8hq
Labor model has a M2M field of LaborSelections.
`LaborSelection.objects.get(pk=my_id).delete()`
This leaves an object in the database with as each field is set to None and the object has no `pk`.
How can I make sure these are properly getting deleted?
/r/djangolearning
https://redd.it/7od8hq
reddit
Deleting object that that has a M2M relation... • r/djangolearning
Labor model has a M2M field of LaborSelections. `LaborSelection.objects.get(pk=my_id).delete()` This leaves an object in the database with as...
Why have I got this error response when I try to upload an image to Cloudinary?
https://stackoverflow.com/questions/48068898/django-rest-framework-and-cloudinary?noredirect=1#comment83122267_48068898
/r/djangolearning
https://redd.it/7obtab
https://stackoverflow.com/questions/48068898/django-rest-framework-and-cloudinary?noredirect=1#comment83122267_48068898
/r/djangolearning
https://redd.it/7obtab
Stackoverflow
Django rest framework and Cloudinary
Why have I got this error response: [02/Jan/2018 22:05:11] "POST /api/v1/images/ HTTP/1.1" 400 43 when I try to upload a new image.
{ "error": "Not a valid string." }
I completely new in Django...
{ "error": "Not a valid string." }
I completely new in Django...
Your opinion on using permissions in Django?
So to start with, I'm no expert and this is basically based on my sole experience, so there may be some bias here and I would like to change that. I want to know what others think about this topic.
I've found that (once again, from my experience) that it is quite complicated to use the permission system of Django. Especially in cases where we have to give a user different capabilities where more than one kind of user is required.
I am working on a website for my local school and it required three kinds of users, admn, teacher and student. It was quite hard to implement the permission as i was still only starting out(still am a beginner).
So I found another way and made a custom user. I added three new fields along with other profile fields. The three new fields were boolean fields e.g is_teacher, is_student and is_parent and my project kind of runs around these three fields.
Now instead of using the permission or admin at all, I can just use these as conditionals in the views for example if someone tries to go the student page, I added some conditionals for verification e.g if the request.user is a student and request.user is an admin then show them the view otherwise return and http404.
This way, I don't think I'll have to use the permission at all. The project I mentioned, I'm still developing and haven't run into errors yet.
I've tried searching on the internet about making different kinds of users but no source actually tells what to do.
Can anyone guide me how to better utilize permissions? Or the way that I am working right now is okay? What are your experiences handling these types of situations?
This may be a noob discussion for the pros but please keep in mind I'm just a beginner and this is all new to me and I would really appreciate your advice.
Thanks!
/r/django
https://redd.it/7ohp07
So to start with, I'm no expert and this is basically based on my sole experience, so there may be some bias here and I would like to change that. I want to know what others think about this topic.
I've found that (once again, from my experience) that it is quite complicated to use the permission system of Django. Especially in cases where we have to give a user different capabilities where more than one kind of user is required.
I am working on a website for my local school and it required three kinds of users, admn, teacher and student. It was quite hard to implement the permission as i was still only starting out(still am a beginner).
So I found another way and made a custom user. I added three new fields along with other profile fields. The three new fields were boolean fields e.g is_teacher, is_student and is_parent and my project kind of runs around these three fields.
Now instead of using the permission or admin at all, I can just use these as conditionals in the views for example if someone tries to go the student page, I added some conditionals for verification e.g if the request.user is a student and request.user is an admin then show them the view otherwise return and http404.
This way, I don't think I'll have to use the permission at all. The project I mentioned, I'm still developing and haven't run into errors yet.
I've tried searching on the internet about making different kinds of users but no source actually tells what to do.
Can anyone guide me how to better utilize permissions? Or the way that I am working right now is okay? What are your experiences handling these types of situations?
This may be a noob discussion for the pros but please keep in mind I'm just a beginner and this is all new to me and I would really appreciate your advice.
Thanks!
/r/django
https://redd.it/7ohp07
reddit
Your opinion on using permissions in Django? • r/django
So to start with, I'm no expert and this is basically based on my sole experience, so there may be some bias here and I would like to change that....
[D] Uh oh. Stanford took down their old CS224n schedule and replaced it with a new one for the current semester, which only has 2 weeks worth of stuff on it. Anyone know if there's an archive?
http://web.stanford.edu/class/cs224n/syllabus.html
This had all the assignments, midterms, solutions, papers, notes, and projects, all gone :(
Anyone know is there is a backup of these files?
/r/MachineLearning
https://redd.it/7ohumt
http://web.stanford.edu/class/cs224n/syllabus.html
This had all the assignments, midterms, solutions, papers, notes, and projects, all gone :(
Anyone know is there is a backup of these files?
/r/MachineLearning
https://redd.it/7ohumt
What do you normally name the folder with settings.py, urls.py, and wsgi.py?
I see a lot of myproject and mysite's in sample code. I guess that turns me off because it reminds me of Windows
/r/djangolearning
https://redd.it/7o5tj0
I see a lot of myproject and mysite's in sample code. I guess that turns me off because it reminds me of Windows
/r/djangolearning
https://redd.it/7o5tj0
reddit
What do you normally name the folder with... • r/djangolearning
I see a lot of myproject and mysite's in sample code. I guess that turns me off because it reminds me of Windows
Full-Text Search in Django with PostgreSQL
http://www.paulox.net/2017/12/22/full-text-search-in-django-with-postgresql/
/r/django
https://redd.it/7okf25
http://www.paulox.net/2017/12/22/full-text-search-in-django-with-postgresql/
/r/django
https://redd.it/7okf25
Paolo Melchiorre
Paolo Melchiorre - Full-text search in Django with PostgreSQL
Article based on my talk about Full-text search in Django with PostgreSQL.
Web Development with Django Cookbook (Second Edition) in Humble Book Bundle: Python by Packt
https://www.humblebundle.com/books/python-by-packt-book-bundle?partner=indiekings
/r/django
https://redd.it/7ojkme
https://www.humblebundle.com/books/python-by-packt-book-bundle?partner=indiekings
/r/django
https://redd.it/7ojkme
Humble Bundle
Humble Book Bundle: Python by Packt
Pay what you want for ebooks on Python and support charity!
Is there an easy way to view a project on a mobile device?
Right now, when I'm trying to test my site on a mobile device, I'm deploying it to a Heroku server and running the Heroku site on my phone. This is really tiresome because it takes awhile to deploy.
Is there an easier way to run a project on my phone, possibly without having to deploy it onto a server?
/r/django
https://redd.it/7onovt
Right now, when I'm trying to test my site on a mobile device, I'm deploying it to a Heroku server and running the Heroku site on my phone. This is really tiresome because it takes awhile to deploy.
Is there an easier way to run a project on my phone, possibly without having to deploy it onto a server?
/r/django
https://redd.it/7onovt
reddit
Is there an easy way to view a project on a mobile device? • r/django
Right now, when I'm trying to test my site on a mobile device, I'm deploying it to a Heroku server and running the Heroku site on my phone. This...
What is your go-to charting solution with flask?
I am arriving at the stage where i can develop the dasboard for my little analytics side project. The app is data driven and i have little experience with programming/designing in general.
What library would you recommend and why? I have zero experience and can only select a library on the visual appeal but don't want to make a mistake early on and redo everything later.
Could be server or client side. Don't really know what i need..
/r/flask
https://redd.it/7olbfk
I am arriving at the stage where i can develop the dasboard for my little analytics side project. The app is data driven and i have little experience with programming/designing in general.
What library would you recommend and why? I have zero experience and can only select a library on the visual appeal but don't want to make a mistake early on and redo everything later.
Could be server or client side. Don't really know what i need..
/r/flask
https://redd.it/7olbfk
reddit
What is your go-to charting solution with flask? • r/flask
I am arriving at the stage where i can develop the dasboard for my little analytics side project. The app is data driven and i have little...
Starting your first project without a guide
I would like to start my first Django project a aboutMe page but wondering when to start. I am currently reading djangoboooks then test driven django next. Is it a good mix to start a project on your own while learning or should I just wait and keep following tutorial projects. So far I have done the poll app twice and been drilling in my brain what each folder does, just don't know exactly how to create yet.
/r/djangolearning
https://redd.it/7oot3y
I would like to start my first Django project a aboutMe page but wondering when to start. I am currently reading djangoboooks then test driven django next. Is it a good mix to start a project on your own while learning or should I just wait and keep following tutorial projects. So far I have done the poll app twice and been drilling in my brain what each folder does, just don't know exactly how to create yet.
/r/djangolearning
https://redd.it/7oot3y
reddit
Starting your first project without a guide • r/djangolearning
I would like to start my first Django project a aboutMe page but wondering when to start. I am currently reading djangoboooks then test driven...
Desperate for a Flask starter - gevent, sqlalchemy/postgres, gunicorn + supervisord + config , msgpack, celery/rq.
hi guys,
I'm desperate for a flask starter that shows all of these working in the *right* way. I have a legacy flask app that is a complete mess and I would like to see how to do it in the right way.
I see a lot of code on how to write an application - but very very little info on how to build a production ready system with all the nuts and pieces needed to make a great production ready system.
1. gevent + gunicorn + supervisord - get the flask app to work in production in the best way possible. How do you setup monkeypatching, etc ? Remember that sqlalchemy is also in this mix. And a huge pain is loading config files - staging and production. All of this is running using supervisord
2. sqlalchemy/postgres - autocommit or not ? autoflush or not ? How do you write a model in the way that you dont have to do this for every function you write (and you can do this once in the base model or decorator or something). This is a huge, huge PITA for me
3. celery/rq + supervisord - how do you run celery/rq and workers using supervisord ? One of the biggest questions for us is how to load the same sqlalchemy models (from the main flask app) into the celery workers. We invariably end up loading flask code as well.
4. msgpack - we want to return msgpack *OR* json data based on what the client has requested for. The api should also accept incoming msgpack *OR* json data. Obviously we dont want to write this code inside each and every function/endpoint. We would prefer doing this in a decorator... if we knew how to.
I'm looking for a starter template demonstrating these features. And I can run from there.
P.S. I'm actually willing to pay for this - not sure if it is kosher mentioning that here. But I'm happy to have someone take the time to do this and make it opensource for the community.
/r/flask
https://redd.it/7oirh1
hi guys,
I'm desperate for a flask starter that shows all of these working in the *right* way. I have a legacy flask app that is a complete mess and I would like to see how to do it in the right way.
I see a lot of code on how to write an application - but very very little info on how to build a production ready system with all the nuts and pieces needed to make a great production ready system.
1. gevent + gunicorn + supervisord - get the flask app to work in production in the best way possible. How do you setup monkeypatching, etc ? Remember that sqlalchemy is also in this mix. And a huge pain is loading config files - staging and production. All of this is running using supervisord
2. sqlalchemy/postgres - autocommit or not ? autoflush or not ? How do you write a model in the way that you dont have to do this for every function you write (and you can do this once in the base model or decorator or something). This is a huge, huge PITA for me
3. celery/rq + supervisord - how do you run celery/rq and workers using supervisord ? One of the biggest questions for us is how to load the same sqlalchemy models (from the main flask app) into the celery workers. We invariably end up loading flask code as well.
4. msgpack - we want to return msgpack *OR* json data based on what the client has requested for. The api should also accept incoming msgpack *OR* json data. Obviously we dont want to write this code inside each and every function/endpoint. We would prefer doing this in a decorator... if we knew how to.
I'm looking for a starter template demonstrating these features. And I can run from there.
P.S. I'm actually willing to pay for this - not sure if it is kosher mentioning that here. But I'm happy to have someone take the time to do this and make it opensource for the community.
/r/flask
https://redd.it/7oirh1
reddit
Desperate for a Flask starter - gevent,... • r/flask
hi guys, I'm desperate for a flask starter that shows all of these working in the *right* way. I have a legacy flask app that is a complete mess...
Data Analysis with Pandas and Python offers 19+ hours of in-depth video tutorials on the most powerful data analysis toolkit available today.
http://couponsforever.com/coupon/data-analysis-with-pandas/
/r/Python
https://redd.it/7opj39
http://couponsforever.com/coupon/data-analysis-with-pandas/
/r/Python
https://redd.it/7opj39
Coupon Forever
[100% Off] Data Analysis with Pandas and Python
Analyze data quickly and easily with Python's powerful pandas library! All datasets included --- beginners welcome!
[AF] Update web site dynamically with Python script output
Hi,
I am pretty new to Flask and just learning the basics. How can I update my web site dynamically with the output from Python script?
I am fetching data from my temperature sensor which works well but I would like to bring that data to my simple web site. That web site should automatically update newest readings without reloading the whole page.
/r/flask
https://redd.it/7optfy
Hi,
I am pretty new to Flask and just learning the basics. How can I update my web site dynamically with the output from Python script?
I am fetching data from my temperature sensor which works well but I would like to bring that data to my simple web site. That web site should automatically update newest readings without reloading the whole page.
/r/flask
https://redd.it/7optfy
reddit
[AF] Update web site dynamically with Python script output • r/flask
Hi, I am pretty new to Flask and just learning the basics. How can I update my web site dynamically with the output from Python script? I am...
Flask-OAuthlib custom response
Hi. I'm implementing my own OAuth2 server using Flask-OAuthlib and password grant type. Everything is working fine, I just have one small issue that I can't figure out. I would like to return some custom login errors like 'user not active'. Is there a way to do this? As far as I can see the usergetter method only returns user object or None.
/r/flask
https://redd.it/7nq6e2
Hi. I'm implementing my own OAuth2 server using Flask-OAuthlib and password grant type. Everything is working fine, I just have one small issue that I can't figure out. I would like to return some custom login errors like 'user not active'. Is there a way to do this? As far as I can see the usergetter method only returns user object or None.
/r/flask
https://redd.it/7nq6e2
reddit
Flask-OAuthlib custom response • r/flask
Hi. I'm implementing my own OAuth2 server using Flask-OAuthlib and password grant type. Everything is working fine, I just have one small issue...
Adding Ability to Log In to Site With Facebook
I want to add the ability for users to log into a website using Facebook to a project that I'm working on.
I found a bunch of references to `social-auth-app-django`, but the last commit to the Github repository was almost three years ago. Is there a more modern/up to date alternative, or is that still the best option?
/r/django
https://redd.it/7opcxd
I want to add the ability for users to log into a website using Facebook to a project that I'm working on.
I found a bunch of references to `social-auth-app-django`, but the last commit to the Github repository was almost three years ago. Is there a more modern/up to date alternative, or is that still the best option?
/r/django
https://redd.it/7opcxd
reddit
Adding Ability to Log In to Site With Facebook • r/django
I want to add the ability for users to log into a website using Facebook to a project that I'm working on. I found a bunch of references to...
Any recommended tutorials or documentation on building unit tests with a MongoDB and Flask?
/r/flask
https://redd.it/7nq4dx
/r/flask
https://redd.it/7nq4dx
reddit
Any recommended tutorials or documentation on building... • r/flask
1 points and 1 comments so far on reddit