Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BACKEND: Python Django, REST and DB #4

Merged
merged 9 commits into from
Aug 15, 2024
Merged

Conversation

avinogrado
Copy link
Collaborator

CRUD for a project in progress

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add pycache to gitignore

# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-dtk7$@ho6ty&4g-fe!ig^c81z27nkd@#r#^^e5jd++868gf_jh'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put it to the .env and import here from os.getenv

Comment on lines 88 to 93
# DATABASES = {
# "default": {
# "ENGINE": "django.db.backends.sqlite3",
# "NAME": "mydatabase",
# }
# }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove it

admin.site.register(Report)

admin.site.register(Stages)
admin.site.register(Employee)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add an empty line at the end of the file

admin.site.register(Project)
admin.site.register(Report)

admin.site.register(Stages)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to name it Objective

def __str__(self):
return self.project_name

class Stages(models.Model):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Objective

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this file

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this file

urlpatterns = [
path("", views.index, name="index"),
path("<int:project_id>", views.details, name="details")
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an empty line at the end of the file

Comment on lines 16 to 21
def details(request, project_id):
try:
projects = Project.objects.get(pk=project_id)
except Project.DoesNotExist:
raise Http404("Project does not exist")
return render(request, "detail.html", {"projects": projects})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need no to have CRUD at views
return at the end just projects, need not to render

@the-homeless-god the-homeless-god changed the title feature: necessary entities, Postgre connected to project, admin panel BACKEND: Python Django, REST and DB Aug 15, 2024
@the-homeless-god
Copy link
Member

LGTM 🚀

@the-homeless-god the-homeless-god merged commit 66f57d0 into master Aug 15, 2024
3 checks passed
@the-homeless-god the-homeless-god deleted the backend_python branch August 15, 2024 20:52
github-actions bot pushed a commit that referenced this pull request Aug 15, 2024
# 1.0.0 (2024-08-15)

### Features

* **backend:** Python Django, REST and DB ([#4](#4)) ([66f57d0](66f57d0))
* **frontend, ci:** add configurations ([d78557d](d78557d))
* **frontend:** add an application ([38ce889](38ce889))
* **frontend:** create web folder with use react ts vite ([3dc5495](3dc5495))
Copy link

🎉 This issue has been resolved in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants