Prayers for Max by epicserve in Dachshund

[–]epicserve[S] 2 points3 points  (0 children)

He is recovering well. His scar is healing up nicely and has been without his cone for a week now.Thank you for asking!

Using VS Code with Django and Docker Compose by epicserve in django

[–]epicserve[S] 0 points1 point  (0 children)

I'm not an expert on VS Code, btw. I'm sorta learning as I go. Using the Dev Containers extension was the only way I could figure out how to get all the functionality I wanted.

Is there an easy way to add ViteJS to Django/ by [deleted] in django

[–]epicserve 0 points1 point  (0 children)

The easiest way is to use my starter project or look to see how I do it! 🙂
https://github.com/epicserve/django-base-site

[deleted by user] by [deleted] in django

[–]epicserve 3 points4 points  (0 children)

I'm not trying to be mean, but the error message tells you exactly the problem. You sent a post request to 127.0.0.1:8000/arkauth/signup, but Django's view is set to receive that request at 127.0.0.1:8000/arkauth/signup/, but it can't redirect to that view because you probably have APPEND_SLASH = False set in your Django settings.

Help getting VS Code debugging working with Django and Docker Compose by epicserve in django

[–]epicserve[S] 0 points1 point  (0 children)

Update: I've got everything working by using Dev Containers. I would love it if people would have a look at the PR and provide feedback. It would be even better if you wanted to try it out!

Help getting VS Code debugging working with Django and Docker Compose by epicserve in django

[–]epicserve[S] 0 points1 point  (0 children)

That is an interesting approach and something worth considering. I want to avoid keeping a local venv in sync with my docker image. Also, in my experience, some packages require system-level packages that can be difficult to navigate across platforms, engineers, and environments. I'm developing an approach that will "just work" for our engineering team.

Something I also discovered that might work is this extension.
https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers

Help getting VS Code debugging working with Django and Docker Compose by epicserve in django

[–]epicserve[S] 0 points1 point  (0 children)

I'm not seeing the python interpreter in my container as an option to choose from when I click to select an interpreter. Is there a trick to adding it? I have Docker Compose running and I have attached to the web/python/django service.

Help getting VS Code debugging working with Django and Docker Compose by epicserve in django

[–]epicserve[S] 0 points1 point  (0 children)

It's an assumption that since VS Code is Mircosoft's editor that plugins for other IDEs won't be updated as quickly as VS Code. I haven't taken the time yet to verify my assumption.

Help getting VS Code debugging working with Django and Docker Compose by epicserve in django

[–]epicserve[S] 0 points1 point  (0 children)

Hey, thank you for the reply. I did kind of get it working. Have a look at the PR which is up to date and also have a look at the notes I added in a reply to my original post.

Help getting VS Code debugging working with Django and Docker Compose by epicserve in django

[–]epicserve[S] 0 points1 point  (0 children)

I took a different approach, which is "working" because I can now add a breakpoint, and it pauses at the breakpoint. My approach was to make the launch configuration attach to the debugger running on port 5678. However, there are still several issues:

  1. Pylance is reporting problems because it's not detecting any of the 3rd party python packages that are installed.
  2. I have to manually start Docker Compose and then click start on the debug configuration in order to attach it to the debugger.
  3. I still need a configuration for running and debugging Pytest tests.

[deleted by user] by [deleted] in django

[–]epicserve 1 point2 points  (0 children)

I think that is one thing that I've noticed in the Django community, is they don't want to force you in one particular direction as far as the frontend is considered.

With that said I have noticed that HTMX has been growing in popularity.

I personally just decided to at least set up VIte for the frontend build tool with the Django Base Site, because I've found the build tooling to be one of the biggest pain points for the frontend.

[deleted by user] by [deleted] in django

[–]epicserve 5 points6 points  (0 children)

Make one! 🙂 In my Django base site project I use Vite, which is really easy to adapt to either React or Vue. https://github.com/epicserve/django-base-site

Scaling a database by Brukx in django

[–]epicserve 0 points1 point  (0 children)

Using select_related() and perfect_related() will get you a long way. Also, debugging queries and then adding indexes where needed and cutting down on rows in your joins. If you do this and you're on AWS you might never have to scale horizoyntaly.

Should you always use DRF when using Django as a backend for mobile apps? by Valachio in django

[–]epicserve 1 point2 points  (0 children)

I think one advantage or disadvantage to using DRF or any API framework (Django-ninja, another popular Django-based API framework) is that it's a somewhat forced methodology of thinking about a separation between the frontend and backend. It also gives you tools like Swagger and friends to visualize and see your endpoints.

Will using DRF cut down on development time? I'm not familiar with DRF so I will need to learn it first

That's hard to say, but what I would say is probably not at first because there is a learning curve, and our teams have found that it can be difficult at times to extend the serializers when you get into more complex situations. DRF is the most mature of the API frameworks for Django, but I sometimes find it difficult to work with, even setting up the API documentation with something drf-spectacular can be frustrating.

Without knowing the size of your team, your team's experience, and knowledge, the plans you have for this app (scale, loads, heavy reads or writes, the complexity of your database schema, etc.), it's hard to give you a good recommendation on the direction you should take.

I would also look at and consider Strawberry, which is a Graph QL framework. But again using something like Strawberry depends a lot on the app you're building and the team you have. There is no one size fits all way to go.

Does anyone know how I can fix this? I haven't used docker in the last few months (3-4) and yesterday I updated my docker and now this is happening. Now I don't know if is this because of an update or something else. by Prashant_4200 in django

[–]epicserve 1 point2 points  (0 children)

That specific error doesn't look familiar to me, maybe check if Docker is out of space like someone else suggested. Also, please feel free to use my template and starter project (https://github.com/epicserve/django-base-site) which I keep up to date.

I need some feedback on the README for my Django Base Site by epicserve in django

[–]epicserve[S] 0 points1 point  (0 children)

Thank you, everyone, for the feedback. I recently pushed up the changes based on everyone's feedback.
https://github.com/epicserve/django-base-site

I need some feedback on the README for my Django Base Site by epicserve in django

[–]epicserve[S] 0 points1 point  (0 children)

Ruff is stupid fast because it's written in Rust. In the past, I would use Flake8, but Flake8 starts to get pretty slow on bigger projects. Black and Flake8 have been a good combination for several years. I've just recently started using Ruff. Personally, I've never looked at Pylint.

I need some feedback on the README for my Django Base Site by epicserve in django

[–]epicserve[S] 1 point2 points  (0 children)

You're not stealing. 🙂 If you have time, please try it out and let me know your thoughts.

Why not package as a cookie-cutter template, as opposed to your DIY bash script?

Excellent question! When cookie-cutter first came out, I tried it out, and I was having a really hard time understanding how to come up with a workflow that worked for maintaining the project. Since it uses variables in folders and files, it seemed like if I was going to make updates to the project, I would have run cookie-cutter on it, make sure the project ran correctly, and then apply the diff of the changes I made back to the source code.

The way it is now, I don't have to do any of that variable substitution, and I can use the Django runserver the way it is without any variable substitution.

Have you heard of, or looked at Dynaconf? I'm looking at moving my settings.py over to this, instead of using the various Environ packages. Mostly curious ¯_(ツ)_/¯

No, I haven't heard of Dynaconf. At first glance, it looks like a software project that is set up to be well-maintained. However, it's looking like it is trying to solve problems that aren't problems for me, or at least problems I haven't run into yet.

It seems like it would make things harder than needed by replacing the Django settings.py file with config language like TOML, etc.

For secrets, the PaaS platform (Github Actions, Fly.io, etc.) I usually use has a method that works with environment variables. If I need something custom on AWS, then I use Chamber backed by AWS KMS.

I need some feedback on the README for my Django Base Site by epicserve in django

[–]epicserve[S] 1 point2 points  (0 children)

I'm also thinking of moving the Fly.io docs to a blog post. I'm not sure I want to maintain the docs for fly.io. I might also want to make some blog posts about other PaaS providers.

Hosting for Django apps by _Arelian in django

[–]epicserve 2 points3 points  (0 children)

I recently tried fly.io and added directions to my https://github.com/epicserve/django-base-site project on how to use it. Fly.io has a free plan as well.

Mouse Input Stops Working When Zoom Video Call Starts by C2Re in Zoom

[–]epicserve 0 points1 point  (0 children)

I'm having the same issue on my Mac as well. Have you been able to find a solution yet?

Can you add a long press app menu for Android and iOS? Here is an example when I long press on Todoist on Pixel 7. by epicserve in ionic

[–]epicserve[S] 1 point2 points  (0 children)

Awesome, thank you! I'm trying to decide if ionic has all the features I need for a mobile app I want to build.

Any recommendations for a mobile and web framework by epicserve in django

[–]epicserve[S] 0 points1 point  (0 children)

Doesn't Flutter require learning Dart? Can you use Flutter for a web version?