#python Django
Explore tagged Tumblr posts
studio45creation · 1 year ago
Text
Tumblr media
Python Frameworks
Studio45Creations presents a powerful Python framework, seamlessly blending functionality and simplicity. Elevate your development experience with our innovative framework, designed for efficiency and ease of use. Unleash the full potential of Python with Studio45Creations.
0 notes
webmethodology · 2 years ago
Text
Learn to build a Python Django web application with a powerful search feature. A Step-by-step guide for creating a dynamic, searchable application.
0 notes
heart-ghost-studyblr · 8 months ago
Text
Tumblr media
This one has an interesting story. It was in a place where we shared files through a shared data server locally (localhost only), so there was no network access to use the famous "I love PDF" or software like Adobe to convert and make some changes.
With that in mind, I used the PyPDF library to make a code that changes like converting, splitting, merging, and set it up on the server for people to use. Everyone loved both how the program worked and the crazy aesthetic that I made it and my boss approved. Well, problem solved! And fun too, I must say. And since this is a Studyblr, I have to mention how worthwhile it is to study a library you've never seen before but that seems to do everything you need at that moment. Putting a small project into practice, seeing how people react to it, then studying and improving it in a way that reflects your own growth. That was made with Django Web Framework.
11 notes · View notes
serverbill · 22 days ago
Text
VS Codeで仮想環境が効かない!?Django開発環境構築でハマったエラーの全記録
この記事は、Windows環境でPythonとDjangoを使って開発を始めた際、Visual Studio Code(VS Code)上で仮想環境の設定に関して発生した複数のトラブルについて記録したものです。仮想環境を有効にしたはずなのにPythonが見つからない、Djangoサーバが起動しない、ライブラリが入っていない、など……。その一つ一つが地味に時間を削るものばかりで、この記事が誰かの参考になればと思って残しておきます。
PowerShellで仮想環境に入れない
最初のつまずきは「仮想環境のアクティベート」でした。私は PowerShell を使って以下のコマンドを実行しました。
venv\Scripts\activate
すると、以下のようなメッセージが返ってきました:
モジュール 'venv' を読み込むことができませんでした。
これは PowerShell では activate ではなく、Activate.ps1 を使う必要があるためです。
.\venv\Scripts\Activate.ps1
この修正で無事仮想環境に入ることができましたが、これはまだ始まりに過ぎませんでした。
仮想環境に入ったのにPythonが使えない
仮想環境に入った状態で Django の開発サーバーを起動しようとしました:
python manage.py runserver
しかし、なんと返ってきたエラーはこれ:
No Python at '"/usr/bin\python.exe'
WindowsでなぜUnix風のパス?しかも usr/bin の後に python.exe が混ざっているという奇妙な状態でした。
実はこれ、仮想環境が正しくアクティベートされているように見えて、VS Code が別の仮想環境(C:\Python\.venv)を参照していたことが原因でした。プロジェクト直下の .venv を使いたいのに、VS Code の設定が上位のグローバル仮想環境を見に行っていたのです。
where python が効かない
仮想環境内で where python を実行しても何も返ってきませんでした。そこで外部の cmd.exe を使って同じコマンドを打つと、次のように表示されました:
C:\Python\WonderPasNavi\.venv\Scripts\python.exe C:\Users\user\AppData\Local\Programs\Python\Python39-32\python.exe
この結果から、PowerShell 内での仮想環境のパスが正常に反映されていないことが分かりました。��うやら VS Code の PowerShell ターミナルでは環境変数 PATH の更新がうまく行われていなかったようです。
見えない .vscode と仮想環境指定
VS Code の仮想環境設定は通常、プロジェクト直下の .vscode/settings.json に保存されます。しかしこのフォルダが作成されていなければ、VS Code がどの Python を使うべきか迷ってしまいます。今回は .vscode フォルダが存在しておらず、設定ファイルもない状態でした。結果、Python拡張機能が以前の仮想環境を優先してしまっていたわけです。
Djangoサーバは起動したが…
仮想環境を再度正しくアクティベートして、python manage.py runserver を実行。すると、今度は次のエラーが表示されました:
ModuleNotFoundError: No module named 'django_bootstrap5'
そうです、ライブラリが入ってなかったんです。プロジェクトの settings.py に 'django_bootstrap5' が記述されているにも関わらず、依存パッケージが仮想環境にインストールされていませんでした。
対処法は単純です。
pip install django-bootstrap5
これでエラーは解消され、ついにサーバが起動しました。ここまでくるのに何時間かかったことか……。
まとめ:「この苦労を…」
VS Code + Python + Django の仮想環境構築は、一見簡単そうに見えて、罠が多いです。
仮想環境の activate の方法は PowerShell / CMD で異なる
VS Code の Python拡張は過去の設定を引きずることがある
ターミナルごとに仮想環境の有効化状態が違う可能性がある
仮想環境の python.exe が本当に使われているか確認するには where python が超重要
この苦労を、未来の自分や他の誰かが繰り返さないように、この記事を残します。
「仮想環境、ちゃんと動いてる?」って思ったら、まずは where python で確認しよう。
タグ: #Python #Django #VSCode #仮想環境 #トラブルシューティング #初心者向け
2 notes · View notes
izicodes · 2 years ago
Text
Django #4
Friday 2nd June 2023
I did it! I made a fake user! I signed up using my signup.html and it went through successfully! Then I logged in and it went through successfully again! So then I thought "Well obviously they want to be able to log out again" so I took time learning to do that and there are a bunch of steps to do but I know once I do it 3 or 4 times, I will know how to do it more quickly!
So, what did I learn today: ☑ How to create a user data table - made myself and a test user one ☑ How to create new users ☑ How to use the if-else statement - used it for the navbar, so that if the user is logged in, they will see their username in the nav ☑ Figured out how to log out a user ☑ How models work ☑ How to prevent a user from entering a URL within the app they're not supposed ☑ Super users. I figured out I created a super user and it's me.
What I'm going to do now is to go back and make as many notes as I can so I don't forget the process for certain parts, especially creating and managing users.
Tumblr media
This is so exciting to me because now all of the project ideas I wanted to try out but couldn't because I didn't know know how to create and manage users and save data that way.
I'm literally so happy! 😌🙌🏾💗
76 notes · View notes
chuksachi · 2 months ago
Text
Coding in Python feels like creating something out of thin air. It’s simple, yet powerful—turning messy ideas into something real with just a few lines. There’s a kind of joy in seeing a script run smoothly, like solving a puzzle and watching all the pieces fit.
Some days, it’s frustrating. The bugs, the errors, the moments when nothing makes sense. But then, there’s that moment when it clicks, and suddenly, you feel unstoppable. Like you can build anything, automate anything, bring any idea to life.
That’s what I love about coding. It makes the impossible feel possible.
3 notes · View notes
robomad · 11 months ago
Text
Deploying Django Applications to Heroku
Learn how to deploy your Django applications to Heroku with this comprehensive guide. Follow step-by-step instructions to set up, configure, and deploy your app seamlessly.
Introduction Deploying Django applications to Heroku is a streamlined process thanks to Heroku’s powerful platform-as-a-service (PaaS) offerings. Heroku abstracts away much of the infrastructure management, allowing developers to focus on building and deploying their applications. This guide will walk you through the steps to deploy a Django application to Heroku, including setting up the…
Tumblr media
View On WordPress
5 notes · View notes
coderacha · 2 years ago
Text
Tumblr media Tumblr media Tumblr media
2023.09.25
project updates 🐸
i keep forgetting to post here. i recently had a lot of progress in a project ^^ this is a PWA and we're using python django (and it's required that we should integrate an AI feature too TT) i think i'm 75% done with the front-end but overall we're probably only 15%,,, i'm gonna try finishing my part this week so i could help with other tasks!
there's only three weeks left before the deadline </3 hope it all wrks out
9 notes · View notes
stiitch · 2 years ago
Text
LiftMore Update 9.04.2023
I was posting updates on my Medium (see the pinned post), but lately I haven't had time to make a thorough post. Instead, I want to update on a few things in a more informal post here.
API Updates
Tumblr media
Finally went through and added all of the endpoints I'll need. There are a few endpoints on this list that I'm still in the process of refining permissions and making more secure.
Unit Testing ...ayup.. I came this far into the project without writing a single unit test. I really do want to strive for best TDD practices, but when there's no code at all in my application, it feels really unsatisfying to start working on tests before my code is capable of doing anything. Moving forward in the project, I will definitely strive to do TDD well.
Security Currently, the API just processes users via Basic Authentication. In this upcoming week, I'm planning on creating an identity server and using that server to issue my own OAuth2.0 tokens. I'm not sure yet how I want to set up my IDP service and OIDC Identity Providers.
Deployments Before moving onto the Front-End for this project, I want to make sure that my app is as secure and robust as possible. For this, I want to create 3 different environments (Development, Test, and Production), use a secret manager to inject secrets into the application, and have all of my deployments automated with GitHub Actions. In addition to all this, I want to make sure my application is set up properly between GitHub Actions and AWS so that I can manage dashboards and collect usage/cost information before having any users.
Finally, I'm happy to say that I've acquired the domain name "liftmore.app". After I get through some of the things I mentioned here, I'll push out a landing page and more information of LiftMore from a user perspective in case anybody wants to use it :)
Lastly, little brief preview of my Project board in GitHub at the moment.
Tumblr media
8 notes · View notes
jukain4216 · 1 year ago
Text
If anyone here has experience with django testing can I get some help please I quite literally have never written tests for my code (yes I like to live dangerously)
5 notes · View notes
studio45creation · 2 years ago
Photo
Tumblr media
Supercharge your business with cutting-edge React.JS solutions from San Francisco. Boost performance, enhance user experience, and stay ahead of the competition. Our expert team harnesses the power of this dynamic JavaScript library to deliver high-performance, user-friendly web applications. With our tailored solutions. Empower your digital journey today and unlock limitless possibilities for success.
0 notes
pythonfan-blog · 2 years ago
Text
5 notes · View notes
pythondjangoflask · 2 years ago
Text
remove specific element in python list - remove index based element
3 notes · View notes
izicodes · 2 years ago
Text
Continuing Django #2
Tumblr media
Continued from the last post
I figured out how to add CSS and JavaScript to my pages, and what a hassle! Took me forever to figure it out! Because files like .css, .js and even image files are classed as 'static' files, they have to be in a special folder in my app folder called 'static' for Django to recognise the files. Then I have to add the tag {% load static %} at the top of the HTML page so it can use any static files in the folder. Then the actual link tag for the stylesheet looks like this now: ' link rel="stylesheet" href="{% static 'style.css' %}" '. It looks easy now but I was struggling to figure this out, even after reading the documentation, it finally got it after trial and error 😅
With that being said, I will now be keeping track of all the information I learn from the video and by myself as I continue because I will forget that easily 😌🙌🏾
Tumblr media Tumblr media
26 notes · View notes
raaraaraariya · 2 years ago
Text
Does posting this make me look smart?😏
Tumblr media
Yes
The answer's yes
2 notes · View notes
pixiedust111 · 2 years ago
Text
Tumblr media Tumblr media
It's been a real fun! I'm hoping to work on the front end next and make it available for everyone 😁!
3 notes · View notes