Python® Notes for Professionals book
http://books.goalkicker.com/PythonBook/
/r/Python
https://redd.it/7o3kl4
http://books.goalkicker.com/PythonBook/
/r/Python
https://redd.it/7o3kl4
Goalkicker
Free Python Programming Book
Getting started with Python Language, Python Data Types, Indentation, Comments and Documentation, Date and Time, Date Formatting, Enum, Set, Simple Mathematical Operators, Bitwise Operators, Boolean Operators, Operator Precedence, Variable Scope and Binding…
Related, does this ERD behind my flask app makes sense?
https://www.lucidchart.com/invitations/accept/74564e9f-4d85-422f-b217-a4ae4db92c0b
Above is My Lucidchart ERD which you can modify, if you do please make notations.
JPG: https://drive.google.com/open?id=1cN7nyYYlKG1D0HXCAWzSTM5xqAXoA0gK
Above is the ERD of the flask webapp i am developing. I am really new to python, flask and databases. So far i have only the listing table setup where i have several scrapers daily enter data into the table.
That side of my projects works as i want. Now i am creating a GUI webapp to visualize the data. Did some testing and have a bootstrap layout working. Now i have to rebuild the database from all the lose parts i have. I want to do this right this time so i dont waste any time forward with bad design.
So this is the setup.
Scraper scrapes specific url from a brance, this brance is a child of a company because some companies have serveral brances.
The scraper puts the new found listings in the listing table, and updates the remove/sold date if it can't find the listing or finds a soldmarker on the listing. The new thing i added is a sperate table for pricechanges so i can track if there are pricechanges and retrieve when.
* Every Listing has a brance and company
* Every company has a brance (even if they only have one) but not every compay has listings (if i don't track their listings but they subscribe to track others(targets))
I have the website login seperate because i like to keep it like this, it would let me add users without whole companies.
Did i choose the right 'intermediate' table for the price changes and for the targets (a companie can track several brances). ?
Also did i use the right crowfood notation? I am studying my ass off for 2 days on database/design and modelling them in sqlalchemy and i has been very hard to grasp it fully.
/r/flask
https://redd.it/7nth1d
https://www.lucidchart.com/invitations/accept/74564e9f-4d85-422f-b217-a4ae4db92c0b
Above is My Lucidchart ERD which you can modify, if you do please make notations.
JPG: https://drive.google.com/open?id=1cN7nyYYlKG1D0HXCAWzSTM5xqAXoA0gK
Above is the ERD of the flask webapp i am developing. I am really new to python, flask and databases. So far i have only the listing table setup where i have several scrapers daily enter data into the table.
That side of my projects works as i want. Now i am creating a GUI webapp to visualize the data. Did some testing and have a bootstrap layout working. Now i have to rebuild the database from all the lose parts i have. I want to do this right this time so i dont waste any time forward with bad design.
So this is the setup.
Scraper scrapes specific url from a brance, this brance is a child of a company because some companies have serveral brances.
The scraper puts the new found listings in the listing table, and updates the remove/sold date if it can't find the listing or finds a soldmarker on the listing. The new thing i added is a sperate table for pricechanges so i can track if there are pricechanges and retrieve when.
* Every Listing has a brance and company
* Every company has a brance (even if they only have one) but not every compay has listings (if i don't track their listings but they subscribe to track others(targets))
I have the website login seperate because i like to keep it like this, it would let me add users without whole companies.
Did i choose the right 'intermediate' table for the price changes and for the targets (a companie can track several brances). ?
Also did i use the right crowfood notation? I am studying my ass off for 2 days on database/design and modelling them in sqlalchemy and i has been very hard to grasp it fully.
/r/flask
https://redd.it/7nth1d
A SQLite Tutorial with Python
http://stackabuse.com/a-sqlite-tutorial-with-python/
/r/Python
https://redd.it/7o2ucx
http://stackabuse.com/a-sqlite-tutorial-with-python/
/r/Python
https://redd.it/7o2ucx
Stack Abuse
A SQLite Tutorial with Python
This tutorial will cover using SQLite in combination with Python's sqlite3 interface. SQLite is a single file relational database bundled with most standard Py...
How to start learning Django?
I have a fair experience in programming in C++ and I also know HTML and a bit of CSS. Any resources from where can I start learning?
/r/djangolearning
https://redd.it/7o92c2
I have a fair experience in programming in C++ and I also know HTML and a bit of CSS. Any resources from where can I start learning?
/r/djangolearning
https://redd.it/7o92c2
reddit
How to start learning Django? • r/djangolearning
I have a fair experience in programming in C++ and I also know HTML and a bit of CSS. Any resources from where can I start learning?
Python framework for data transport, parsing, ETLing
I'm struggling with setting up data ingestion ETL pipelines/processing pipelines/architectures.
I've been playing around with Apache Nifi and like the functionality of the job scheduling, the processors of things like "GetFile", "TailFile", "PutFile" etc. but to me it falls short quickly when you have to do any type of manipulation to the data. For example, if you are reading a CSV file that isn't ideal (e.g. no quote around a string but you know its the last column in each row), you have to write these god awful RegEx to parse the data to send it to the next stage of the pipeline. The same goes for any of the other tools like LogStash/Streamsets etc.
It almost feels like I need something of a "programmable" nifi/libarary/framework. I can tell the framework to simply "go tail these sets of files with X parameters" on this schedule, when it runs I get the context of that information back similar to nifi but I have it available directly in python (can be any just an example) where I can use pandas or some other libraries to manipulate that data as I see fit, do my processing on it, and then call other "nifi like" processors from within python directly to putfile, insert into a database, pass it to a message queue, or some other action.
With something like how I describe, I don't have to worry about writing all of the boilerplate of scheduling, running the job, file I/O. I simply call a process that Tails a file and it send it back to me when it gets something. I do the work on the data and then send it to the next stage. Everything is contained within code and I don't have to worry about "scripts" to handle little silos.
I do not feel that "pandas, odo, and csv "modules are the answer. I feel some combination of all of those tools + some framework of processors, job runners, where you are working within that frameworks context to move and send data around and manipulating it with those tools would be closer to the answer.
Is there any type of framework out there that will do this?
/r/Python
https://redd.it/7obtrz
I'm struggling with setting up data ingestion ETL pipelines/processing pipelines/architectures.
I've been playing around with Apache Nifi and like the functionality of the job scheduling, the processors of things like "GetFile", "TailFile", "PutFile" etc. but to me it falls short quickly when you have to do any type of manipulation to the data. For example, if you are reading a CSV file that isn't ideal (e.g. no quote around a string but you know its the last column in each row), you have to write these god awful RegEx to parse the data to send it to the next stage of the pipeline. The same goes for any of the other tools like LogStash/Streamsets etc.
It almost feels like I need something of a "programmable" nifi/libarary/framework. I can tell the framework to simply "go tail these sets of files with X parameters" on this schedule, when it runs I get the context of that information back similar to nifi but I have it available directly in python (can be any just an example) where I can use pandas or some other libraries to manipulate that data as I see fit, do my processing on it, and then call other "nifi like" processors from within python directly to putfile, insert into a database, pass it to a message queue, or some other action.
With something like how I describe, I don't have to worry about writing all of the boilerplate of scheduling, running the job, file I/O. I simply call a process that Tails a file and it send it back to me when it gets something. I do the work on the data and then send it to the next stage. Everything is contained within code and I don't have to worry about "scripts" to handle little silos.
I do not feel that "pandas, odo, and csv "modules are the answer. I feel some combination of all of those tools + some framework of processors, job runners, where you are working within that frameworks context to move and send data around and manipulating it with those tools would be closer to the answer.
Is there any type of framework out there that will do this?
/r/Python
https://redd.it/7obtrz
reddit
Python framework for data transport, parsing, ETLing • r/Python
I'm struggling with setting up data ingestion ETL pipelines/processing pipelines/architectures. I've been playing around with Apache Nifi and...
Django JET updated to support Django 2+
https://github.com/geex-arts/django-jet
/r/django
https://redd.it/7obj51
https://github.com/geex-arts/django-jet
/r/django
https://redd.it/7obj51
GitHub
GitHub - geex-arts/django-jet: Modern responsive template for the Django admin interface with improved functionality. We are proud…
Modern responsive template for the Django admin interface with improved functionality. We are proud to announce completely new Jet. Please check out Live Demo - geex-arts/django-jet
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...