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

Dec28 changes completed #17

Open
wants to merge 90 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
1b5c68f
finished the phone numberbug and heart function
amaravindhan Oct 16, 2020
71f83c4
updated with updated frontend
amaravindhan Oct 19, 2020
8202d4a
services done
amaravindhan Oct 19, 2020
5469c04
minor bugs fixed
amaravindhan Oct 19, 2020
9822c1f
roommates test cases done and fixed minor bugs
amaravindhan Oct 21, 2020
73b9912
roommates test cases done and fixed minor bugs
amaravindhan Oct 21, 2020
57dc2c7
fixed minor bugs and testcases for favouirtes
amaravindhan Oct 22, 2020
9f0636c
roommates filters and minor design errors fixed
amaravindhan Oct 23, 2020
856341e
notification model and request for rent
amaravindhan Oct 23, 2020
9b0bc90
services request to rent, notifications and extra fields in user student
amaravindhan Oct 26, 2020
c20514f
finished reply answer part and fixed bug in detail property view page
amaravindhan Oct 28, 2020
4f364c5
changes done as per jira
amaravindhan Oct 29, 2020
dd379db
request tour backend and invite code completed fully
amaravindhan Oct 29, 2020
dce9e99
request tour backend and invite code completed fully
amaravindhan Oct 29, 2020
e95d9ae
updated roommates as per the latest
amaravindhan Oct 30, 2020
0d74914
db migration error fixed
amaravindhan Oct 31, 2020
8bc715f
request tour finished and updated the interest on signup
amaravindhan Nov 2, 2020
3754406
minor bug in user app fixed
amaravindhan Nov 2, 2020
f671206
user profile modified
amaravindhan Nov 3, 2020
d5fc2f8
converted to geodjango and started with the location
amaravindhan Nov 4, 2020
601c74e
changes done for amenities mentioned in jira
amaravindhan Nov 5, 2020
fe48582
now the app can get the lat and log and store in the db
amaravindhan Nov 5, 2020
5c9bc94
finished nearby fetching and adding in db
amaravindhan Nov 6, 2020
50f6b40
roommates frontend update
amaravindhan Nov 7, 2020
2ada543
complete nearby location and filters done
amaravindhan Nov 9, 2020
606298a
complete nearby location and filters done
amaravindhan Nov 9, 2020
166dc03
services testcase finished
amaravindhan Nov 11, 2020
ad5c406
services testcase finished
amaravindhan Nov 11, 2020
8c6f837
services testcase finished
amaravindhan Nov 11, 2020
bb9c3f0
finished integrating the new landing page
amaravindhan Nov 13, 2020
56203de
landing page integrated fully and friday meeting changes done
amaravindhan Nov 15, 2020
239f50f
leased and vaccant funtionality added
amaravindhan Nov 16, 2020
55fef4a
solved testcases
amaravindhan Nov 17, 2020
44cd1b9
chat has been integrated with updated geo location code
amaravindhan Nov 17, 2020
0277be7
chat has been integrated with updated geo location code
amaravindhan Nov 17, 2020
d74f1b3
roommates post update done
amaravindhan Nov 17, 2020
b6ab4ac
student and landlord can chat and notfication for chat message added …
amaravindhan Nov 18, 2020
b9b1744
slack changes finished except myrequest page
amaravindhan Nov 19, 2020
e4fccd9
request page finished
amaravindhan Nov 19, 2020
00bea29
bug fixed
amaravindhan Nov 19, 2020
a668262
minor changes and chat file upload completed
amaravindhan Nov 20, 2020
485fc87
google map icon and chat profile picture
amaravindhan Nov 20, 2020
537320b
s3 upload finished
amaravindhan Nov 20, 2020
b8ed0a1
chat icon fixed
amaravindhan Nov 20, 2020
cc7c6e0
frontend fixing
amaravindhan Nov 20, 2020
e471916
file upload frontend fixed
amaravindhan Nov 21, 2020
de9f05f
roommates bug fixed
amaravindhan Nov 21, 2020
6fcec40
distance filter bug solved
amaravindhan Nov 23, 2020
f40fba0
django defender added and started with otp
amaravindhan Nov 28, 2020
eddefef
signup flow and forgot pass flow verfication completed
amaravindhan Nov 29, 2020
67fec7a
finished the phone verification and added the recaptcha
amaravindhan Nov 30, 2020
3381100
minor changes on contact page and chrome bug solved
amaravindhan Dec 1, 2020
24fa7e7
minor changes on contact page and chrome bug solved
amaravindhan Dec 1, 2020
5a82a4f
requirements updated
amaravindhan Dec 1, 2020
3fd9c5a
discussion page completed
amaravindhan Dec 2, 2020
03a6586
discussion_completed
Dec 6, 2020
ad08e54
property nearby changes done
amaravindhan Dec 7, 2020
90e5890
group bug fixed and attachement sending redesigned
amaravindhan Dec 8, 2020
c11f2ed
pagination resolved
amaravindhan Dec 8, 2020
c230f1b
resources app added
amaravindhan Dec 8, 2020
43f1b28
resources agreements added
amaravindhan Dec 8, 2020
518adbc
rename favorites
amaravindhan Dec 9, 2020
6053777
recaptcha issue and utilities fixed
amaravindhan Dec 10, 2020
f10444d
frontend changes - svg replaced
Dec 11, 2020
6afd7ee
vimal frontend changes dec13
Dec 14, 2020
9e1cad3
updated frontend
Dec 15, 2020
5b1a735
small changes
amaravindhan Dec 15, 2020
0a831b9
merge changes
amaravindhan Dec 15, 2020
7571252
sigup resolved and profile picture is not mandatory
amaravindhan Dec 15, 2020
3389988
dec16 fe changes commiting
Dec 16, 2020
4551be8
completed all changes in backend
amaravindhan Dec 16, 2020
ac076d4
completed all changes in backend
amaravindhan Dec 16, 2020
e2d89a9
property images and video changes done
amaravindhan Dec 17, 2020
9e3e96d
student signup errors handled frontend
amaravindhan Dec 18, 2020
dc7a5e1
student signup errors handled frontend
amaravindhan Dec 18, 2020
2f0f422
distance changes done
amaravindhan Dec 18, 2020
79d4ad1
mobile app view changed
Dec 20, 2020
dfe3b48
test
amaravindhan Dec 22, 2020
d450bf5
removed landlord profile pic, amenities not important, property pic m…
amaravindhan Dec 22, 2020
857835a
removed landlord profile pic, amenities not important, property pic m…
amaravindhan Dec 22, 2020
37b0c35
header changes
Dec 23, 2020
e5ed0d1
removed picture descriptions in landlord, added requests tab for land…
Dec 24, 2020
044e7ad
dec27 test commit
Dec 27, 2020
8ebd469
completed all changes dec28
Dec 28, 2020
8fc98dd
completed all changes dec28
Dec 28, 2020
2ba740c
test server commit
Dec 28, 2020
fa793e8
testserver
Dec 28, 2020
e843ade
testserver remove
Dec 28, 2020
999e527
final commit from test server
Dec 28, 2020
593493a
completed all changes before voice
Dec 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
minor changes and chat file upload completed
amaravindhan committed Nov 20, 2020
commit a668262aa197189de374eec7cf26997645570046
2 changes: 1 addition & 1 deletion chat/consumers.py
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ def messages_to_json(self, messages):


