settings.py

master
VARUN 3 weeks ago
parent 1d295837df
commit 5ab18adea6

@ -70,7 +70,7 @@ TEMPLATES = [
}, },
}, },
] ]
WSGI_APPLICATION = 'skyonnweb.wsgi.application' # WSGI_APPLICATION = 'skyonnweb.wsgi.application'
# Database # Database
@ -82,7 +82,7 @@ DATABASES = {
'NAME': 'skyonn4', 'NAME': 'skyonn4',
'USER': 'root', 'USER': 'root',
'PASSWORD': '', 'PASSWORD': '',
'HOST': '34.93.75.170', 'HOST': 'localhost',
'PORT': '3306', 'PORT': '3306',
'OPTIONS': { 'OPTIONS': {
'init_command': "SET sql_mode='STRICT_TRANS_TABLES'", 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",

@ -209,47 +209,23 @@ input {
outline: none; outline: none;
} }
<!--/* Buttons */-->
<!--.compose-button {-->
<!-- padding: 8px 16px;-->
<!-- font-size: 14px;-->
<!-- border: none;-->
<!-- width:10px;-->
<!-- border-radius: 4px;-->
<!-- cursor: pointer;-->
<!-- transition: background-color 0.3s;-->
<!--}-->
<!--.compose-button.send {-->
<!-- background-color: #4285f4;-->
<!--}-->
<!--.compose-button.send:hover {-->
<!-- background-color: #357ae8;-->
<!--}-->
<!--.compose-button.discard {-->
<!-- background-color: #f5f5f5;-->
<!-- color: #333;-->
<!--}-->
.compose-button.discard:hover { .compose-button.discard:hover {
background-color: red; background-color: red;
} }
/* Style for the whole button */
.sidebar__compose { .sidebar__compose {
text-transform: capitalize; text-transform: capitalize;
color: gray; color: gray;
padding: 15px; padding: 15px;
border-radius: 20px; border-radius: 20px;
background-color: white; background-color: white;
display: flex; /* Flexbox ensures horizontal alignment */ display: flex;
align-items: center; /* Vertically aligns items */ align-items: center;
cursor: pointer; cursor: pointer;
outline: none; outline: none;
border: none; border: none;
color:black;
box-shadow: 0px 2px 5px -2px rgba(0, 0, 0, 0.75); box-shadow: 0px 2px 5px -2px rgba(0, 0, 0, 0.75);
} }
@ -257,7 +233,8 @@ input {
.sidebar__compose .material-icons { .sidebar__compose .material-icons {
margin-right: 8px; /* Add space between the icon and text */ margin-right: 8px; /* Add space between the icon and text */
vertical-align: middle; /* Ensures the icon is vertically aligned with text */ vertical-align: middle; /* Ensures the icon is vertically aligned with text */
font-size: 20px; /* You can adjust the size of the icon here */ font-size: 26px;
color:black;
} }
/* Style for the hover effect */ /* Style for the hover effect */
@ -339,7 +316,10 @@ cursor:pointer;
.email-input-container { .email-input-container {
position: relative; /* The dropdown will be positioned relative to this container */ position: relative; /* The dropdown will be positioned relative to this container */
} }
.emailRow:hover {
border-top: 1px solid whitesmoke;
box-shadow: 0 4px 4px -2px rgba(0, 0, 0, 0.24);
}
#BackToInboxButton { #BackToInboxButton {
margin-bottom: 10px; margin-bottom: 10px;
background: none; background: none;
@ -421,20 +401,14 @@ cursor:pointer;
<div class="Messages "> <div class="Messages ">
<form id="messageForm " style="" > <form id="messageForm " style="" >
{% csrf_token %} {% csrf_token %}
<input type="hidden" id="user_id" name="user_id" value="{{ user_id }}"> <input type="hidden" id="user_id" name="user_id" value="{{ user_id }}">
<input type="hidden" id="current_user_id" name="current_user_id" value="{{ current_user_id }}"> <input type="hidden" id="current_user_id" name="current_user_id" value="{{ current_user_id }}">
<div class="" style="margin-top:0px; width:70.5%; margin-left:300px; "> <div class="" style="margin-top:0px; width:70.5%; margin-left:300px; ">
</div> </div>
<div class="main__body" style="margin-left: 300px; margin-top: -10px; "> <div class="main__body" style="margin-left: 300px; margin-top: -10px; ">
<div class="" style="margin-top: 10px;"> <div class="" style="margin-top: 10px;">
<div class="sticky-container" style="position: sticky; top: 0px"> <div class="sticky-container" style="position: sticky; top: 0px">
<!-- Compose Button -->
<h2 style="margin-left:30px; margin-top:10px; ">Messages</h2> <h2 style="margin-left:30px; margin-top:10px; ">Messages</h2>
<div class="search"> <div class="search">
<input type="text" placeholder="Search"> <input type="text" placeholder="Search">
@ -485,57 +459,38 @@ cursor:pointer;
</div> </div>
</div> </div>
</form> </form>
<div class="compose-container" id="ComposeContainer" <div class="compose-container" id="ComposeContainer" style="display: none; position: fixed; top:230px; bottom: 10%; right: 5%; width: 30%; height:58%; background-color: #fff; border-radius: 30px; box-shadow: 3px 3px 3px 3px rgba(0.5, 0.5, 0.5, 0.5); padding: 30px; z-index: 1000; margin-top: 50px;">
style="display: none; position: fixed; top:230px; bottom: 10%; right: 5%; width: 30%; height:58%; background-color: #fff; border-radius: 30px; box-shadow: 3px 3px 3px 3px rgba(0.5, 0.5, 0.5, 0.5); padding: 30px; z-index: 1000; margin-top: 50px;">
<div class="container" style="padding: 20px;width:100%"> <div class="container" style="padding: 20px;width:100%">
<form id="ComposeMessage" method="post" action="{% url 'send_message' %}?user_id={{ user_id }}"> <form id="ComposeMessage" method="post" action="{% url 'send_message' %}?user_id={{ user_id }}">
{% csrf_token %} {% csrf_token %}
<div class="fixed" style="margin-buttom:10px; width:100%"> <div class="fixed" style="margin-buttom:10px; width:100%">
<div class="compose-header" style="display: flex; margin-left:-50px; space-between; align-items: center; background-color:#F0F8FF; width:128%; margin-top:-50px;"> <div class="compose-header" style="display: flex; margin-left:-50px; space-between; align-items: center; background-color:#F0F8FF; width:128%; margin-top:-50px;">
<span style="font-size: 18px; font-weight: bold; margin-left:20px;" >New Message</span> <span style="font-size: 18px; font-weight: bold; margin-left:20px;" >New Message</span>
<div class="compose-close" id="Closebutton" onclick="CloseCompose(event)" style="font-size: 30px; margin-left:290px; color: red; cursor: pointer;">&times;</div> <div class="compose-close" id="Closebutton" onclick="CloseCompose(event)" style="font-size: 30px; margin-left:290px; color: red; cursor: pointer;">&times;</div>
</div> </div>
<div class="compose-body"> <div class="compose-body">
<div style="position: relative;"> <div style="position: relative;">
<div id="emailBarsContainer" style="margin-top: 10px; display: flex; flex-wrap: wrap;"></div> <div id="emailBarsContainer" style="margin-top: 10px; display: flex; flex-wrap: wrap;"></div>
<!-- Searchable Input Field -->
<input type="text" id="toField" placeholder="Search Emails..." style="width: 128%; text-indent: 10px; border: none; border-bottom: 1px solid #d3d3d3; height: 40px; margin-left: -50px; padding-right: 30px; cursor: pointer;"> <input type="text" id="toField" placeholder="Search Emails..." style="width: 128%; text-indent: 10px; border: none; border-bottom: 1px solid #d3d3d3; height: 40px; margin-left: -50px; padding-right: 30px; cursor: pointer;">
<!-- Dropdown Icon -->
<span id="dropdownIcon" class="dropdown-icon" style="position: absolute; top: 50%; left: 370px; transform: translateY(-50%); cursor: pointer;">&#9660;</span> <span id="dropdownIcon" class="dropdown-icon" style="position: absolute; top: 50%; left: 370px; transform: translateY(-50%); cursor: pointer;">&#9660;</span>
</div> </div>
<!-- Searchable Email List -->
<div id="emailCheckbox" style="display: none; position: absolute; width: 80%; z-index: 100; background: #ffffff; border: 1px solid #d3d3d3; border-radius: 5px; <div id="emailCheckbox" style="display: none; position: absolute; width: 80%; z-index: 100; background: #ffffff; border: 1px solid #d3d3d3; border-radius: 5px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); padding: 10px; overflow-y: auto; max-height: 150px; margin-top: 5px;"> box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); padding: 10px; overflow-y: auto; max-height: 150px; margin-top: 5px;">
<!-- Loop through emails -->
{% for team in teams %} {% for team in teams %}
<label class="email-item" style="display: block; margin-bottom: 10px;"> <label class="email-item" style="display: block; margin-bottom: 10px;">
<input type="checkbox" value="{{ team }}" class="email-checkbox"> {{ team }} <input type="checkbox" value="{{ team }}" class="email-checkbox"> {{ team }}
</label> </label>
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
</div> </div>
<input type="text" id="subject" style="width: 128%; height:40px; margin-top: 0px; border: none; border-bottom: 1px solid #d3d3d3;margin-left:-50px;text-indent: 10px;" class="compose-input" placeholder="Subject"> <input type="text" id="subject" style="width: 128%; height:40px; margin-top: 0px; border: none; border-bottom: 1px solid #d3d3d3;margin-left:-50px;text-indent: 10px;" class="compose-input" placeholder="Subject">
<textarea id="Message" style="width: 128%; height: 220px; margin-top: 1px; text-indent: 10px; border: none;padding-top: 10px; border-bottom: 1px solid #d3d3d3;margin-left:-50px;border-bottom:1px solid solid black" class="compose-input" placeholder="Message"></textarea>
<textarea id="Message" style="width: 128%; height: 220px; margin-top: 1px; text-indent: 10px; border: none;padding-top: 10px; border-bottom: 1px solid #d3d3d3;margin-left:-50px;border-bottom:1px solid solid black"
class="compose-input" placeholder="Message"></textarea>
<!-- Footer -->
<div class="" style="display: flex; justify-content: space-between; align-items: center; margin-top:20px; margin-right:100px;"> <div class="" style="display: flex; justify-content: space-between; align-items: center; margin-top:20px; margin-right:100px;">
<button type="button" class="compose-button send" id="sendButton" <button type="button" class="compose-button send" id="sendButton" style="margin-left:-20px; border-radius: 10px; border: none; position:fixed; color:white; background:#1F51FF;font-size:17px; width:60px; height:30px; font-weight:bold; letter-spacing:1px;" onclick="sendMessage(event)">Send</button>
style="margin-left:-20px; border-radius: 10px; border: none; position:fixed; color:white; background:#1F51FF;font-size:17px; width:60px; height:30px; font-weight:bold; letter-spacing:1px;" onclick="sendMessage(event)">Send</button>
<button class="compose-button discard" id="Discardbutton" style="margin-left:50px; border-radius: 10px; border: none; position:fixed; color:white; background:#1F51FF;font-size:17px; width:80px; height:30px; font-weight:bold; letter-spacing:1px;" onclick="CloseCompose(event)">Discard</button> <button class="compose-button discard" id="Discardbutton" style="margin-left:50px; border-radius: 10px; border: none; position:fixed; color:white; background:#1F51FF;font-size:17px; width:80px; height:30px; font-weight:bold; letter-spacing:1px;" onclick="CloseCompose(event)">Discard</button>

@ -348,6 +348,24 @@ a {
// messages // // messages //
document.addEventListener('DOMContentLoaded', function() {
const userId = document.getElementById('user_id').value;
fetch(`/unread_message_count/?user_id=${encodeURIComponent(userId)}`)
.then(response => {
if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`);
}
return response.json();
})
.then(data => {
console.log("unread count", data);
return data
})
.catch(error => {
console.error('Error fetching main message ID:', error);
});
})
function findMainMessageId(message_id) { function findMainMessageId(message_id) {
console.log(message_id); console.log(message_id);
const userId = document.getElementById('user_id').value; const userId = document.getElementById('user_id').value;

@ -77,7 +77,7 @@ class JobPosting(models.Model):
StartDate = models.DateField(null=True) StartDate = models.DateField(null=True)
CloseDate = models.DateField(null=True) CloseDate = models.DateField(null=True)
BudgetMin = models.CharField(max_length=20,null=True) BudgetMin = models.DecimalField(max_length=20,null=True)
timePeriod = models.CharField(max_length=20,null=True,blank=True) timePeriod = models.CharField(max_length=20,null=True,blank=True)
minAmount = models.CharField(max_length=20,null=True) minAmount = models.CharField(max_length=20,null=True)
maxAmount = models.CharField(max_length=20,null=True) maxAmount = models.CharField(max_length=20,null=True)

Loading…
Cancel
Save