Skip to content

Commit 104b398

Browse files
author
Puja0708
committed
package 0.0.1
1 parent eb44ec5 commit 104b398

File tree

12 files changed

+138
-2
lines changed

12 files changed

+138
-2
lines changed

django_comments/LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

django_comments/MANIFEST.in

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include README.rst
2+
include LICENSE.txt

django_comments/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Django Comments Module
2+
3+
To run:
4+
5+
```
6+
virtualenv env
7+
pip install -r requirements.txt
8+
./manage.py runserver
9+
```

django_comments/comments.json~

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"text": "sdfn", "author": "Author"}{"text": "dkhkdg", "author": "Author"}{"text": "dgbmsdgb", "author": "Author"}{"text": "fdgjd", "author": "Author"}{"text": "fd%2Cn%2C", "author": "Author"}{"text": "dshkh", "author": "Author"}{"text": "dfb", "author": "Author"}{"text": "fdn", "author": "Author"}{"text": "fdn", "author": "Author"}{"text": "dsfaf", "author": "Author"}
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from django.db import models
2+
3+
class Save_comments(models.Model):
4+
user_id = models.CharField(max_length=250)
5+
post_id = models.CharField(max_length=250)
6+
comment = models.CharField(max_length=500)
7+
8+
def __str__(self):
9+
return "user_id="+self.user_id+","+"comment="+self.comment+","+"post_id="+self.post_id
10+
11+
def save(self, *args, **kwargs):
12+
super(Save_comments, self).save(*args, **kwargs)
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from django.db import models
2+
3+
class Save_comments(models.Model):
4+
user_id = models.CharField(max_length=250)
5+
post_id = models.CharField(max_length=250)
6+
comment = models.CharField(max_length=500)
7+
8+
def __str__(self):
9+
return self.user_id+self.comment
10+
11+
def save(self, *args, **kwargs):
12+
super(Save_comments, self).save(*args, **kwargs)

django_comments/django_comments/views.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ def getComments(request):
4848
comments = []
4949
for obj in data:
5050
commentCurr = {
51-
"user_id": obj.user_id,
52-
"comment": obj.comment,
51+
"author": obj.user_id,
52+
"text": obj.comment,
5353
"post_id": obj.post_id,
5454
}
5555
comments.append(commentCurr)

django_comments/requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Django==1.8.4
2+
wsgiref==0.1.2

django_comments/setup.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

django_comments/setup.py

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
"""
2+
See:
3+
https://github.com/anistark/django-react-comments/tree/puja
4+
"""
5+
6+
from setuptools import setup, find_packages
7+
from codecs import open
8+
from os import path
9+
10+
here = path.abspath(path.dirname(__file__))
11+
12+
setup(
13+
name='django-react-comments',
14+
15+
version='0.0.1',
16+
17+
description='a django project with the comment system implemented in reactJS',
18+
19+
url='https://github.com/anistark/django-react-comments/tree/puja',
20+
21+
author=' ',
22+
author_email=' ',
23+
24+
license='MIT',
25+
26+
classifiers=[
27+
'Development Status :: 3 - Alpha',
28+
29+
# Indicate who your project is intended for
30+
'Intended Audience :: Developers',
31+
32+
'License :: MIT License',
33+
34+
'Programming Language :: Python :: 2',
35+
'Programming Language :: Python :: 2.6',
36+
'Programming Language :: Python :: 2.7',
37+
],
38+
39+
keywords='django commenting system in reactJS',
40+
41+
42+
packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
43+
44+
45+
install_requires=[ ],
46+
47+
48+
extras_require={
49+
50+
},
51+
52+
53+
package_data={
54+
55+
},
56+
57+
58+
data_files=[ ],
59+
60+
61+
entry_points={
62+
63+
},
64+
)
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[
2+
{
3+
"author": "Pete Hunt",
4+
"text": "Hey there!"
5+
},
6+
{
7+
"author": "Paul O’Shannessy",
8+
"text": "React is *great*!"
9+
}
10+
]
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"text": "sdfn", "author": "Author"}{"text": "dkhkdg", "author": "Author"}{"text": "dgbmsdgb", "author": "Author"}{"text": "fdgjd", "author": "Author"}{"text": "fd%2Cn%2C", "author": "Author"}{"text": "dshkh", "author": "Author"}{"text": "dfb", "author": "Author"}{"text": "fdn", "author": "Author"}{"text": "fdn", "author": "Author"}{"text": "dsfaf", "author": "Author"}

0 commit comments

Comments
 (0)