Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
My first python project after one udemy course. This app lets you download or listen to music from command line itself. It scrapes data from YouTube. I have also added a silly, random star visualizer when music is playing. Any suggestions are welcome I am just a beginner.

/r/Python
https://redd.it/gquxlw
Got any questions about Django and JavaScript I can answer for you?

Hi /r/django/!

I'm working on a new article for my "building a SaaS with Django" series.

My goal is to create the best resource I can on how to work with Django and JavaScript together.

I'd love to hear from you what questions you have or what problems you've run into on this topic.

I'll do my best to answer in this thread, and will also use the questions I get to help inform topics I should cover in more depth in the article. :)

/r/django
https://redd.it/gqvskw
Prerequisites for Flask

I've been learning and working with Python for a couple of months now and want to branch out into web development using Python and Flask (because it's easier than Django). I've started to dive into the basics of HTML and CSS. What are other prerequisites for learning Flask?

/r/flask
https://redd.it/gqs47a
Learn SQL before sql alchemy?

I’m learning flask but I struggle with some concepts of sql alchemy. As a beginner, would you recommend learning SQL before?

/r/flask
https://redd.it/gqxixz
My first flask app - an expense and budgeting tool - Tendie Tracker.

Hi all,

I spent almost 3 months working on a replacement for my expense/budgeting Excel file and yesterday I went live with it! It's called Tendie Tracker and is hosted on heroku. I wanted to polish it up and have it 'portfolio worthy' so I also made a domain and used Webflow and some other tools to give it a professional polish.

* Landing page: https://www.tendietracker.com/

* Heroku app: https://tendie-tracker.herokuapp.com/register

* Repo: https://github.com/eddyharrington/Tendie-Tracker

Let me know what you think. I'd especially appreciate eyes on my code or repo structure. Or even suggestions on what kind of things I should learn next for Flask. I'm eyeing the mega flask tutorial and Harvard's web dev course that transitions from Flask to Django.

Thanks in advance.

/r/flask
https://redd.it/gr0h5u
What's everyone working on this week?

Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share.

/r/Python
https://redd.it/gqxr8i
How to start Jupyter Notebook again after Ctrl + C?

Hi,

I'm new to learning Python and just got Jupyter on my Mac. I read that the way to exit out of Jupyter (really slows down my computer!) is to do "Ctrl + C". However, how do I start Jupyter again? Typing "jupyter notebook" in terminal doesn't seem to work anymore. I have to terminate terminal, open that up again, and then type "jupyter notebook". I'm using Python 3.8.3 btw.

Also, any thoughts on the Python courses on Lynda? My school

Thanks!

/r/IPython
https://redd.it/gr61zj
REST framework

could somebody explain in simple terms what the django REST framework is, and examples of what types of projects should use it, and which ones do not need it.

/r/django
https://redd.it/grbnp1
Order of steps taken while building a Django site

If you were building a small, basic social media website, similar to Facebook but stripped down a whole lot, how would you approach the project?

Assume that the models/tables are already laid out on paper and you have mockups for each html page.

In what order do you create/build/work on the following items?

* views
* urls
* models
* html templates/pages (and forms - although maybe those are separate)
* user authentication
* password change/reset
* creating various app folders
* admin panel and superuser
* static files
* polish up and complete any fancy css that you may want

I'm trying to come with a general set of steps, or a recipe if you will, to follow.

/r/django
https://redd.it/grbvgj
Any Django Admin themes?

Other than the only one I can find (Django Suit), is there a place where I can find other Django Admin themes?

/r/django
https://redd.it/graz88
This media is not supported in your browser
VIEW IN TELEGRAM
Kroger CLI, automation utility to save on shopping, earn points, get purchases summary and more

/r/Python
https://redd.it/gr4jjn
Flask Form To SQL Server - 400 Bad Request

Hi everyone,

In my current project I have a Flask form I'm trying to send to a SQL server.

I am successfully pulling data from the SQL server (using pyodbc ) for employee data but it's a form for adding employees that's causing me a headache.

`@app.route('/add-employee', methods=['POST'])`

`def add_employee():`

`if request.method == "POST":`

`employee_id = request.form['employee_id']`

`first_name = request.form['first_name'],`

`surname = request.form['surname'],`

`location = request.form['location'],`

`reports_to = request.form['reports_to'],`

`business_unit = request.form['business_unit'],`

`address_1 = request.form['address_1'],`

`address_2 = request.form['address_2'],`

`address_3 = request.form['address_3'],`

`eircode = request.form['eircode'],`

`mobile_number = request.form['mobile_number'],`

`alt_email_address = request.form['alt_email_address'],`

`pps_number = request.form['pps_number']`

`insert_query = '''INSERT INTO hr_employee_data (employee_id, first_name, surname, address_1, address_2, address_3, eircode, mobile_number, employment_status, gender, start_date, birth_date, pps_number , holiday_allowance, service_days, alt_email_address, emergency_contact, emergency_number, working_day_hours, working_days, job_title, location, reports_to, business_unit, part_orfulltime, handbook_received , induction_form, prob_expiry, prob_completed, salary, salary_changedate, pension, healthcare, bonus_scheme, company_vehicle, vehicle_details, vehicle_issuedate, other_assets, asset_details , asset_issuedate, profile_url, username, password) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);'''`

`cursor = cnxn.cursor()`

`cursor.execute(insert_query, (first_name, surname, location, reports_to, business_unit, address_1 , address_2, address_3, eircode, mobile_number, alt_email_address, pps_number))`

`cnxn.commit()`

`return redirect (url_for('hr_homepage'))`

`return render_template("add-employee.html")`

I am aiming to have two pages for the forms so I have tried changing the insert\_query to only the fields I need for this page but when I submit, it still gives me the 400 Bad

/r/flask
https://redd.it/grgw26
Convincing a (dinosaur) organization to adopt Flask?

Has anyone had any experience introducing such technologies into their organization? I've been amazed by what web applications (i.e. Flask) can do in terms of customisability and dB management, and want to share it with my company.

However, they have the usual concerns of security and all.

While there is login functionality present, what else can I use to market the security of the entire application?b

/r/flask
https://redd.it/grigm3
Digital Ocean hosting

Hi

Does Digital Ocean shared droplet comes with database if yes what type?

I would like to host my flask app.

/r/flask
https://redd.it/grod2w
Circle Evolution v0.1 is now available on PyPI. My first big project as a 16 year old. [Github repo & desc in comments]

/r/Python
https://redd.it/grglgp
Everybody knows that instagram is made with django but why can we not see all that input tags in the page source of their sign up page if I assume that they use django forms. Also we cannot see any hard-coded text on the website like that "Instagram" header or "sign up to see photos videos...".



/r/djangolearning
https://redd.it/grnkyn
Why is the documentation so hard to navigate?

Like seriously. It's a complete mess.

There should be a sidebar with each concept neatly organized. For example, check out the \[Bootstrap Documentation\]([https://getbootstrap.com/docs/4.5/getting-started/introduction/](https://getbootstrap.com/docs/4.5/getting-started/introduction/))

Nice, neatly organized sidebar. It's simple, minimal and easy to find stuff.

But Django decides to be unique by not having a sidebar and instead scattering links everywhere. If you don't think it's bad, go to [https://docs.djangoproject.com/en/3.0/](https://docs.djangoproject.com/en/3.0/) and find the neat, organized section on how to use Django with postgresql. Because I couldn't find it and had to watch a YouTube tutorial instead. It should not suck this bad.

Don't get me wrong. Django is a beautiful, well-made web framework. I just think its documentation should be organized better.

/r/django
https://redd.it/grwatk
startproject with a period, or no period?

See below image. Do you use folder structure A, or folder structure B, and why?

[https://imgur.com/a/Vx3q82t](https://imgur.com/a/Vx3q82t)

​

**Source of image:**

Django for Beginners: Build websites with Python and Django by Vincent, William S.

/r/django
https://redd.it/grw144