def fetch_messages(self, data):
messages = Message.objects.filter(room__id = data['roomname'])
messages = Message.objects.filter(room__id = data['roomname']).order_by('timestamp')
content = {
'message': self.messages_to_json(messages),
'command': 'fetch_messages'
14 changes: 13 additions & 1 deletion chat/models.py
Original file line number Diff line number Diff line change
@@ -3,9 +3,21 @@
from users.models import UserStudent
from django.dispatch import receiver

import uuid, os

User = get_user_model()


def unique_file_path_generator_chat(instance, filename):
"""Generate file path for chat attachments"""
ext = filename.split('.')[-1]
filename = f'{uuid.uuid4()}.{ext}'
filepath = ("uploads/chat/{roomid}/").format(
roomid=instance.room.pk,
)
return os.path.join(filepath, filename)


class Room(models.Model):

name = models.CharField(max_length = 50, blank=True, null=True)
@@ -22,7 +34,7 @@ class Message(models.Model):
content = models.TextField()
timestamp = models.DateTimeField(auto_now_add=True)
room = models.ForeignKey(Room, related_name="room", on_delete=models.CASCADE, null=True)
pdf = models.FileField(null=True, blank=True)
pdf = models.FileField(upload_to=unique_file_path_generator_chat, null=True, blank=True)
# pdf = models.TextField(blank=True, null=True)

def __str__(self):
4 changes: 2 additions & 2 deletions chat/templates/chat/group_index.html
Original file line number Diff line number Diff line change
@@ -344,10 +344,10 @@ <h4>Choose some group to start messaging</h4>

</div>
<div class="col-1 m-0 p-1">
<form id='file_attachment_form' enctype="multipart/form-data" method='post'>
{% comment %} <form id='file_attachment_form' enctype="multipart/form-data" method='post'>
{% csrf_token %}
<input name='myFile' type='file' class='autosubmit'/>
</form>
</form> {% endcomment %}
<br>
<button id="chat-message-submit" class="btn btn-outline-secondary rounded border w-100" title="Send" style="float:right; border-radius:30px; background-color:#094A66; color:#fff; padding-right: 16px; margin-top:25px; padding:10px;"><i class="fa fa-paper-plane" aria-hidden="true"></i></button>

4 changes: 2 additions & 2 deletions chat/templates/chat/roommates_messages.html
Original file line number Diff line number Diff line change
@@ -284,7 +284,7 @@ <h4 class="float-left" style="margin-top: 13px; margin-left: 10px;" id="chatmess
<div class="col-1 m-0 p-1">
<form id='file_attachment_form' enctype="multipart/form-data" method='post'>
{% csrf_token %}
<input name='myFile' type='file' class='autosubmit'/>
<input name='myFile' type='file' class='autosubmit'/>
</form>
<button class="btn btn-outline-secondary rounded border w-100" id="chat-message-submit" title="Send" style="float:right; border-radius:30px; background-color:#094A66; color:#fff; padding-right: 16px; margin-top:25px; padding:10px;"><i class="fa fa-paper-plane" aria-hidden="true"></i></button>

@@ -418,7 +418,7 @@ <h4 class="float-left" style="margin-top: 13px; margin-left: 10px;" id="chatmess
function createMessage(message_data){
var message = message_data;
var author = message.author;
var time = new Date(message.timestamp).toLocaleTimeString();
var time = new Date(message.timestamp).toLocaleString();


var msgDivTag = document.createElement('div');
1 change: 1 addition & 0 deletions chat/urls.py
Original file line number Diff line number Diff line change
@@ -13,4 +13,5 @@
path('group/<int:room_name>/', group, name="group"),
path('room/<int:room_name>/', room, name='room'),
path('create/<slug:slug>/', landlord_chat, name='landlordchat'),
path('landlord/student/create/<str:studuser>/', landlord_student_chat, name="landlordStudentChat"),
]
42 changes: 28 additions & 14 deletions chat/views.py
Original file line number Diff line number Diff line change
@@ -10,11 +10,11 @@
from notifications.models import Notification
from django.contrib.auth import get_user_model
from django.views.generic import ListView
from django.core.files.storage import FileSystemStorage
# from django.core.files.storage import FileSystemStorage
import json

fs = FileSystemStorage(location='/home/pooja/Documents/Freelancing/realestatemvp/chatapp/static/uploads/')
fs.base_url = '/home/pooja/Documents/Freelancing/realestatemvp/chatapp/static/uploads/'
# fs = FileSystemStorage(location='/home/pooja/Documents/Freelancing/realestatemvp/chatapp/static/uploads/')
# fs.base_url = '/home/pooja/Documents/Freelancing/realestatemvp/chatapp/static/uploads/'

User = get_user_model()

@@ -78,18 +78,16 @@ def room(request, room_name):

if request.method == "POST":
uploaded_file = request.FILES['myFile']
name = fs.save(uploaded_file.name, uploaded_file)
url = fs.url(name)
new_message = Message.objects.create(
room = get_object_or_404(Room, pk=room_name),
author = request.user,
content = '',
pdf = url,
pdf = uploaded_file,
)
return JsonResponse({
'room_id': room_name,
'username': request.user.username,
'url': url,
'url': new_message.pdf.url,
'message_id': new_message.pk,
})

@@ -119,18 +117,18 @@ def group(request, room_name):

if request.method == "POST":
uploaded_file = request.FILES['myFile']
name = fs.save(uploaded_file.name, uploaded_file)
url = fs.url(name)
# name = fs.save(uploaded_file.name, uploaded_file)
# url = fs.url(name)
new_message = Message.objects.create(
room = get_object_or_404(Room, pk=room_name),
author = request.user,
content = '',
pdf = url,
pdf = uploaded_file,
)
return JsonResponse({
'room_id': room_name,
'username': request.user.username,
'url': url,
'url': new_message.pdf.url,
'message_id': new_message.pk,
})

@@ -233,7 +231,7 @@ class RequestView(ListView):
context_object_name = 'message_request_list'
template_name = "chat/message_list.html"
def get_queryset(self):
return MessageRequest.objects.filter(request_sender__user__user=self.request.user)
return MessageRequest.objects.filter(status=False).filter(request_sender__user__user=self.request.user)


@login_required
@@ -246,10 +244,11 @@ def message_request_update(request, requestUser):
add_user_valid = get_user_contact(new_request_user_name)

loggedin_user = request.user
loggedin_user_valid = get_user_contact(loggedin_user)

if loggedin_user.username != requestUser:
try:
already_exists = MessageRequest.objects.filter(request_sender__user=add_user_valid.user).get()
already_exists = MessageRequest.objects.filter(logged_in_user=loggedin_user_valid).filter(request_sender__user=add_user_valid.user).get()
print("Message request sent to this user ==> ", already_exists)
return HttpResponse('<html><body>Request sent already %s.</body></html>' % already_exists)
except MessageRequest.DoesNotExist:
@@ -289,4 +288,19 @@ def post(request):
new_room.save()
new_room.members.add(request.user)
new_room.save()
return redirect('chat:group', new_room.pk)
return redirect('chat:group', new_room.pk)

@login_required
def landlord_student_chat(request, studuser):
studObj = get_object_or_404(UserStudent, user__user__username=studuser)
loggedin_user = request.user
try:
already_exists = Room.objects.filter(room_type = False).filter(members__username = loggedin_user).filter(members__username=studObj.user.user.username).get()
return redirect("chat:room", already_exists)
except Room.DoesNotExist:
new_room = Room.objects.create()
new_room.members.add(get_object_or_404(User, username=studObj.user.user.username))
new_room.save()
new_room.members.add(request.user)
new_room.save()
return redirect('chat:room', new_room.pk)
2 changes: 1 addition & 1 deletion checkout/templates/checkout/myrequestrentview.html
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@
<div class="row">
<div class="col-md-2"><h4><b>Address</b></h4></div>
<div class="col-md-8"><h4>{{object.propertyObj.title}}</h4></div>
<div class="col-md-2"><a href="#" class="btn btn-primary btn-lg" style="border-radius:50px;">Message</a></div>
<div class="col-md-2"><a href="{% url 'chat:landlordStudentChat' object.studentObj.user.user.username %}" class="btn btn-primary btn-lg" style="border-radius:50px;">Message</a></div>
</div>
<div class="row">
<div class="col-md-2"><h4><b>Name</b></h4></div>
2 changes: 1 addition & 1 deletion checkout/templates/checkout/myrequesttourview.html
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@
<div class="row">
<div class="col-md-2"><h4><b>Address</b></h4></div>
<div class="col-md-8"><h4>{{object.propertyObj.title}}</h4></div>
<div class="col-md-2"><a href="#" class="btn btn-primary btn-lg" style="border-radius:50px;">Message</a></div>
<div class="col-md-2"><a href="{% url 'chat:landlordStudentChat' object.studentObj.user.user.username %}" class="btn btn-primary btn-lg" style="border-radius:50px;">Message</a></div>
</div>
<div class="row">
<div class="col-md-2"><h4><b>Name</b></h4></div>
8 changes: 4 additions & 4 deletions checkout/views.py
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ def RequestToRentPropertyCreateView(request, slug):
toUser=form.instance.propertyObj.landlord.user.user,
notificationType='rentRequest',
content=form.instance.propertyObj.title,
identifier=form.instance.propertyObj.urlSlug,
identifier=form.instance.pk,
)
messages.add_message(request, messages.SUCCESS, 'Rent Request Sent Successfully.')
else:
@@ -53,7 +53,7 @@ def RequestToTourPropertyCreateView(request, slug):
toUser=form.instance.propertyObj.landlord.user.user,
notificationType='tourRequest',
content=form.instance.propertyObj.title,
identifier=form.instance.propertyObj.urlSlug,
identifier=form.instance.pk,
)
messages.add_message(request, messages.SUCCESS, 'Tour Request Sent Successfully.')
else:
@@ -89,8 +89,8 @@ def RequestToRentServiceCreateView(request, pk):
@login_required
@user_passes_test(landlordAccessTest)
def myrequest(request):
rentRequest = RequestToRentProperty.objects.filter(propertyObj__landlord__user__user=request.user)
tourRequest = RequestToTourProperty.objects.filter(propertyObj__landlord__user__user=request.user)
rentRequest = RequestToRentProperty.objects.filter(propertyObj__landlord__user__user=request.user).order_by('-createdDate')
tourRequest = RequestToTourProperty.objects.filter(propertyObj__landlord__user__user=request.user).order_by('-createdDate')
context = {
'rentRequest': rentRequest,
'tourRequest': tourRequest
12 changes: 11 additions & 1 deletion notifications/views.py
Original file line number Diff line number Diff line change
@@ -7,7 +7,17 @@
def notification(request, pk):
obj = get_object_or_404(Notification, pk=pk)

if obj.notificationType == 'rentRequest' or obj.notificationType == 'tourRequest' or obj.notificationType == 'question' or obj.notificationType == 'answered':
if obj.notificationType == 'rentRequest':
obj.viewed = True
obj.save()
return redirect('checkout:rentRequestDetail', pk=obj.identifier)

if obj.notificationType == 'tourRequest':
obj.viewed = True
obj.save()
return redirect('checkout:tourRequestDetail', pk=obj.identifier)

if obj.notificationType == 'question' or obj.notificationType == 'answered':
obj.viewed = True
obj.save()
return redirect('property:propertyDetail', slug=obj.identifier)
Binary file modified property/__pycache__/views.cpython-36.pyc
Binary file not shown.
25 changes: 23 additions & 2 deletions property/templates/property/properties.html
Original file line number Diff line number Diff line change
@@ -220,7 +220,7 @@ <h6>Price Range</h6>

<br>
{% comment %} <span class="btn form-contro" style="cursor:pointer; background-color:rgba(0, 0, 0, 0.8); width:100%; color:#fff;"> Apply Filters </span> {% endcomment %}
<input type="submit" value="Apply Filters" class="pxp-filter-btn" style="background-color: #044C7E; border-radius:50px;" />
<input type="submit" value="Apply Filters" class="pxp-filter-btn" id="apply_filter_btn_id" style="background-color: #044C7E; border-radius:50px;" />
</div>
</div>
</div>
@@ -527,7 +527,7 @@ <h2 class="pxp-content-side-h2">{{total_count}} Results</h2>
{% endfor %}
</select>
<div class="input-group-append">
<button type="submit" class="btn btn-md btn-success">Tag</button>
<button type="submit" class="btn btn-md btn-success" id="tag_submit_btn">Tag</button>
</div>
</div>
</div>
@@ -742,4 +742,25 @@ <h2 class="pxp-content-side-h2">{{total_count}} Results</h2>
});
</script>

