delete all files

This commit is contained in:
ismailsosic
2022-04-21 08:51:16 +02:00
parent 12265c5d67
commit cd2ed66f1e
22 changed files with 0 additions and 234 deletions

11
.gitignore vendored
View File

@@ -1,11 +0,0 @@
*.log
*.pot
*.pyc
__pycache__/
local_settings.py
db.sqlite3
.vscode
/media
settings.py
.env
env

3
.idea/.gitignore generated vendored
View File

@@ -1,3 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml

View File

@@ -1,6 +0,0 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

4
.idea/misc.xml generated
View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (venv)" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml generated
View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/kivi-za-auta.iml" filepath="$PROJECT_DIR$/.idea/kivi-za-auta.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated
View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@@ -1,3 +0,0 @@
from django.contrib import admin
# Register your models here.

View File

@@ -1,6 +0,0 @@
from django.apps import AppConfig
class EmailerConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'emailer'

View File

@@ -1,44 +0,0 @@
from email import message
# using server service
import smtplib
# for sending mail in that shape
from email.message import EmailMessage
# dotenv for using environment variables needed pip install python-dotenv
from dotenv import load_dotenv
# for importing files
import os
# we can use variable with list of email adress for msg['To'] for receivers
# receiver = ["misij83692@carsik.com",]
msg = EmailMessage()
# Subject should be dinamicly to add subject from olx
msg['Subject'] = 'KIVI-CARS'
msg['From'] = 'kivi-cars.ba'
# Below is generated email adress using https://temp-mail.org/
msg['To'] = ["girolag234@eosbuzz.com","tojebik898@3dinews.com"]
msg_body = """Pozdrav,
Ovo je automatski generisana poruka u svrhu testiranja naseg servisa
Vaš Kivi-cars tim! """
msg.set_content(msg_body)
#environment variables
load_dotenv()
sender = os.getenv("EMAIL_HOST_USER")
password = os.getenv("EMAIL_HOST_PASSWORD")
host = os.getenv("EMAIL_HOST")
port = os.getenv("EMAIL_PORT")
server = smtplib.SMTP(host, port)
server.starttls()
server.login(sender, password)
print("logged in...")
server.send_message(msg)
print("email has beeen sent!")

View File

@@ -1,3 +0,0 @@
from django.db import models
# Create your models here.

View File

@@ -1,19 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Form</title>
</head>
<body>
<form method="post">
{% csrf_token %}
<h1> Welcome to our form, please fill it!</h1>
</h1>
Email <br>
<input type="email" name="email">
<button type="submit">Send</button>
</form>
</body>
</html>

View File

@@ -1,3 +0,0 @@
from django.test import TestCase
# Create your tests here.

View File

@@ -1,6 +0,0 @@
from django.urls import path
from . import views
urlpatterns = [
path('/', views.index),
]

View File

@@ -1,28 +0,0 @@
from django.shortcuts import render
from django.http import HttpResponse
from django.core.mail import send_mail
# Create your views here.
def index(request):
if request.method == "POST":
message = """Zdravo
Ovo je automatski generisana poruka u svrhu testiranja naseg servisa
Vaš,
Kivi-cars tim
"""
subject = "Kivi-Cars - novi zahtjev za pretragu"
email = request.POST.get('email')
print(subject, email)
# function to send mail
send_mail(subject, message, 'saburlymailer@gmail.com', [email])
return HttpResponse('Success, check your email!')
return render(request, 'mailer/form.html')

View File

@@ -1,16 +0,0 @@
"""
ASGI config for kivi_cars project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'kivi_cars.settings')
application = get_asgi_application()

View File

@@ -1,22 +0,0 @@
"""kivi_cars URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('emailer', include('emailer.urls')),
path('admin/', admin.site.urls),
]

View File

@@ -1,16 +0,0 @@
"""
WSGI config for kivi_cars project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'kivi_cars.settings')
application = get_wsgi_application()

View File

@@ -1,22 +0,0 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'kivi_cars.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
if __name__ == '__main__':
main()