[null, 0, null, null, -2147483648, -2147483648]
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..105ce2d
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..d1e22ec
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..e34ded4
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/__pycache__/manage.cpython-38.pyc b/__pycache__/manage.cpython-38.pyc
new file mode 100644
index 0000000..c012b7e
Binary files /dev/null and b/__pycache__/manage.cpython-38.pyc differ
diff --git a/accounts/__pycache__/__init__.cpython-38.pyc b/accounts/__pycache__/__init__.cpython-38.pyc
index a7ddb6c..92caa73 100644
Binary files a/accounts/__pycache__/__init__.cpython-38.pyc and b/accounts/__pycache__/__init__.cpython-38.pyc differ
diff --git a/accounts/__pycache__/admin.cpython-38.pyc b/accounts/__pycache__/admin.cpython-38.pyc
index ab66bcd..4d75062 100644
Binary files a/accounts/__pycache__/admin.cpython-38.pyc and b/accounts/__pycache__/admin.cpython-38.pyc differ
diff --git a/accounts/__pycache__/models.cpython-38.pyc b/accounts/__pycache__/models.cpython-38.pyc
index 52a3209..55187cf 100644
Binary files a/accounts/__pycache__/models.cpython-38.pyc and b/accounts/__pycache__/models.cpython-38.pyc differ
diff --git a/accounts/__pycache__/urls.cpython-38.pyc b/accounts/__pycache__/urls.cpython-38.pyc
index e4f3102..cdf5b94 100644
Binary files a/accounts/__pycache__/urls.cpython-38.pyc and b/accounts/__pycache__/urls.cpython-38.pyc differ
diff --git a/accounts/__pycache__/views.cpython-38.pyc b/accounts/__pycache__/views.cpython-38.pyc
index d2f46f6..82865dc 100644
Binary files a/accounts/__pycache__/views.cpython-38.pyc and b/accounts/__pycache__/views.cpython-38.pyc differ
diff --git a/accounts/migrations/__pycache__/__init__.cpython-38.pyc b/accounts/migrations/__pycache__/__init__.cpython-38.pyc
index 3788812..f268e2d 100644
Binary files a/accounts/migrations/__pycache__/__init__.cpython-38.pyc and b/accounts/migrations/__pycache__/__init__.cpython-38.pyc differ
diff --git a/backend/__pycache__/__init__.cpython-38.pyc b/backend/__pycache__/__init__.cpython-38.pyc
index 799f770..dd93a2f 100644
Binary files a/backend/__pycache__/__init__.cpython-38.pyc and b/backend/__pycache__/__init__.cpython-38.pyc differ
diff --git a/backend/__pycache__/settings.cpython-38.pyc b/backend/__pycache__/settings.cpython-38.pyc
index 6e36f40..eb7fa71 100644
Binary files a/backend/__pycache__/settings.cpython-38.pyc and b/backend/__pycache__/settings.cpython-38.pyc differ
diff --git a/backend/__pycache__/urls.cpython-38.pyc b/backend/__pycache__/urls.cpython-38.pyc
index ca37945..f2d98d3 100644
Binary files a/backend/__pycache__/urls.cpython-38.pyc and b/backend/__pycache__/urls.cpython-38.pyc differ
diff --git a/backend/__pycache__/wsgi.cpython-38.pyc b/backend/__pycache__/wsgi.cpython-38.pyc
index 50b2ac9..4cb5275 100644
Binary files a/backend/__pycache__/wsgi.cpython-38.pyc and b/backend/__pycache__/wsgi.cpython-38.pyc differ
diff --git a/backend/settings.py b/backend/settings.py
index 52c081f..e893bb8 100644
--- a/backend/settings.py
+++ b/backend/settings.py
@@ -50,6 +50,7 @@
'allauth.account',
#apps
"accounts",
+ 'newjob',
]
SITE_ID = 1
@@ -167,4 +168,8 @@
# https://docs.djangoproject.com/en/3.1/howto/static-files/
STATIC_URL = '/static/'
-LOGOUT_REDIRECT_URL = 'login'
\ No newline at end of file
+STATICFILES_DIRS = [
+ BASE_DIR / "static",
+]
+
+LOGOUT_REDIRECT_URL = 'login'
diff --git a/backend/urls.py b/backend/urls.py
index 501f581..00372d4 100644
--- a/backend/urls.py
+++ b/backend/urls.py
@@ -5,5 +5,6 @@
urlpatterns = [
path('admin/', admin.site.urls),
path('accounts/', include('accounts.urls')),
- path("api/", include('accounts.urls'))
+ path("api/", include('accounts.urls')),
+ path('newjob/',include('newjob.urls'))
]
diff --git a/manage.py b/manage.py
index eb6431e..18fd19d 100755
--- a/manage.py
+++ b/manage.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+
"""Django's command-line utility for administrative tasks."""
import os
import sys
diff --git a/newjob/__init__.py b/newjob/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/newjob/__pycache__/__init__.cpython-38.pyc b/newjob/__pycache__/__init__.cpython-38.pyc
new file mode 100644
index 0000000..1c27418
Binary files /dev/null and b/newjob/__pycache__/__init__.cpython-38.pyc differ
diff --git a/newjob/__pycache__/admin.cpython-38.pyc b/newjob/__pycache__/admin.cpython-38.pyc
new file mode 100644
index 0000000..003fd44
Binary files /dev/null and b/newjob/__pycache__/admin.cpython-38.pyc differ
diff --git a/newjob/__pycache__/forms.cpython-38.pyc b/newjob/__pycache__/forms.cpython-38.pyc
new file mode 100644
index 0000000..f4494d0
Binary files /dev/null and b/newjob/__pycache__/forms.cpython-38.pyc differ
diff --git a/newjob/__pycache__/models.cpython-38.pyc b/newjob/__pycache__/models.cpython-38.pyc
new file mode 100644
index 0000000..e706f29
Binary files /dev/null and b/newjob/__pycache__/models.cpython-38.pyc differ
diff --git a/newjob/__pycache__/urls.cpython-38.pyc b/newjob/__pycache__/urls.cpython-38.pyc
new file mode 100644
index 0000000..6065f95
Binary files /dev/null and b/newjob/__pycache__/urls.cpython-38.pyc differ
diff --git a/newjob/__pycache__/views.cpython-38.pyc b/newjob/__pycache__/views.cpython-38.pyc
new file mode 100644
index 0000000..bb2665e
Binary files /dev/null and b/newjob/__pycache__/views.cpython-38.pyc differ
diff --git a/newjob/admin.py b/newjob/admin.py
new file mode 100644
index 0000000..8c38f3f
--- /dev/null
+++ b/newjob/admin.py
@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.
diff --git a/newjob/apps.py b/newjob/apps.py
new file mode 100644
index 0000000..f0a7252
--- /dev/null
+++ b/newjob/apps.py
@@ -0,0 +1,5 @@
+from django.apps import AppConfig
+
+
+class NewjobConfig(AppConfig):
+ name = 'newjob'
diff --git a/newjob/forms.py b/newjob/forms.py
new file mode 100644
index 0000000..a3c0d0f
--- /dev/null
+++ b/newjob/forms.py
@@ -0,0 +1,9 @@
+
+from django import forms
+from .models import Newjob
+
+class NewjobForm(forms.ModelForm):
+
+ class Meta:
+ model = Newjob
+ fields = ['title', 'type', 'background', 'price', 'image']
\ No newline at end of file
diff --git a/newjob/migrations/0001_initial.py b/newjob/migrations/0001_initial.py
new file mode 100644
index 0000000..5c5d048
--- /dev/null
+++ b/newjob/migrations/0001_initial.py
@@ -0,0 +1,27 @@
+# Generated by Django 3.1.6 on 2021-03-04 06:42
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ initial = True
+
+ dependencies = [
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Newjob',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('title', models.CharField(max_length=100)),
+ ('type', models.CharField(max_length=100)),
+ ('background', models.TextField()),
+ ('price', models.DecimalField(decimal_places=3, max_digits=15)),
+ ('image', models.ImageField(upload_to='static/newjob/images/')),
+ ('created_at', models.DateTimeField(auto_now_add=True)),
+ ('updated_at', models.DateTimeField(auto_now=True)),
+ ],
+ ),
+ ]
diff --git a/newjob/migrations/__init__.py b/newjob/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/newjob/migrations/__pycache__/0001_initial.cpython-38.pyc b/newjob/migrations/__pycache__/0001_initial.cpython-38.pyc
new file mode 100644
index 0000000..767c1ee
Binary files /dev/null and b/newjob/migrations/__pycache__/0001_initial.cpython-38.pyc differ
diff --git a/newjob/migrations/__pycache__/__init__.cpython-38.pyc b/newjob/migrations/__pycache__/__init__.cpython-38.pyc
new file mode 100644
index 0000000..f741983
Binary files /dev/null and b/newjob/migrations/__pycache__/__init__.cpython-38.pyc differ
diff --git a/newjob/models.py b/newjob/models.py
new file mode 100644
index 0000000..fa9eaa4
--- /dev/null
+++ b/newjob/models.py
@@ -0,0 +1,12 @@
+from django.db import models
+
+# Create your models here.
+
+class Newjob(models.Model):
+ title = models.CharField(max_length=100, null=False)
+ type = models.CharField(max_length=100, null=False)
+ background = models.TextField()
+ price = models.DecimalField(max_digits= 15, decimal_places=3, null=False)
+ image = models.ImageField(upload_to='static/newjob/images/')
+ created_at = models.DateTimeField(auto_now_add=True)
+ updated_at = models.DateTimeField(auto_now=True)
\ No newline at end of file
diff --git a/newjob/templates/job/create.html b/newjob/templates/job/create.html
new file mode 100644
index 0000000..6e1b56c
--- /dev/null
+++ b/newjob/templates/job/create.html
@@ -0,0 +1,34 @@
+{% extends 'base.html' %}
+
+{% block content %}
+
+ ثبت کار
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/newjob/templates/job/read.html b/newjob/templates/job/read.html
new file mode 100644
index 0000000..a803c1e
--- /dev/null
+++ b/newjob/templates/job/read.html
@@ -0,0 +1,45 @@
+{% extends 'base.html' %}
+
+{% block content %}
+
+ کار ها
+ کار جدید
+
+
+
+
+ | عنوان |
+ نوع |
+ قیمت |
+ عکس |
+ تاریخ ساخت |
+ تاریخ ویرایش |
+ عملیات |
+
+
+
+
+ {% for job in jobs %}
+
+ | {{ job.title }} |
+ {{ job.type }} |
+ {{ job.price }} |
+
+
+ |
+ {{ job.created_at }} |
+ {{ job.updated_at }} |
+
+ ویرایش
+ حذف
+ |
+
+
+
+ {% endfor %}
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/newjob/templates/job/update.html b/newjob/templates/job/update.html
new file mode 100644
index 0000000..e646039
--- /dev/null
+++ b/newjob/templates/job/update.html
@@ -0,0 +1,35 @@
+{% extends 'base.html' %}
+
+{% block content %}
+
+ ویرایش کار
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/newjob/tests.py b/newjob/tests.py
new file mode 100644
index 0000000..7ce503c
--- /dev/null
+++ b/newjob/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/newjob/urls.py b/newjob/urls.py
new file mode 100644
index 0000000..410d2ae
--- /dev/null
+++ b/newjob/urls.py
@@ -0,0 +1,10 @@
+
+from django.urls import path
+from . import views
+
+urlpatterns = [
+ path('create', views.create, name="create.newjob"), #localhost:8000/newjob/create
+ path('read', views.read, name="read.newjob"), #localhost:8000/newjob/read
+ path('update/', views.update, name="update.newjob"), #localhost:8000/newjob/update/id
+ path('delete/', views.delete, name="delete.newjob"), #localhost:8000/newjob/delete/id
+]
\ No newline at end of file
diff --git a/newjob/views.py b/newjob/views.py
new file mode 100644
index 0000000..7fca7be
--- /dev/null
+++ b/newjob/views.py
@@ -0,0 +1,34 @@
+from django.shortcuts import render, redirect
+from .forms import NewjobForm
+from .models import Newjob
+
+
+# Create your views here.
+def create(request):
+ if request.method == "POST":
+ form = NewjobForm(request.POST, request.FILES)
+ if form.is_valid():
+ form.save()
+ return redirect('read.newjob')
+ return render(request, 'job/create.html')
+
+
+def read(request):
+ jobs = Newjob.objects.all()
+ return render(request, 'job/read.html', {'jobs': jobs})
+
+
+def update(request, job_id):
+ job = Newjob.objects.get(id=job_id)
+ if request.method == "POST":
+ form = NewjobForm(request.POST, request.FILES, instance=job)
+ if form.is_valid():
+ form.save()
+ return redirect('read.newjob')
+ return render(request, 'job/update.html', {'job': job})
+
+
+def delete(request, job_id):
+ job = Newjob.objects.get(id=job_id)
+ job.delete()
+ return redirect('read.newjob')
diff --git a/python b/python
new file mode 100644
index 0000000..e69de29
diff --git a/static/newjob/images/Screenshot_107.png b/static/newjob/images/Screenshot_107.png
new file mode 100644
index 0000000..789b884
Binary files /dev/null and b/static/newjob/images/Screenshot_107.png differ
diff --git a/static/newjob/images/Screenshot_134.png b/static/newjob/images/Screenshot_134.png
new file mode 100644
index 0000000..ca688e0
Binary files /dev/null and b/static/newjob/images/Screenshot_134.png differ
diff --git a/static/newjob/images/Screenshot_134_g3WeTWc.png b/static/newjob/images/Screenshot_134_g3WeTWc.png
new file mode 100644
index 0000000..ca688e0
Binary files /dev/null and b/static/newjob/images/Screenshot_134_g3WeTWc.png differ
diff --git a/static/newjob/images/Screenshot_14.png b/static/newjob/images/Screenshot_14.png
new file mode 100644
index 0000000..b8026cf
Binary files /dev/null and b/static/newjob/images/Screenshot_14.png differ
diff --git a/static/newjob/images/Screenshot_3.png b/static/newjob/images/Screenshot_3.png
new file mode 100644
index 0000000..dba53f2
Binary files /dev/null and b/static/newjob/images/Screenshot_3.png differ
diff --git a/static/newjob/images/Screenshot_3_U2m1GSN.png b/static/newjob/images/Screenshot_3_U2m1GSN.png
new file mode 100644
index 0000000..dba53f2
Binary files /dev/null and b/static/newjob/images/Screenshot_3_U2m1GSN.png differ
diff --git a/static/newjob/images/Screenshot_4.png b/static/newjob/images/Screenshot_4.png
new file mode 100644
index 0000000..30861d8
Binary files /dev/null and b/static/newjob/images/Screenshot_4.png differ