<script>
$("#id_sort").change(function(){
var sortvalue = $("#id_sort option:selected").val();
console.log(sortvalue);
{% comment %} if(sortvalue != 'default') { {% endcomment %}
$("#apply_filter_btn_id").click();
{% comment %} } {% endcomment %}
});
</script>

<!--script>
$("#tag_friend_id").change(function(){
var tagvalue = $("#tag_friend_id option:selected").val();
if(tagvalue != '' || tagvalue != null) {
$("#tag_submit_btn").show(200);
} else {
$("#tag_submit_btn").hide(200);
}
});
</script-->

{% include "layout/footer.html" %}
25 changes: 21 additions & 4 deletions property/templates/property/single-property.html
Original file line number Diff line number Diff line change
@@ -418,7 +418,7 @@ <h3>Amenities</h3>
<div class="card-body" id="ques_ans_card_body" style="font-size:13px; max-height:520px; overflow-y:scroll;">
<h6 id="ques_ans_card_h6">
{% if object.postquestion_set.all %}
<b style="color:grey;">FAQ's</b>
<b id="faq" style="color:grey;">FAQ's</b>
{% if user.usertype.is_landlord %}
<b class="btn btn-default btn-xs pull-right pxp-signup-trigger" style="color:#fff; background-color:#003a8c; border-radius:50px; cursor:pointer; padding:1px 7px;"> Answer </b> <br>
{% endif %}
@@ -440,7 +440,7 @@ <h6 id="ques_ans_card_h6">
</div>
{% endfor %}
{% else %}
<p style="padding-left:10px; color:grey; padding-top:10px;">No queries yet</p>
<p id="studentNoQueries" style="padding-left:10px; color:grey; padding-top:10px;">No queries yet</p>
{% endif %}
</div>

@@ -867,6 +867,8 @@ <h4 class="modal-title">
$("#post_ques_success").fadeOut(2000);
var newqueshtml = '<div class="qadiv"><hr><b>'+res.question+'?</b><p style="padding-left:10px; color:grey; padding-top:10px;">&nbsp; <i class="fa fa-mail-forward"></i> &nbsp;No reply</p></div>';
$("#ques_ans_card_h6").after(newqueshtml);
$("#ques_ans_card_h6").html("<b id='faq' style='color:grey;'>FAQ's</b>")
$("#studentNoQueries").hide();
},
error: function(res){
console.log(res)
@@ -992,8 +994,9 @@ <h4 class="modal-title">
position: location,
animation: google.maps.Animation.DROP,
//label: labels[i % labels.length],
icon: location.img,
label: {
text: '\xa0 \xa0 \xa0 \xa0 \xa0 \xa0 \xa0 \xa0 \xa0 \xa0'+location.name,
//text: '\xa0 \xa0 \xa0 \xa0 \xa0 \xa0 \xa0 \xa0 \xa0 \xa0'+location.name,
color: 'black',
fontSize: '20px',
fontWeight: 'bold',
@@ -1010,7 +1013,21 @@ <h4 class="modal-title">
}
const locations = [
{% for nearby in object.propertynearby_set.all %}
{ lat: {{nearby.location.y}}, lng: {{nearby.location.x}}, name: '{{nearby}}' },
{% if nearby.nearByType == 'Restaurant' %}
{ lat: {{nearby.location.y}}, lng: {{nearby.location.x}}, name: '{{nearby}}', img:'{% static "/images/map/restauranticon.jpg" %}' },
{% elif nearby.nearByType == 'Bar' %}
{ lat: {{nearby.location.y}}, lng: {{nearby.location.x}}, name: '{{nearby}}', img:'{% static "/images/map/Baricon.jpg" %}' },
{% elif nearby.nearByType == 'Shopping Mall' %}
{ lat: {{nearby.location.y}}, lng: {{nearby.location.x}}, name: '{{nearby}}', img:'{% static "/images/map/shoppingmallicon.jpg" %}' },
{% elif nearby.nearByType == 'Wallmart' %}
{ lat: {{nearby.location.y}}, lng: {{nearby.location.x}}, name: '{{nearby}}', img:'{% static "/images/map/wallmarticon.jpg" %}' },
{% elif nearby.nearByType == 'Costco' %}
{ lat: {{nearby.location.y}}, lng: {{nearby.location.x}}, name: '{{nearby}}', img:'{% static "/images/map/costcoicon.jpg" %}' },
{% elif nearby.nearByType == 'Target' %}
{ lat: {{nearby.location.y}}, lng: {{nearby.location.x}}, name: '{{nearby}}', img:'{% static "/images/map/targeticon.jpg" %}' },
{% else %}
{ lat: {{nearby.location.y}}, lng: {{nearby.location.x}}, name: '{{nearby}}', img:'{% static "/images/map/nullicon.jpg" %}' },
{% endif %}
{% endfor %}
];
google.maps.event.addDomListener(window, 'load', initialize);
2 changes: 1 addition & 1 deletion property/views.py
Original file line number Diff line number Diff line change
@@ -225,7 +225,7 @@ def get_queryset(self):

filterSortForm = PropertyFilterSortForm(data=self.request.GET)
propObjects = super().get_queryset().annotate(distance=Distance(userlocation, 'location')).order_by('distance')

propObjects = propObjects.filter(isleased=False)
if filterSortForm.is_valid():
room = filterSortForm.cleaned_data.get('room', None)
occp = filterSortForm.cleaned_data.get('occp', None)
18 changes: 10 additions & 8 deletions templates/layout/footer.html
Original file line number Diff line number Diff line change
@@ -229,14 +229,16 @@
document.getElementById('id_is_college_student').setAttribute("checked", "true");
$('#id_college_name').prop('readonly', false); {% endcomment %}

{% if messages %}
{% for message in messages %}
{% if message.tags == 'success' %}
$(".pxp-signin-trigger").click();
{% elif message.tags == 'forgotPassword error' %}
$(".pxp-forgot-pass-trigger").click();
{% endif %}
{% endfor %}
{% if not user.is_authenticated %}
{% if messages %}
{% for message in messages %}
{% if message.tags == 'success' %}
$(".pxp-signin-trigger").click();
{% elif message.tags == 'forgotPassword error' %}
$(".pxp-forgot-pass-trigger").click();
{% endif %}
{% endfor %}
{% endif %}
{% endif %}

}
Binary file modified users/__pycache__/forms.cpython-36.pyc
Binary file not shown.
Binary file modified users/__pycache__/views.cpython-36.pyc
Binary file not shown.
10 changes: 5 additions & 5 deletions users/forms.py
Original file line number Diff line number Diff line change
@@ -182,25 +182,25 @@ class StudentSignupForm(UserCreationForm):
'placeholder': 'Enter twitter link',
})
)
ssFrom = forms.TimeField(required=False,
ssFrom = forms.TimeField(
widget=forms.TimeInput(attrs={
'class': 'form-control',
'type': 'time'
})
}),
)
ssTo = forms.TimeField(required=False,
ssTo = forms.TimeField(
widget=forms.TimeInput(attrs={
'class': 'form-control',
'type': 'time'
})
)
shFrom = forms.TimeField(required=False,
shFrom = forms.TimeField(
widget=forms.TimeInput(attrs={
'class': 'form-control',
'type': 'time'
})
)
shTo = forms.TimeField(required=False,
shTo = forms.TimeField(
widget=forms.TimeInput(attrs={
'class': 'form-control',
'type': 'time'