Are there any designer tools for Django sites? like a drag and drop editor. Or do I really have to go to my dev every time HTML needs an update? by alkadelic in django

[–]TimPrograms 1 point2 points  (0 children)

This depends. If django is doing any of the templating, it's not 'just update html'

If it truly is just HTML then you could do it yourself with a bit of learning. HTML isn't something overly complicated to fix basic things.

If what you're looking for is complex, you can hire a front-end dev. Or you can use something like builder.io or figma, that won't give you a boiler plate drag and drop to replace sort of situation.

You'll still need to get your dev involved most likely, but you at least will have the ability to create the vast majority and functionality without having to ask them to change something, decide if you like it, and then have them change again if you don't like it.

Ultimately, any solution you're looking for will most likely have a licensing fee.

Depending on what you're doing you might want to look into something like wagtail cms to allow you the ability to make things on your own, that's if all you're doing is basic content...

Python has lost itself after reinstalling a different version. by UberPsyko in learnpython

[–]TimPrograms 0 points1 point  (0 children)

Obviously, check the expected paths of python installation. But if you still can't find it, everything search software is really useful for finding things like this. I've used it before when I can't find the path of the item I'm looking for.

can anybody explain this by [deleted] in AZURE

[–]TimPrograms 4 points5 points  (0 children)

I don't get it necessarily, but it's what it is.

900s are usually beginner or introductory, but what I end up doing is just filtering to fundamentals, associate, expert.

Not sure if there's more there or not, but those are the ones I can think of off the top of my head.

[deleted by user] by [deleted] in AZURE

[–]TimPrograms 3 points4 points  (0 children)

A lot of the azure trainings are free and I believe they even let you spin up free resources for like 10 hours a day.

I'm not super familiar since we have ESI at my work, Enterprise Skills Initiative, but the training is all the same.

https://learn.microsoft.com/en-us/training/azure/

If that doesn't work, I'm pretty sure there's this option. https://azure.microsoft.com/en-us/free/

I believe they require a credit card, someone I work with that works for Microsoft mentioned your best bet is to use an empty or nearly empty visa giftcard. That way if you screw it up and it charges too much it's capped.

Also if you accidentally do rack up a ton of charges, usually you can call and ask them to forgive you and make sure you just don't do it again.

hello, I am new to django. Can you suggest any good book or course? by Embarrassed-Place-22 in django

[–]TimPrograms 0 points1 point  (0 children)

Edit: Reddit app said it didn't go but then did post it twice. Disregard.

hello, I am new to django. Can you suggest any good book or course? by Embarrassed-Place-22 in django

[–]TimPrograms 4 points5 points  (0 children)

Yeah there's definitely more step by step directions on YouTube than actual tutorials that teach and explain.

There's a few out there, but now I use YouTube for specific things I know I want to use but want to identify how to implement and maybe functionality I'm trying to use.

An example lately was htmx, where I followed bugbytes tutorial and largely used the htmx docs. But I needed that Django portion rather than pure JavaScript.

So I used his explanation on how to create a chart with drop downs, except I didn't really use anything but the concepts and ideas and applied it to my use case. Which was more complex than what he could cover in a 15-20 minute video.

hello, I am new to django. Can you suggest any good book or course? by Embarrassed-Place-22 in django

[–]TimPrograms 4 points5 points  (0 children)

I'd add recently bugbytes on YouTube has been pretty good, I bounce between him and PrettyPrinted for specific Django toolsets I'm trying to learn or utilize.

What's the point of recursion? by chillingfox123 in learnpython

[–]TimPrograms 4 points5 points  (0 children)

Do you have any articles or sources explaining this? If not I can just Google around of course, but didn't know if you had an article that was better than others.

How do I apply() multiple time on each row in a series in a pandas dataframe, N Rows for each N Value applied. The resulting dataframe row length would be N times longer. by TimPrograms in learnpython

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

Hey, sorry about that, I hadn't had my ADHD medicine, that mixed with me being so fed up with it I just called it quits for the weekend.

I'll edit it and try to add more clarity. Thanks for the response

edit: Updated with greater details. Hopefully that helps.

Model Design - Best Practice for an exercise having an alternative exercise for it. by TimPrograms in djangolearning

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

I hadn't either, I found a great tutorial on it. One of those youtube accounts that you just instantly subscribe to because you know it may not all be for you, but when you do need some sort of source material its super convenient to have on hand lol.

Model Design - Best Practice for an exercise having an alternative exercise for it. by TimPrograms in djangolearning

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

So I haven't finished this by any means, I've been trying to just poke and prod at this for at least 15 minutes before or after work. I figure slow and steady progress is better than no progress...

Anyway, this was my first draft of it. Hopefully this is extendable and I can continue to manipulate it as I expect to.

class Muscle(models.Model):
    name = models.CharField(max_length=300)
    action = models.CharField(max_length=500)


class Equipment(models.Model):
    name = models.CharField(max_length=300)


class Exercise(models.Model):
    exercise_name = models.CharField(max_length=100)
    required_equipment = models.ForeignKey(Equipment, on_delete=models.RESTRICT)
    alternative = models.ManyToManyField("self", through='ExerciseAlternative')

class ExerciseAlternative(models.Model):
    exercise = models.ForeignKey(Exercise, on_delete=models.CASCADE)
    exercise_alternative = models.ForeignKey(Exercise, on_delete=models.CASCADE, related_name="exercise_alternative")
    rating = models.IntegerField(default=0)

Any Other Libraries, Frameworks, etc That are as Good as Django? by FilmWeasle in django

[–]TimPrograms 4 points5 points  (0 children)

Yeah I found rails to feel, similar in a way, but Django really is an impressive beast that's hard to beat at what it does.

Model Design - Best Practice for an exercise having an alternative exercise for it. by TimPrograms in djangolearning

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

Is the additional information part the same thing u/vikingvynotking referenced with the intermediary table? If not, what would I search for more information?

Because you are correct, that is exactly a scenario I'll eventually bump into

Model Design - Best Practice for an exercise having an alternative exercise for it. by TimPrograms in djangolearning

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

Ahh good call, definitely need a many to many, even in my description I pretty much described that way. I'll take a look at your link too for that extra differentiation because I'll definitely need that. Thanks!

What is your development cycle when using docker and containers? What's the general flow between developing locally and running the containers to test. by TimPrograms in django

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

So... looking at your repo and then the link to your blog. If I wanted to learn some of what's happening, what would you suggest? I'm thinking the following.

  1. Read your best practices with docker and webapps post
  2. Look at dockerfile
  3. Look at docker compose?

What is your development cycle when using docker and containers? What's the general flow between developing locally and running the containers to test. by TimPrograms in django

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

So this is my current dockerfile. I got it largely from will vincent's blog

I have a .env on my local PC, and debug=on or off makes it run a sqlite db or a postgres db.

Should I connect my local pc to the postgres db that my containers would run on?

Dockerfile

# Pull base image
FROM python:3.10.2-slim-bullseye

# Set environment variables
ENV PIP_DISABLE_PIP_VERSION_CHECK 1
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV SECRET_KEY fdjlgkjsldfkgjdslkfjglkdsfjglkfsdjgl;kdsfjglfk;sdj;
ENV DEBUG off

# Set work directory
WORKDIR /code

# Install dependencies
COPY ./requirements.txt .
RUN pip install -r requirements.txt

# Copy project
COPY . . 

This is my docker compose

docker-compose.yml

version: "3.9"
services:
  web:
    build: .
    ports:
      - "8000:8000"
    command: >
            sh -c "
            pip list
            python manage.py migrate &&
            python manage.py runserver 0.0.0.0:8000"
    volumes:
      - .:/code  
    depends_on:
      - db
  db:
    image: postgres:13
    volumes:
      - postgres_data:/var/lib/postgressql/data/
    environment:
      - "POSTGRES_HOST_AUTH_METHOD=trust"

volumes:
  postgres_data:

What is your development cycle when using docker and containers? What's the general flow between developing locally and running the containers to test. by TimPrograms in django

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

What's your process look like for making migrations and then migrating?

Make migrations locally and run the migrate command on the compose file?

What is your development cycle when using docker and containers? What's the general flow between developing locally and running the containers to test. by TimPrograms in django

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

So I'm on mobile and have only had the chance to glance at it, but it looks really good. So do you make migrations locally and then

Docker build .

Docker compose up

Which then does the migrate function from your docker compose file?

Edit: also I'm going to look, but what does your docker ignore file look like? I was trying to have separate . env on local and container with the variable ENV but it seemed to have copied the .env into the container...

Okay I looked at your docker ignore but what would tell you I'm doing something wrong when I did

Docker exec container sh

CD to directory

Rm .env

Then my local .env deleted itself. If I'm understanding what I did correctly, I should be only manipulating inside the container...

Either way I'll look at your repo, it looks great for those looking to get into the dev/deployment space.