Skip to content

Commit 5a7fca9

Browse files
author
thelostmonk
committed
Remove bookmark jquery done
1 parent 2c19c29 commit 5a7fca9

File tree

5 files changed

+62
-18
lines changed

5 files changed

+62
-18
lines changed

hackrsource/MOC/db.sqlite3

0 Bytes
Binary file not shown.

hackrsource/MOC/newsapp/models.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import unicode_literals
2-
from django.contrib.auth.models import User
3-
from django.utils.encoding import python_2_unicode_compatible
42

3+
from django.contrib.auth.models import User
54
from django.db import models
65

76

hackrsource/MOC/newsapp/templates/newsapp/home.html

+18-5
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,28 @@ <h2 class="article-header text-center"> {{ values.1 }} </h2>
1616
</div>
1717
<div class="panel-footer">
1818
<div class="row">
19-
<div class="col-md-6">
19+
<div class="col-md-3">
2020
<p class="article-author">
2121
<b>Published by : </b>{{values.0}}
2222
</p> <br>
2323
</div>
24-
<div col-md-6>
25-
<button class="btn btn-default" onclick="bookmark({{id}})">
26-
Bookmark
27-
</button>
24+
<div class="col-md-9" >
25+
<div class="col-md-3">
26+
<button class="btn btn-primary" onclick="like({{id}})">
27+
Like
28+
</button>
29+
</div>
30+
<div class="col-md-3">
31+
<button class="btn btn-danger" onclick="unlike({{id}})">
32+
Unlike
33+
</button>
34+
</div>
35+
<div class="col-md-3">
36+
<button class="btn btn-default" onclick="bookmark({{id}})">
37+
Bookmark
38+
</button>
39+
</div>
40+
2841
</div>
2942
</div>
3043
</div>

hackrsource/MOC/newsapp/templates/newsapp/profile.html

+22-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="container" style="padding-top:50px">
55
<div id="post-list" class="container" style="padding-top:20px">
66
{% for id, values in result.items %}
7-
<div class="row">
7+
<div class="row" id="article-{{id}}">
88
<div class="col-md-offset-3 col-md-6">
99
<div class="panel panel-default">
1010
<div class="panel-header">
@@ -15,15 +15,28 @@ <h2 class="article-header text-center"> {{ values.1 }} </h2>
1515
</div>
1616
<div class="panel-footer">
1717
<div class="row">
18-
<div class="col-md-6">
18+
<div class="col-md-3">
1919
<p class="article-author">
2020
<b>Published by : </b>{{values.0}}
2121
</p> <br>
2222
</div>
23-
<div col-md-6>
24-
<button class="btn btn-default" onclick="unbookmark({{id}})">
25-
Remove Bookmark
26-
</button>
23+
<div class="col-md-9">
24+
<div class="col-md-3">
25+
<button class="btn btn-primary" onclick="like({{id}})">
26+
Like
27+
</button>
28+
</div>
29+
<div class="col-md-3">
30+
<button class="btn btn-danger" onclick="unlike({{id}})">
31+
Unlike
32+
</button>
33+
</div>
34+
<div class="col-md-3">
35+
<button class="btn btn-default" onclick="unbookmark({{id}})">
36+
Remove Bookmark
37+
</button>
38+
</div>
39+
2740
</div>
2841
</div>
2942
</div>
@@ -44,9 +57,11 @@ <h2 class="article-header text-center"> {{ values.1 }} </h2>
4457
url:"/unbookmark",
4558
data:{id:articleId},
4659
success: function(data) {
47-
alert(data);
60+
id = "#article-" + articleId;
61+
$(id).remove();
4862
},
4963
});
5064
}
65+
5166
</script>
5267
{% endblock %}

journal/dhiraj.md

+21-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
## Jun 1
44

5-
65
- EXPLORE : Polymorphism and its importance
76
- EXPLORE : Multiple inheritance
87
- READ : https://docs.djangoproject.com/en/1.11/topics/db/models
@@ -35,9 +34,27 @@ Things I should learn in MOC
3534
1. Inbuilt Features
3635
2. Restful framework
3736
3. Git and GitHub
38-
- https://www.atlassian.com/git/tutorials
39-
-
40-
4. Good Practices in django application development
37+
4. Good Practices in django application development
4138
5. Testing a django applicaiton (Unit, Integrated)
4239
6. Integrating with CI
4340
7. Deploying django application in AWS
41+
42+
## Jun 9
43+
-
44+
45+
## Jun 10 and Jun 11
46+
47+
- Saturday went for jenkins meetup
48+
- Sunday had collaboration session with other streams
49+
50+
## Jun 12
51+
52+
- Worked on the frontend development
53+
- Started working on my portfolio
54+
55+
## Jun 13
56+
57+
- Code review changes implemented
58+
- Continue working on my portfolio
59+
60+
## Jun 14

0 commit comments

Comments
 (0)