├── feed ├── __init__.py ├── migrations │ ├── __init__.py │ ├── 0022_delete_claimform.py │ ├── 0021_remove_report_item_slug.py │ ├── 0020_report_item_slug.py │ ├── 0015_auto_20180817_0229.py │ ├── 0018_auto_20180827_0436.py │ ├── 0019_auto_20180830_0314.py │ ├── 0012_auto_20180813_0051.py │ ├── 0009_auto_20180809_0140.py │ ├── 0002_auto_20180804_1610.py │ ├── 0017_auto_20180827_0433.py │ ├── 0003_auto_20180805_0533.py │ ├── 0010_report_item_owner.py │ ├── 0008_auto_20180809_0126.py │ ├── 0004_claimform.py │ ├── 0016_auto_20180820_2133.py │ ├── 0014_contacthelp.py │ ├── 0013_auto_20180815_0159.py │ ├── 0001_initial.py │ ├── 0007_auto_20180809_0045.py │ ├── 0011_usernotification.py │ ├── 0005_auto_20180807_1403.py │ └── 0006_auto_20180807_1840.py ├── tests.py ├── apps.py ├── templates │ ├── feed │ │ ├── social-login.html │ │ ├── base.html │ │ ├── form_template.html │ │ ├── login_user.html │ │ ├── report_item_confirm_delete.html │ │ ├── notification.html │ │ ├── loggedin.html │ │ ├── SignUp.html │ │ ├── usernotification_form.html │ │ ├── contacthelp_form.html │ │ ├── report_item_form.html │ │ ├── profile.html │ │ ├── detail.html │ │ ├── footer.html │ │ ├── index.html │ │ └── header.html │ ├── registration │ │ ├── form_login_template.html │ │ └── login.html │ └── static_page │ │ ├── our_team.html │ │ ├── about_us.html │ │ └── privacy.html ├── admin.py ├── forms.py ├── urls.py ├── models.py └── views.py ├── backmyitem ├── __init__.py ├── storage_backends.py ├── wsgi.py ├── urls.py └── settings.py ├── .gitignore ├── static ├── img │ ├── banner.jpg │ ├── fevicon.png │ └── backmyitem.png └── css │ └── base.css └── manage.py /feed/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backmyitem/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /feed/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /feed/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *~ 3 | __pycache__ 4 | myvenv 5 | myammaji 6 | .DS_Store 7 | .env 8 | -------------------------------------------------------------------------------- /static/img/banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spider-yamet/backmyitem/master/static/img/banner.jpg -------------------------------------------------------------------------------- /static/img/fevicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spider-yamet/backmyitem/master/static/img/fevicon.png -------------------------------------------------------------------------------- /static/img/backmyitem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spider-yamet/backmyitem/master/static/img/backmyitem.png -------------------------------------------------------------------------------- /feed/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class FeedConfig(AppConfig): 5 | name = 'feed' 6 | -------------------------------------------------------------------------------- /backmyitem/storage_backends.py: -------------------------------------------------------------------------------- 1 | from storages.backends.s3boto3 import S3Boto3Storage 2 | 3 | class MediaStorage(S3Boto3Storage): 4 | location = '/media' 5 | file_overwrite = False -------------------------------------------------------------------------------- /feed/templates/feed/social-login.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Continue With Google

4 |
5 | 6 |
-------------------------------------------------------------------------------- /feed/templates/feed/base.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | {% block title %} becomes someone's happiness {% endblock %} 4 | 5 | {% include "feed/header.html" %} 6 | {% block content%} 7 | 8 | {% endblock %} 9 | {% include "feed/footer.html" %} -------------------------------------------------------------------------------- /feed/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Report_item,UserNotification ,ContactHelp 4 | 5 | 6 | admin.site.register(Report_item) 7 | admin.site.register(UserNotification) 8 | admin.site.register(ContactHelp) 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /feed/templates/feed/form_template.html: -------------------------------------------------------------------------------- 1 | {% for field in form %} 2 |
3 |
4 | {{field.label_tag}} 5 |
6 |
7 | {{ field }} 8 |
9 |
10 | {% endfor %} -------------------------------------------------------------------------------- /feed/templates/registration/form_login_template.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{ form.username.label_tag }} 4 |
5 |
6 | {{ form.username }} 7 |
8 |
9 |
10 | {{ form.password.label_tag }} 11 |
12 |
13 | {{ form.password }} 14 |
15 |
16 | -------------------------------------------------------------------------------- /backmyitem/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for backmyitem project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "backmyitem.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /feed/migrations/0022_delete_claimform.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-09-06 00:31 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('feed', '0021_remove_report_item_slug'), 12 | ] 13 | 14 | operations = [ 15 | migrations.DeleteModel( 16 | name='ClaimForm', 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /feed/migrations/0021_remove_report_item_slug.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-30 00:35 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('feed', '0020_report_item_slug'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RemoveField( 16 | model_name='report_item', 17 | name='slug', 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /feed/templates/feed/login_user.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Login 5 | 6 | 7 |
8 | {% csrf_token %} 9 |

10 | 11 | 12 |

13 |

14 | 15 | 16 |

17 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /feed/templates/feed/report_item_confirm_delete.html: -------------------------------------------------------------------------------- 1 | {% extends 'feed/base.html'%} 2 | {% block title %} {{ title }} {% endblock %} 3 | 4 | {% block content %} 5 |
6 |
7 |
8 |
9 |
10 |
{% csrf_token %} 11 |

Are you sure you want to delete "{{ object }}"?

12 | 13 |
14 | 15 |
16 |
17 |
18 |
19 |
20 | {% endblock %} -------------------------------------------------------------------------------- /feed/migrations/0020_report_item_slug.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-29 22:54 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('feed', '0019_auto_20180830_0314'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='report_item', 17 | name='slug', 18 | field=models.SlugField(default='backmyitem-report', unique=True), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /feed/migrations/0015_auto_20180817_0229.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-16 20:59 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | import django.utils.timezone 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('feed', '0014_contacthelp'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='contacthelp', 18 | name='date', 19 | field=models.DateTimeField(default=django.utils.timezone.now), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /feed/migrations/0018_auto_20180827_0436.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-26 23:06 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('feed', '0017_auto_20180827_0433'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='report_item', 17 | name='location', 18 | field=models.CharField(help_text='*Enter the address and city where you found this item', max_length=255), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /feed/migrations/0019_auto_20180830_0314.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-29 21:44 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | import feed.models 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('feed', '0018_auto_20180827_0436'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='report_item', 18 | name='image', 19 | field=models.ImageField(default='add Item image', upload_to=feed.models.get_uplaod_file_name), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /feed/templates/static_page/our_team.html: -------------------------------------------------------------------------------- 1 | {% extends "feed/base.html" %} 2 | {% block title %} {{ title }} {% endblock %} 3 | {% block content %} 4 |
5 |
6 |
7 |
8 |

help us to make the world better place

9 |

10 |

Please Send me email at saifulcseng@gmail.com if you want to contribute in this project and become the part of someone happiness.

11 |
12 |
13 | 14 | 15 |
16 | 17 | 18 | {% endblock %} -------------------------------------------------------------------------------- /feed/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from django.contrib.auth.forms import UserCreationForm 3 | from django.contrib.auth.models import User 4 | from .models import Report_item 5 | 6 | class SignUpForm(UserCreationForm): 7 | class Meta: 8 | model = User 9 | fields = ('first_name','username','email','password1','password2') 10 | 11 | 12 | 13 | 14 | class LoginForm(UserCreationForm): 15 | class Meta: 16 | model = User 17 | fields = ('email','password1') 18 | 19 | 20 | 21 | class ReportForm(forms.ModelForm): 22 | class Meta: 23 | model = Report_item 24 | fields = ('title', 'item_type', 'location', 'image', 'Description') -------------------------------------------------------------------------------- /feed/migrations/0012_auto_20180813_0051.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-12 19:21 3 | from __future__ import unicode_literals 4 | 5 | from django.conf import settings 6 | from django.db import migrations, models 7 | import django.db.models.deletion 8 | 9 | 10 | class Migration(migrations.Migration): 11 | 12 | dependencies = [ 13 | ('feed', '0011_usernotification'), 14 | ] 15 | 16 | operations = [ 17 | migrations.AlterField( 18 | model_name='report_item', 19 | name='owner', 20 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /feed/migrations/0009_auto_20180809_0140.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-08 20:10 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('feed', '0008_auto_20180809_0126'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RemoveField( 16 | model_name='report_item', 17 | name='category', 18 | ), 19 | migrations.AlterField( 20 | model_name='report_item', 21 | name='title', 22 | field=models.CharField(help_text='*Title for the post e.g. item identity', max_length=255), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /feed/migrations/0002_auto_20180804_1610.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-04 10:40 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('feed', '0001_initial'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='report_item', 17 | name='city', 18 | field=models.CharField(default='city option', max_length=20), 19 | ), 20 | migrations.AlterField( 21 | model_name='report_item', 22 | name='location', 23 | field=models.CharField(max_length=60), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /feed/migrations/0017_auto_20180827_0433.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-26 23:03 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('feed', '0016_auto_20180820_2133'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RemoveField( 16 | model_name='report_item', 17 | name='city', 18 | ), 19 | migrations.AlterField( 20 | model_name='report_item', 21 | name='location', 22 | field=models.CharField(help_text='*Enter the address and city where you found this item', max_length=60), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /feed/migrations/0003_auto_20180805_0533.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-05 00:03 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('feed', '0002_auto_20180804_1610'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='report_item', 17 | name='image', 18 | field=models.FileField(default='add Item image', upload_to=''), 19 | ), 20 | migrations.AddField( 21 | model_name='report_item', 22 | name='publish', 23 | field=models.BooleanField(default=False), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /feed/migrations/0010_report_item_owner.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-09 00:06 3 | from __future__ import unicode_literals 4 | 5 | from django.conf import settings 6 | from django.db import migrations, models 7 | import django.db.models.deletion 8 | 9 | 10 | class Migration(migrations.Migration): 11 | 12 | dependencies = [ 13 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 14 | ('feed', '0009_auto_20180809_0140'), 15 | ] 16 | 17 | operations = [ 18 | migrations.AddField( 19 | model_name='report_item', 20 | name='owner', 21 | field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /feed/migrations/0008_auto_20180809_0126.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-08 19:56 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('feed', '0007_auto_20180809_0045'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='report_item', 17 | name='city', 18 | field=models.CharField(help_text='*Enter the city name', max_length=60), 19 | ), 20 | migrations.AlterField( 21 | model_name='report_item', 22 | name='title', 23 | field=models.CharField(help_text='*Enter the item name you found e.g. Marksheet,key,wallet', max_length=255), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "backmyitem.settings") 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError: 10 | # The above import may fail for some other reason. Ensure that the 11 | # issue is really that Django is missing to avoid masking other 12 | # exceptions on Python 2. 13 | try: 14 | import django 15 | except ImportError: 16 | raise ImportError( 17 | "Couldn't import Django. Are you sure it's installed and " 18 | "available on your PYTHONPATH environment variable? Did you " 19 | "forget to activate a virtual environment?" 20 | ) 21 | raise 22 | execute_from_command_line(sys.argv) 23 | -------------------------------------------------------------------------------- /feed/migrations/0004_claimform.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-05 09:44 3 | from __future__ import unicode_literals 4 | 5 | import django.core.validators 6 | from django.db import migrations, models 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('feed', '0003_auto_20180805_0533'), 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='ClaimForm', 18 | fields=[ 19 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 20 | ('Your_name', models.CharField(max_length=50)), 21 | ('Your_mobile_number', models.CharField(max_length=10, validators=[django.core.validators.RegexValidator('^\\d{1,10}$')])), 22 | ('Detail_proof', models.TextField()), 23 | ], 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /feed/migrations/0016_auto_20180820_2133.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-20 16:03 3 | from __future__ import unicode_literals 4 | 5 | import django.core.validators 6 | from django.db import migrations, models 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('feed', '0015_auto_20180817_0229'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='report_item', 18 | name='image', 19 | field=models.ImageField(default='add Item image', help_text='*Please uplocad a item image to identify by the owner', upload_to=''), 20 | ), 21 | migrations.AlterField( 22 | model_name='usernotification', 23 | name='Mobile_No', 24 | field=models.CharField(max_length=10, validators=[django.core.validators.RegexValidator('^\\d{1,10}$')]), 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /feed/migrations/0014_contacthelp.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-16 20:58 3 | from __future__ import unicode_literals 4 | 5 | import datetime 6 | from django.db import migrations, models 7 | from django.utils.timezone import utc 8 | 9 | 10 | class Migration(migrations.Migration): 11 | 12 | dependencies = [ 13 | ('feed', '0013_auto_20180815_0159'), 14 | ] 15 | 16 | operations = [ 17 | migrations.CreateModel( 18 | name='ContactHelp', 19 | fields=[ 20 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 21 | ('Name', models.CharField(max_length=250)), 22 | ('Email', models.EmailField(max_length=254)), 23 | ('query', models.TextField()), 24 | ('date', models.DateTimeField(default=datetime.datetime(2018, 8, 16, 20, 58, 5, 668518, tzinfo=utc))), 25 | ], 26 | ), 27 | ] 28 | -------------------------------------------------------------------------------- /feed/migrations/0013_auto_20180815_0159.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-14 20:29 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | import django.utils.timezone 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('feed', '0012_auto_20180813_0051'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterModelOptions( 17 | name='usernotification', 18 | options={'ordering': ['-date']}, 19 | ), 20 | migrations.AddField( 21 | model_name='usernotification', 22 | name='date', 23 | field=models.DateTimeField(default=django.utils.timezone.now), 24 | ), 25 | migrations.AlterField( 26 | model_name='report_item', 27 | name='Description', 28 | field=models.TextField(blank=True, help_text='*Enter full description about item', null=True), 29 | ), 30 | ] 31 | -------------------------------------------------------------------------------- /feed/templates/feed/notification.html: -------------------------------------------------------------------------------- 1 | 2 | {% extends 'feed/base.html' %} 3 | {% block title %} {{ title }} {% endblock %} 4 | 5 | {% block content %} 6 |
7 |
8 | 9 |
10 |
11 |
12 |
13 | 14 |

Please return the item only with valid proof

15 |
16 |
17 | 18 | 19 | 20 | 21 |
Person Name
{{ n.Name }}
Mobile Number
{{ n.Mobile_No }}
Proof
{{ n.Proof }}
22 | 23 |
24 |
25 |
26 | 27 |
28 |
29 | {% endblock %} -------------------------------------------------------------------------------- /feed/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-04 10:20 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | import django.utils.timezone 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | initial = True 12 | 13 | dependencies = [ 14 | ] 15 | 16 | operations = [ 17 | migrations.CreateModel( 18 | name='Report_item', 19 | fields=[ 20 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 21 | ('item_name', models.CharField(max_length=20)), 22 | ('location', models.CharField(max_length=40)), 23 | ('date', models.DateTimeField(default=django.utils.timezone.now)), 24 | ('category', models.CharField(max_length=20)), 25 | ('Description', models.TextField(default='lost item desciption')), 26 | ], 27 | options={ 28 | 'ordering': ['-date'], 29 | }, 30 | ), 31 | ] 32 | -------------------------------------------------------------------------------- /feed/templates/feed/loggedin.html: -------------------------------------------------------------------------------- 1 | {% extends 'feed/base.html' %} 2 | {% block title %} {{ title }} {% endblock %} 3 | 4 | {% block content %} 5 |
6 |
7 | 8 |
9 |
10 | {% if notification %} 11 |
12 | 13 |

{{ full_name }} Click on the link to contact the person

14 |
15 |
16 | {% for n in notification %} 17 | 20 | {% endfor %} 21 | {% else %} 22 |
23 | 24 |

You do not have any notification

25 |
26 |
27 | {% endif %} 28 |
29 |
30 |
31 | 32 |
33 | 34 | {% endblock %} -------------------------------------------------------------------------------- /feed/migrations/0007_auto_20180809_0045.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-08 19:15 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('feed', '0006_auto_20180807_1840'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RemoveField( 16 | model_name='report_item', 17 | name='item_name', 18 | ), 19 | migrations.AddField( 20 | model_name='report_item', 21 | name='item_type', 22 | field=models.CharField(default='', help_text='*Enter the item name you found e.g. Marksheet,key,wallet', max_length=100), 23 | ), 24 | migrations.AddField( 25 | model_name='report_item', 26 | name='title', 27 | field=models.TextField(default='', help_text='*Enter the item name you found e.g. Marksheet,key,wallet'), 28 | ), 29 | migrations.AlterField( 30 | model_name='report_item', 31 | name='city', 32 | field=models.CharField(help_text='*Enter the city name', max_length=20), 33 | ), 34 | ] 35 | -------------------------------------------------------------------------------- /feed/migrations/0011_usernotification.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-11 22:04 3 | from __future__ import unicode_literals 4 | 5 | from django.conf import settings 6 | import django.core.validators 7 | from django.db import migrations, models 8 | import django.db.models.deletion 9 | 10 | 11 | class Migration(migrations.Migration): 12 | 13 | dependencies = [ 14 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 15 | ('feed', '0010_report_item_owner'), 16 | ] 17 | 18 | operations = [ 19 | migrations.CreateModel( 20 | name='UserNotification', 21 | fields=[ 22 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 23 | ('Name', models.CharField(max_length=250)), 24 | ('Mobile_No', models.IntegerField(validators=[django.core.validators.MaxValueValidator(9999999999)])), 25 | ('Proof', models.TextField()), 26 | ('viewed', models.BooleanField(default=False)), 27 | ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), 28 | ], 29 | ), 30 | ] 31 | -------------------------------------------------------------------------------- /feed/migrations/0005_auto_20180807_1403.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-07 08:33 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | import django.utils.timezone 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('feed', '0004_claimform'), 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='Report', 18 | fields=[ 19 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 20 | ('item_name', models.CharField(max_length=60)), 21 | ('location', models.CharField(max_length=60)), 22 | ('city', models.CharField(max_length=20)), 23 | ('Description', models.TextField()), 24 | ('image', models.FileField(upload_to='')), 25 | ('date', models.DateTimeField(default=django.utils.timezone.now)), 26 | ], 27 | options={ 28 | 'ordering': ['-date'], 29 | }, 30 | ), 31 | migrations.AlterField( 32 | model_name='report_item', 33 | name='Description', 34 | field=models.TextField(), 35 | ), 36 | migrations.AlterField( 37 | model_name='report_item', 38 | name='item_name', 39 | field=models.CharField(max_length=60), 40 | ), 41 | ] 42 | -------------------------------------------------------------------------------- /feed/templates/feed/SignUp.html: -------------------------------------------------------------------------------- 1 | {% extends 'feed/base.html'%} 2 | {% block title %} {{ title }} {% endblock %} 3 | 4 | {% block content %} 5 | {% if user.is_authenticated %} 6 |

You are logged in

7 | {% else %} 8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | 16 |

Sign Up to becomes someone's happiness

17 |
18 |
19 |
20 | {% csrf_token %} 21 | {% if form.errors %} 22 |

{{ form.errors }}

23 | {% endif %} 24 | {% include 'feed/form_template.html'%} 25 |
26 |
27 |
28 |
29 | 30 |
31 | 32 | 33 |
34 |
35 | 36 |
37 | 38 | {% include "feed/social-login.html" %} 39 |
40 | 41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | {% endif %} 49 | {% endblock %} 50 | -------------------------------------------------------------------------------- /feed/templates/feed/usernotification_form.html: -------------------------------------------------------------------------------- 1 | {% extends 'feed/base.html'%} 2 | {% block title %} {{ title }} {% endblock %} 3 | 4 | {% block content %} 5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | 13 |

Please fill this form

14 |
15 |
16 |
17 | {% csrf_token %} 18 | {% if form.errors %} 19 |

{{ form.errors }}

20 | {% endif %} 21 | {% include 'feed/form_template.html'%} 22 |
23 |
24 |
25 |
26 | {% if user.is_authenticated %} 27 | 28 | {% else %} 29 | 30 |

*Please loginto request yout item

31 | {% endif %} 32 |
33 | 34 | 35 |
36 | 37 |
38 | 39 |
40 |
41 | 42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | {% endblock %} -------------------------------------------------------------------------------- /feed/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import url 2 | from . import views 3 | from django.contrib.auth.views import LoginView 4 | 5 | 6 | app_name = 'feed' 7 | urlpatterns = [ 8 | url(r'^$', views.IndexView, name='index'), 9 | url(r'^report$', views.ReportCreate.as_view(), name='report'), 10 | url(r'^detail/(?P[0-9]+)/$', views.ReportDetail.as_view(), name='detail'), 11 | url(r'^category/(?P\w+)/$', views.SearchItemType.as_view(), name='category'), 12 | url(r'^signup$', views.SignUpForm.as_view(), name='signup'), 13 | url(r'^login$', views.LoginForm.as_view(), name='login'), 14 | 15 | url(r'^logout$', views.logout_view, name='logout'), 16 | url(r'^u/(?P\w+)/$', views.Profile, name='profile'), 17 | url(r'^update/(?P[0-9]+)/$', views.ReportUpdate.as_view(), name='report-update'), 18 | url(r'^delete/(?P[0-9]+)/$', views.ReportDelete.as_view(), name='report-delete'), 19 | 20 | 21 | # notification 22 | 23 | url(r'^notification/$', views.mynotification, name='mynotification'), 24 | url(r'^read_notification/$', views.read_Notification, name='readnotification'), 25 | url(r'^notification/show/(?P\d+)/$', views.show_notification, name='show_notification'), 26 | url(r'^notification/read/(?P\d+)/$', views.read_notification, name='read_notification'), 27 | url(r'^notification/request/(?P[0-9]+)/$', views.RequestItem.as_view(), name='request'), 28 | 29 | 30 | #static pages 31 | url(r'^about/$', views.home_page, name='about'), 32 | url(r'^contact/$', views.Contact_page.as_view(), name='contact'), 33 | url(r'^team/$', views.TeamPage , name='team'), 34 | url(r'^privacy/$', views.privacy_page, name='privacy'), 35 | 36 | 37 | ] -------------------------------------------------------------------------------- /feed/templates/registration/login.html: -------------------------------------------------------------------------------- 1 | {% extends "feed/base.html" %} 2 | {% block title %} Login to BackMyItem{% endblock %} 3 | {% block content %} 4 |
5 |
6 | 7 |
8 |
9 |
10 |
11 |

Login to becomes someone's happiness

12 |
13 | 14 |
15 | {% csrf_token %} 16 | {% if form.errors %} 17 |

{{ form.errors }}

18 | {% endif %} 19 | {% include 'registration/form_login_template.html'%}
20 |
21 |
22 |
23 | 24 | 25 |


26 | 27 | 28 |
29 |

30 | {% include "feed/social-login.html" %} 31 |

32 | 33 | 34 |
35 |

36 |
37 |
38 |
39 |

Don't have an account?   Sign up

40 |
41 | 42 |
43 | 44 | 45 | 46 |
47 |
48 | 49 |
50 | 51 |
52 |
53 |




54 | 55 | {% endblock %} 56 | 57 | -------------------------------------------------------------------------------- /feed/migrations/0006_auto_20180807_1840.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11 on 2018-08-07 13:10 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('feed', '0005_auto_20180807_1403'), 12 | ] 13 | 14 | operations = [ 15 | migrations.DeleteModel( 16 | name='Report', 17 | ), 18 | migrations.AlterField( 19 | model_name='report_item', 20 | name='Description', 21 | field=models.TextField(help_text='*Enter full description about item'), 22 | ), 23 | migrations.AlterField( 24 | model_name='report_item', 25 | name='category', 26 | field=models.CharField(max_length=50), 27 | ), 28 | migrations.AlterField( 29 | model_name='report_item', 30 | name='city', 31 | field=models.CharField(default='city option', help_text='*Enter the city name', max_length=20), 32 | ), 33 | migrations.AlterField( 34 | model_name='report_item', 35 | name='image', 36 | field=models.FileField(default='add Item image', help_text='*Please uplocad a item image to identify by the owner', upload_to=''), 37 | ), 38 | migrations.AlterField( 39 | model_name='report_item', 40 | name='item_name', 41 | field=models.CharField(help_text='*Enter the item name you found e.g. Marksheet,key,wallet', max_length=50), 42 | ), 43 | migrations.AlterField( 44 | model_name='report_item', 45 | name='location', 46 | field=models.CharField(help_text='*Enter the address/street where you find this item', max_length=60), 47 | ), 48 | ] 49 | -------------------------------------------------------------------------------- /feed/templates/feed/contacthelp_form.html: -------------------------------------------------------------------------------- 1 | {% extends 'feed/base.html'%} 2 | {% block title %} Contact Us - BackMyItem {% endblock %} 3 | 4 | {% block content %} 5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | What can we help you with? 13 |

14 |
15 | {% csrf_token %} 16 | {% if form.errors %} 17 |

{{ form.errors }}

18 | {% endif %} 19 | {% include 'feed/form_template.html'%} 20 |
21 |
22 |
23 |
24 | 25 |
26 | 27 | 28 |
29 |
30 | 31 |
32 |
33 |
34 |
35 |
36 | 37 | 38 | 39 | 40 | 41 | 42 |
Mailing Address
Address:Home 19,Top Khana Road,Rampur,UP,India
Phone+91 8826478938
Emailbackmyitem@gmail.com
43 |
44 |
45 |
46 |
47 |
48 |
49 | {% endblock %} -------------------------------------------------------------------------------- /feed/templates/feed/report_item_form.html: -------------------------------------------------------------------------------- 1 | {% extends 'feed/base.html'%} 2 | {% block title %} Report the item you found {% endblock %} 3 | 4 | {% block content %} 5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | 13 |

Congrats! You are going to become someone's happiness.

14 |
15 |
16 |
17 | {% csrf_token %} 18 | {% include 'feed/form_template.html'%} 19 | {% if not user.is_authenticated %} 20 |
21 |
22 |
23 |
24 |

*Please login first to submit report

25 |
26 |
27 | {% endif %} 28 | {% if user.is_authenticated %} 29 |
30 |
31 |
32 |
33 |

34 |
35 |
36 | {% else %} 37 |
38 |
39 |
40 |

41 |
42 | {% endif %} 43 |
44 | 45 | 46 | 47 |
48 |
49 | 50 |
51 |
52 |
53 |
54 |
55 |
56 | {% endblock %} 57 | -------------------------------------------------------------------------------- /backmyitem/urls.py: -------------------------------------------------------------------------------- 1 | """backmyitem URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/1.11/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.conf.urls import url, include 14 | 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) 15 | """ 16 | from django.conf.urls import url, include 17 | from django.contrib import admin 18 | from django.conf.urls.static import static 19 | 20 | from django.contrib.auth.views import LoginView 21 | from django.contrib.auth.views import password_reset, password_reset_done, password_reset_confirm, \ 22 | password_reset_complete 23 | from django.contrib.auth import views as auth_views 24 | from django.conf.urls.static import static 25 | from . import settings 26 | 27 | urlpatterns = [ 28 | url(r'^admin/', admin.site.urls), 29 | url(r'^auth/', include('social_django.urls', namespace='social')), # <- Here 30 | url(r'^', include('feed.urls')), 31 | url(r'^login/$', LoginView.as_view(), name="login"), 32 | url(r'change-password/', 33 | auth_views.PasswordChangeView.as_view(template_name='registration/password_change_form.html'), ), 34 | url(r'^password_reset/$', password_reset, name='password_reset_reset1'), 35 | url(r'^password_reset/done/$', password_reset_done, name='password_reset_done'), 36 | url(r'^reset/(?P[0-9A-Za-z_\-]+)/(?P[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', 37 | password_reset_confirm, name='password_reset_confirm'), 38 | url(r'^reset/done/$', password_reset_complete, name='password_reset_complete'), 39 | 40 | 41 | ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) 42 | 43 | if settings.DEBUG: 44 | urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) 45 | urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 46 | -------------------------------------------------------------------------------- /feed/templates/feed/profile.html: -------------------------------------------------------------------------------- 1 | {% extends "feed/base.html" %} 2 | {% block title %} {{ title }} {% endblock %} 3 | 4 | {% block content %} 5 |
6 |
7 |
8 |
9 | 10 |

Hello   {{ user.first_name }}   Thanks to make the world a better place


11 |

Your's content

12 |
13 |
14 | 15 | {% for obj in object_list %} 16 |
17 |
18 |
19 | 20 | 21 | 22 | 23 | 24 |
Title
{{ obj.title }}
Item Type
{{ obj.item_type }}
Location
{{ obj.location }}

{% if obj.publish is False%}Your Post is in review{% endif %}

25 |
26 |
27 | backmyitem 28 |

Posted Date
{{ obj.date }}

29 |
30 |
31 | 32 | 35 | 38 | 41 | 42 |
33 | Read_More 34 | 36 | Edit 37 | 39 | Trash 40 |
43 | 44 |
45 | {% endfor %} 46 | 47 |
48 | 49 |
50 | 51 |
52 | 53 | 54 |
55 | 56 |
57 |
58 |
59 | {% endblock %} -------------------------------------------------------------------------------- /feed/templates/feed/detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'feed/base.html'%} 2 | {% block title %} {{ object.title }} {% endblock %} 3 | 4 | 5 | {% block content %} 6 | 7 |
8 |
9 |
10 |
11 |
12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
Title
{{ object.title }}
Location
{{ object.location }}
Date
{{ object.date }}
Description
{{ object.Description }}
Image{% if object.image%}backmyitem {% endif %}
21 |
22 |
23 | 24 | 25 | 32 | 38 | 39 | 40 | 41 | 42 | 43 |
44 | 45 | 46 |
47 |

Click on Request to return Button if this is your item

48 |
49 |
50 |
51 | 52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | 64 | 65 |
66 | 67 |
68 | {% endblock %} -------------------------------------------------------------------------------- /feed/models.py: -------------------------------------------------------------------------------- 1 | from django.core.files.uploadedfile import InMemoryUploadedFile 2 | from django.core.validators import RegexValidator 3 | from django.db import models 4 | from django.utils import timezone 5 | from django.core.urlresolvers import reverse 6 | from django import forms 7 | from django.conf import settings 8 | from django.core.validators import MaxValueValidator 9 | from django.db import models 10 | from django.contrib.auth.models import User 11 | from PIL import Image 12 | from io import BytesIO 13 | import sys 14 | 15 | 16 | def get_uplaod_file_name(image, filename): 17 | return u'photos/%s/%s_%s' % (str(image.owner), 18 | str(timezone.now()).replace('.', '_'), 19 | filename) 20 | 21 | 22 | class Report_item(models.Model): 23 | owner = models.ForeignKey(settings.AUTH_USER_MODEL) 24 | title = models.CharField(max_length=255, help_text='*Title for the post e.g. item identity') 25 | item_type = models.CharField(default="", max_length=100, 26 | help_text='*Enter the item name you found e.g. Marksheet,key,wallet') 27 | location = models.CharField(max_length=255, help_text='*Enter the address and city where you found this item') 28 | date = models.DateTimeField(default=timezone.now) 29 | Description = models.TextField(blank=True, null=True, help_text='*Enter full description about item') 30 | publish = models.BooleanField(default=False) 31 | 32 | image = models.ImageField(default="add Item image", 33 | upload_to=get_uplaod_file_name) 34 | 35 | def save(self): 36 | im = Image.open(self.image) 37 | output = BytesIO() 38 | im = im.resize((500, 500)) 39 | 40 | im.save(output, format='PNG', optimize=True, quality=95) 41 | output.seek(0) 42 | 43 | self.image = InMemoryUploadedFile(output, 'ImageField', "%s.png" % self.image.name.split('.')[0], 'image/jpeg', 44 | sys.getsizeof(output), None) 45 | 46 | super(Report_item, self).save() 47 | 48 | def __str__(self): 49 | return self.title + " " + str(self.publish) 50 | 51 | def get_absolute_url(self): 52 | return reverse('feed:detail', kwargs={'pk': self.pk}) 53 | 54 | class Meta: 55 | ordering = ["-date"] 56 | 57 | 58 | 59 | class UserNotification(models.Model): 60 | Name = models.CharField(max_length=250) 61 | Mobile_No = models.CharField(max_length=10, validators=[RegexValidator(r'^\d{1,10}$')]) 62 | Proof = models.TextField() 63 | viewed = models.BooleanField(default=False) 64 | user = models.ForeignKey(User) 65 | date = models.DateTimeField(default=timezone.now) 66 | 67 | def __str__(self): 68 | return self.Name 69 | 70 | class Meta: 71 | ordering = ["-date"] 72 | 73 | 74 | class ContactHelp(models.Model): 75 | Name = models.CharField(max_length=250) 76 | Email = models.EmailField(blank=False, null=False) 77 | query = models.TextField(blank=False, null=False) 78 | date = models.DateTimeField(default=timezone.now) 79 | 80 | def __str__(self): 81 | return self.query 82 | 83 | # Create your models here. 84 | -------------------------------------------------------------------------------- /feed/templates/static_page/about_us.html: -------------------------------------------------------------------------------- 1 | {% extends "feed/base.html" %} 2 | {% block title %} {{ title }} {% endblock %} 3 | {% block content %} 4 |
5 |
6 |
7 |
8 |
9 |

We believe to make the world a better place to live by helping each other

10 |
11 | 12 | 13 |
14 | 15 |
16 |

17 | BackMyItem is a web application where your lost item will be publish by an unknown user. You can connect to that user from this application. 18 |

19 |
20 |

21 | In this fast world we forget our item like documents, keys, cards, wallets, purse , resport card , passport etc at public places like train, malls, shops, Government and private offices etc but once we lost it then it becomes very hard for us to retrieve the item. 22 |

23 |
24 |

25 | If someone find your's item and if he wants to return the item to the owner then it becomes impossible by him to communicate with the owner of the item or to identify the real owner of the unclaimed stuff because an item like keys never talks to us. 26 |


27 |

28 | 29 | Why should BackMyItem exist? 30 |

31 |
32 |

33 | In this platform, if you find any unclaimed stuff like documents, keys, wallets, purse, gadgets or any other item then you can report that item in our platform. First, the report will be verify by the BackMyItem team to avoid the misleading data from the naughty user. Once verify then it will be publish on our home page. 34 |

35 |
36 |

How to use BackMyItem?

37 |
38 |

39 | First, you need to create your account on our platform. After signing, if you find any lost stuff of someone then you can report the item from report page. Once, you have reported then it will be added in our database. Our team shortly review the report and publish it on the homepage.

40 |
41 |

The Home page section of our platform is open to all. If the real owner of the item find his lost item on our home page then he can request you to return the item. He will fill the form for his item and provide some additional proof. Now, it’s your chance. Once the owner requested for the item you will get the notification. Through notification you can view the proof provided by the owner. You have to cross check the proof provided in notification with the item. If this is verifiable then you can call him on the number provided by the owner. 42 |

43 |
44 |

It is very nobel cause to return the someone item and become his happiness. Who knows the useless item you find on road can solve the 100 problem of the owner.

45 |
46 |
47 | 52 |
53 | 54 |
55 |
56 | 57 | 58 | 59 |
60 | 61 | 62 | {% endblock %} -------------------------------------------------------------------------------- /feed/templates/feed/footer.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 | 11 |
12 |
13 | 18 |
19 |
20 | 28 |
29 |
30 |
31 |
32 | 33 |
34 |
35 |

©2019, backmyitem

36 |
37 |
38 | 39 |
40 |
41 | 42 |
43 |
44 |
45 | 46 | 47 | 70 | 71 | 72 | 73 | 74 | 79 | 85 | 87 |
88 | 96 | 104 | 105 | 108 | 109 | 110 | 114 | 115 | 116 | 137 | 138 | -------------------------------------------------------------------------------- /feed/templates/feed/index.html: -------------------------------------------------------------------------------- 1 | 2 | {% extends "feed/base.html" %} 3 | {% block content %} 4 |
5 |
6 |
7 | {% for obj in object_list %} 8 |
9 |
10 |
11 | 12 | 13 | 14 | 15 | 16 |
Title
{{ obj.title }}
Item Type
{{ obj.item_type }}
Location
{{ obj.location }}
17 |
18 |
19 | backmyitem 20 |

Posted Date
{{ obj.date }}

21 |
22 |
23 |
24 |
25 | More Detail 26 |
27 |
28 |
29 | {% endfor %} 30 | 31 | 48 | 49 |
50 | 51 | 52 | 83 | 84 | 85 |
86 |
87 | 88 |

Change your language

89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 | 112 | {% endblock %} -------------------------------------------------------------------------------- /feed/templates/feed/header.html: -------------------------------------------------------------------------------- 1 | {% load staticfiles %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 109 |
110 |
111 |
112 | FindMyItem 113 |
114 |
115 | 116 | 117 | 118 | 119 | {% if not user.is_authenticated %} 120 | 121 | 122 | {% else %} 123 | 124 | 125 | {% endif %} 126 | {% if not user.is_authenticated %} 127 | 128 | {% else %} 129 | 130 | {% endif %} 131 | 132 | 133 |
  Home  Report Notifs Notifs({{ count }})  Login {{ user.username }}
134 | 135 |
136 |
-------------------------------------------------------------------------------- /backmyitem/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for backmyitem project. 3 | 4 | Generated by 'django-admin startproject' using Django 1.11. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.11/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/1.11/ref/settings/ 11 | """ 12 | 13 | import os 14 | from decouple import config 15 | 16 | 17 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 18 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 19 | 20 | # Quick-start development settings - unsuitable for production 21 | # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ 22 | 23 | # SECURITY WARNING: keep the secret key used in production secret! 24 | # SECRET_KEY = 'hu=x&fy*+)9z*^$n+2h=+g%4bx!gn%*xylu__+_p%(w+mwqq)3' 25 | SECRET_KEY = os.getenv('SECRET_KEY'), 26 | 27 | EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' 28 | 29 | # SECURITY WARNING: don't run with debug turned on in production! 30 | DEBUG = config('DEBUG', cast=bool) 31 | 32 | ALLOWED_HOSTS = ['127.0.0.1', 'backmyitem.com','atque.serveo.net'] 33 | 34 | # Application definition 35 | 36 | INSTALLED_APPS = [ 37 | 'django.contrib.admin', 38 | 'django.contrib.auth', 39 | 'django.contrib.contenttypes', 40 | 'django.contrib.sessions', 41 | 'django.contrib.messages', 42 | 'django.contrib.staticfiles', 43 | 'feed', 44 | 'storages', 45 | 'social_django', 46 | ] 47 | 48 | MIDDLEWARE = [ 49 | 'django.middleware.security.SecurityMiddleware', 50 | 'django.contrib.sessions.middleware.SessionMiddleware', 51 | 'django.middleware.common.CommonMiddleware', 52 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 53 | 'django.contrib.messages.middleware.MessageMiddleware', 54 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 55 | ] 56 | 57 | ROOT_URLCONF = 'backmyitem.urls' 58 | 59 | TEMPLATES = [ 60 | { 61 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 62 | 'DIRS': [os.path.join(BASE_DIR, 'templates')], 63 | 'APP_DIRS': True, 64 | 'OPTIONS': { 65 | 'context_processors': [ 66 | 'django.template.context_processors.debug', 67 | 'django.template.context_processors.request', 68 | 'django.contrib.auth.context_processors.auth', 69 | 'django.contrib.messages.context_processors.messages', 70 | 'feed.views.notification_context', 71 | 'feed.views.api_context', 72 | 'social_django.context_processors.backends', # <- Here 73 | 'social_django.context_processors.login_redirect', 74 | ], 75 | 76 | }, 77 | }, 78 | 79 | ] 80 | 81 | AUTHENTICATION_BACKENDS = ( 82 | 'social_core.backends.open_id.OpenIdAuth', # for Google authentication 83 | 'social_core.backends.google.GoogleOpenId', # for Google authentication 84 | 'social_core.backends.google.GoogleOAuth2', # for Google authentication 85 | 'social_core.backends.facebook.FacebookOAuth2', # for Facebook authentication 86 | 'django.contrib.auth.backends.ModelBackend', 87 | ) 88 | 89 | WSGI_APPLICATION = 'backmyitem.wsgi.application' 90 | 91 | # Database 92 | # https://docs.djangoproject.com/en/1.11/ref/settings/#databases 93 | 94 | DATABASES = { 95 | 'default': { 96 | 'ENGINE': 'django.db.backends.postgresql_psycopg2', 97 | 'NAME': config('DB_NAME'), 98 | 'USER': config('DB_USER'), 99 | 'PASSWORD': config('DB_PASSWORD'), 100 | 'HOST': config('DB_HOST'), 101 | 'PORT': config('DB_PORT'), 102 | } 103 | } 104 | 105 | # Password validation 106 | # https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators 107 | 108 | AUTH_PASSWORD_VALIDATORS = [ 109 | { 110 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 111 | }, 112 | { 113 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 114 | }, 115 | { 116 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 117 | }, 118 | { 119 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 120 | }, 121 | ] 122 | 123 | # Internationalization 124 | # https://docs.djangoproject.com/en/1.11/topics/i18n/ 125 | LOGIN_REDIRECT_URL = '/report' 126 | 127 | LANGUAGE_CODE = 'en-us' 128 | 129 | TIME_ZONE = 'Asia/Kolkata' 130 | 131 | USE_I18N = True 132 | 133 | USE_L10N = True 134 | 135 | USE_TZ = True 136 | 137 | # Static files (CSS, JavaScript, Images) 138 | # https://docs.djangoproject.com/en/1.11/howto/static-files/ 139 | EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' 140 | EMAIL_HOST = 'smtp.gmail.com' 141 | EMAIL_PORT = config('EMAIL_PORT') 142 | EMAIL_HOST_USER = config('EMAIL_HOST_USER') 143 | EMAIL_HOST_PASSWORD = config('EMAIL_HOST_PASSWORD') 144 | SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = config('SOCIAL_AUTH_GOOGLE_OAUTH2_KEY') 145 | SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = config('SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET') 146 | SOCIAL_AUTH_FACEBOOK_KEY = config('SOCIAL_AUTH_FACEBOOK_KEY') 147 | SOCIAL_AUTH_FACEBOOK_SECRET = config('SOCIAL_AUTH_FACEBOOK_SECRET') 148 | SOCIAL_AUTH_FACEBOOK_SCOPE = ['email'] 149 | 150 | 151 | STATIC_ROOT = os.path.join(BASE_DIR, "..", "static") 152 | STATIC_URL = '/static/' 153 | 154 | MEDIA_ROOT = os.path.join(BASE_DIR, "..", "media") 155 | MEDIA_URL = '/media/' 156 | 157 | 158 | 159 | 160 | STATICFILES_DIRS = [ 161 | os.path.join(BASE_DIR, 'static'), 162 | ] 163 | 164 | 165 | 166 | AWS_ACCESS_KEY_ID = config('AWS_ACCESS_KEY_ID') 167 | AWS_SECRET_ACCESS_KEY = config('AWS_SECRET_ACCESS_KEY') 168 | AWS_STORAGE_BUCKET_NAME = config('AWS_STORAGE_BUCKET_NAME') 169 | 170 | AWS_S3_CUSTOM_DOMAIN = '%s.s3.amazonaws.com' % AWS_STORAGE_BUCKET_NAME 171 | 172 | AWS_S3_OBJECT_PARAMETERS = { 173 | 'CacheControl': 'max-age=86400', 174 | } 175 | 176 | AWS_LOCATION = config('AWS_LOCATION') 177 | STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' 178 | STATIC_URL = "https://%s/%s/" % (AWS_S3_CUSTOM_DOMAIN, AWS_LOCATION) 179 | 180 | DEFAULT_FILE_STORAGE = config('DEFAULT_FILE_STORAGE') 181 | 182 | LOGIN_URL = 'login' 183 | LOGIN_REDIRECT_URL = '/' 184 | 185 | -------------------------------------------------------------------------------- /static/css/base.css: -------------------------------------------------------------------------------- 1 | .notify-table{ 2 | width:300px; 3 | } 4 | #search-bar input[type=text] { 5 | width: 70%; 6 | box-sizing: border-box; 7 | border: 2px solid #ccc; 8 | border-radius: 4px; 9 | font-size: 12px; 10 | background-color: white; 11 | background-image: url(''); 12 | background-position: 10px 10px; 13 | background-repeat: no-repeat; 14 | 15 | -webkit-transition: width 0.4s ease-in-out; 16 | transition: width 0.4s ease-in-out; 17 | } 18 | 19 | #search-bar input[type=text]:focus { 20 | width: 100%; 21 | } 22 | .form-td{ 23 | width:100%; 24 | margin:-5px; 25 | padding:-10px; 26 | } 27 | .profile-btn-div{ 28 | margin-left:5%; 29 | margin-top:5%; 30 | 31 | } 32 | .signup-thumbnail{ 33 | padding-right:5%; 34 | } 35 | .thumbnail-center{ 36 | text-align:center; 37 | margin-top:10%; 38 | margin-bottom:10%; 39 | font-weight:bold; 40 | color:#BDBDBD; 41 | } 42 | 43 | .thumbnail-center-profile{ 44 | text-align:center; 45 | margin-top:2%; 46 | margin-bottom:2%; 47 | font-weight:bold; 48 | color:#BDBDBD; 49 | } 50 | .logo { 51 | padding-left:20%; 52 | padding-right:15%; 53 | padding-top:10%; 54 | text-align: center; 55 | color:#AA2200; 56 | font-weight: bold; 57 | font-size: 40px; 58 | font-family: "Times New Roman", Times, serif; 59 | word-spacing: 3px; 60 | } 61 | .logo{ 62 | width:15%; 63 | height:80%; 64 | } 65 | .more-detail-button{ 66 | text-align: center; 67 | color:#AA2200; 68 | } 69 | .more-detail-div{ 70 | text-align: center; 71 | } 72 | 73 | .mynav , .navbar-default { 74 | background-color: #FFFFFF!important; 75 | border-color: #E7E7E7; 76 | } 77 | .mynav{ 78 | height: 50%; 79 | } 80 | 81 | body { 82 | background-color: #F8F8F8!important; 83 | margin-top: 65px; 84 | padding-top: 65px; 85 | } 86 | .navbar-brand{ 87 | color:#AA2200!important; 88 | font-weight: bold; 89 | font-size: 30px !important; 90 | font-style: italic; 91 | } 92 | td {border: 0;} 93 | .mytable{ 94 | border-collapse: separate; 95 | border-spacing: 15px 1px !important; 96 | border: 0px !important; 97 | 98 | } 99 | .pagination-table{ 100 | border-collapse: separate; 101 | border-spacing: 10px 10px; 102 | border: 0px !important; 103 | 104 | } 105 | 106 | .pagination-table tr td button, .pagination-table tr td a { 107 | 108 | font-size: 10px; 109 | border-radius: 8px; 110 | color:white; 111 | font-weight: 700; 112 | 113 | } 114 | .btn-block { 115 | 116 | padding: 10% 0; 117 | 118 | } 119 | 120 | 121 | .my-td-item{ 122 | color:#AA2200; 123 | width:20%; 124 | font-weight:bold; 125 | } 126 | 127 | .my-report-form{ 128 | 129 | padding-right:5%; 130 | padding-left:5%; 131 | } 132 | 133 | 134 | label { 135 | padding: 2px 2px 2px 0; 136 | display: inline-block; 137 | } 138 | .signupdiv{ 139 | 140 | text-align:center; 141 | margin-top:2px; 142 | padding-top:10px; 143 | } 144 | input[type=submit] { 145 | background-color: #0693cd; 146 | 147 | border: 0; 148 | border-radius: 5px; 149 | cursor: pointer; 150 | color: #fff; 151 | font-size:16px; 152 | font-weight: bold; 153 | line-height: 1.4; 154 | padding: 6px; 155 | width: 100%; 156 | 157 | } 158 | 159 | .my-td-item-notf{ 160 | padding-left:10%; 161 | } 162 | 163 | input[type=submit]:hover { 164 | background-color: #45a049; 165 | } 166 | 167 | .login-btn{ 168 | width:100%; 169 | margin: auto; 170 | 171 | } 172 | .reset{ 173 | text-align:center; 174 | } 175 | .request-btn{ 176 | width:80%; 177 | padding:5%; 178 | margin:5%; 179 | } 180 | .widget-title { 181 | font-family: Futura; 182 | font-weight: 300; 183 | text-transform: uppercase; 184 | color: #ffffff; 185 | font-family: 16px; 186 | letter-spacing: 2px; 187 | width: 200px; 188 | padding-left: 20%; } 189 | .navbar-brand { 190 | overflow: visible; 191 | padding-top: 0; 192 | padding-bottom: 0; 193 | color:AA2200; 194 | } 195 | 196 | 197 | 198 | footer, footer a{ 199 | background:#414141; 200 | text-height: 24px; 201 | color:white; 202 | font-weight: 700; 203 | margin-top:18em; 204 | } 205 | 206 | 207 | .more-detail-btn{ 208 | width:100%; 209 | border: none; 210 | } 211 | 212 | 213 | .about-heading{ 214 | color:#AA2200!important; 215 | font-weight: bold; 216 | font-size: 30px !important; 217 | text-align:center; 218 | } 219 | 220 | .post-review{ 221 | color:#AA2200!important;; 222 | } 223 | 224 | 225 | footer a:hover{ 226 | text-height: 36px; 227 | color:white; 228 | } 229 | 230 | 231 | footer ul li h5 a:hover{ 232 | text-height: 36px; 233 | color:white; 234 | } 235 | 236 | 237 | 238 | h5 a:hover{ 239 | text-height: 36px; 240 | color:white; 241 | } 242 | 243 | 244 | 245 | #my_centered_buttons{ 246 | display: block; 247 | margin: 0 auto; 248 | } 249 | 250 | 251 | .pagination table{ 252 | margin:0 auto; 253 | } 254 | 255 | 256 | input::-webkit-input-placeholder { 257 | font-size: 10px; 258 | 259 | 260 | } 261 | 262 | .ui-menu-item{ 263 | 264 | color: #000000!important; 265 | list-style-type: none; 266 | 267 | 268 | } 269 | 270 | .static-page p{ 271 | margin: 2%!important; 272 | text-align: justify; 273 | } 274 | input[type=text],input[type=email],input[type=number] , input[type=password], select, textarea { 275 | width: 100%; 276 | padding: 1px; 277 | 278 | border: 1px solid #ccc; 279 | border-radius: 4px; 280 | resize: vertical; 281 | padding: 8px 15px; 282 | margin: 8px 0; 283 | } 284 | td h5 { 285 | font-family: "Times New Roman", Times, serif; 286 | word-spacing: 1px; 287 | line-height: 1.6; 288 | 289 | text-align: justify; 290 | } 291 | .signupfield{ 292 | 293 | padding-left:2%; 294 | } 295 | 296 | #gmail-login-id{ 297 | 298 | background-color:#AA2200; 299 | text-align:center; 300 | border-radius: 15px; 301 | color:white; 302 | font-size:20px; 303 | font-weight: 600; 304 | 305 | 306 | } 307 | #gmail-login-id a,#gmail-login-id a:hover,#fb-login-id a,#fb-login-id a:hover{ 308 | color:white; 309 | text-decoration: none; 310 | 311 | } 312 | 313 | #social-login{ 314 | width:80%; 315 | margin:auto; 316 | } 317 | 318 | #fb-login-id{ 319 | background-color:#4860a8; 320 | text-align:center; 321 | color:white; 322 | font-size:20px; 323 | font-weight: 600; 324 | border-radius: 15px; 325 | 326 | } 327 | 328 | .about p{ 329 | margin-left:15px; 330 | margin-right:10px; 331 | 332 | } 333 | 334 | @media only screen and (max-width: 992px) { 335 | nav , .navbar , .navbar-fixed-top ,navbar-header , #mynav{ 336 | display:none!important; 337 | 338 | } 339 | } 340 | @media only screen and (min-width: 992px) { 341 | .mob-header-table{ 342 | display:none!important; 343 | 344 | } 345 | } 346 | .mob-header{ 347 | background-color:#AA2200; 348 | 349 | font-size: 24px; 350 | color:white; 351 | 352 | font-weight: 900; 353 | position: fixed; 354 | top: 0; 355 | left: 0; 356 | z-index: 999; 357 | width: 100%; 358 | 359 | } 360 | .mob-header-table , .mob-header-table a:hover{ 361 | text-align:center; 362 | font-size: 12px; 363 | font-weight: 600; 364 | background-color:#E0E0E0; 365 | color:#000000;text-decoration: none; 366 | 367 | } 368 | 369 | .mobile-header a,.mobile-header a:hover{ 370 | color:white; 371 | text-decoration: none; 372 | } 373 | 374 | .mobile-main-header{ 375 | 376 | position: fixed; 377 | top: 0; 378 | left: 0; 379 | z-index: 999; 380 | width: 100%; 381 | } 382 | 383 | 384 | .mobile-header-table{ 385 | border-collapse: separate; 386 | border-spacing: 2px 0px; 387 | border: 0px !important; 388 | 389 | } 390 | 391 | 392 | .ui-menu-item { 393 | width:100% !important; 394 | background:white !important; 395 | border-bottom:1px solid #EEEEEE!important; 396 | } 397 | 398 | #id_image{ 399 | margin-top:15px; 400 | margin-bottom:15px; 401 | 402 | } -------------------------------------------------------------------------------- /feed/templates/static_page/privacy.html: -------------------------------------------------------------------------------- 1 | {% extends "feed/base.html" %} 2 | {% block title %} {{ title }} {% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 | 8 |
9 |
10 |

Privacy Policy

11 | 12 | 13 |

Effective date: August 28, 2018

14 | 15 | 16 |

BackMyItem ("us", "we", or "our") operates the http://backmyitem.com/ website (the "Service").

17 | 18 |

This page informs you of our policies regarding the collection, use, and disclosure of personal data when you use our Service and the choices you have associated with that data. This Privacy Policy for BackMyItem is powered by FreePrivacyPolicy.com.

19 | 20 |

We use your data to provide and improve the Service. By using the Service, you agree to the collection and use of information in accordance with this policy. Unless otherwise defined in this Privacy Policy, terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, accessible from http://backmyitem.com/

21 | 22 | 23 |

Information Collection And Use

24 | 25 |

We collect several different types of information for various purposes to provide and improve our Service to you.

26 | 27 |

Types of Data Collected

28 | 29 |

Personal Data

30 | 31 |

While using our Service, we may ask you to provide us with certain personally identifiable information that can be used to contact or identify you ("Personal Data"). Personally identifiable information may include, but is not limited to:

32 | 33 |
    34 |
  • Email address
  • First name and last name
  • Phone number
  • Cookies and Usage Data
  • 35 |
36 | 37 |

Usage Data

38 | 39 |

We may also collect information how the Service is accessed and used ("Usage Data"). This Usage Data may include information such as your computer's Internet Protocol address (e.g. IP address), browser type, browser version, the pages of our Service that you visit, the time and date of your visit, the time spent on those pages, unique device identifiers and other diagnostic data.

40 | 41 |

Tracking & Cookies Data

42 |

We use cookies and similar tracking technologies to track the activity on our Service and hold certain information.

43 |

Cookies are files with small amount of data which may include an anonymous unique identifier. Cookies are sent to your browser from a website and stored on your device. Tracking technologies also used are beacons, tags, and scripts to collect and track information and to improve and analyze our Service.

44 |

You can instruct your browser to refuse all cookies or to indicate when a cookie is being sent. However, if you do not accept cookies, you may not be able to use some portions of our Service.

45 |

Examples of Cookies we use:

46 |
    47 |
  • Session Cookies. We use Session Cookies to operate our Service.
  • 48 |
  • Preference Cookies. We use Preference Cookies to remember your preferences and various settings.
  • 49 |
  • Security Cookies. We use Security Cookies for security purposes.
  • 50 |
51 | 52 |

Use of Data

53 | 54 |

BackMyItem uses the collected data for various purposes:

55 |
    56 |
  • To provide and maintain the Service
  • 57 |
  • To notify you about changes to our Service
  • 58 |
  • To allow you to participate in interactive features of our Service when you choose to do so
  • 59 |
  • To provide customer care and support
  • 60 |
  • To provide analysis or valuable information so that we can improve the Service
  • 61 |
  • To monitor the usage of the Service
  • 62 |
  • To detect, prevent and address technical issues
  • 63 |
64 | 65 |

Transfer Of Data

66 |

Your information, including Personal Data, may be transferred to — and maintained on — computers located outside of your state, province, country or other governmental jurisdiction where the data protection laws may differ than those from your jurisdiction.

67 |

If you are located outside India and choose to provide information to us, please note that we transfer the data, including Personal Data, to India and process it there.

68 |

Your consent to this Privacy Policy followed by your submission of such information represents your agreement to that transfer.

69 |

BackMyItem will take all steps reasonably necessary to ensure that your data is treated securely and in accordance with this Privacy Policy and no transfer of your Personal Data will take place to an organization or a country unless there are adequate controls in place including the security of your data and other personal information.

70 | 71 |

Disclosure Of Data

72 | 73 |

Legal Requirements

74 |

BackMyItem may disclose your Personal Data in the good faith belief that such action is necessary to:

75 |
    76 |
  • To comply with a legal obligation
  • 77 |
  • To protect and defend the rights or property of BackMyItem
  • 78 |
  • To prevent or investigate possible wrongdoing in connection with the Service
  • 79 |
  • To protect the personal safety of users of the Service or the public
  • 80 |
  • To protect against legal liability
  • 81 |
82 | 83 |

Security Of Data

84 |

The security of your data is important to us, but remember that no method of transmission over the Internet, or method of electronic storage is 100% secure. While we strive to use commercially acceptable means to protect your Personal Data, we cannot guarantee its absolute security.

85 | 86 |

Service Providers

87 |

We may employ third party companies and individuals to facilitate our Service ("Service Providers"), to provide the Service on our behalf, to perform Service-related services or to assist us in analyzing how our Service is used.

88 |

These third parties have access to your Personal Data only to perform these tasks on our behalf and are obligated not to disclose or use it for any other purpose.

89 | 90 |

Analytics

91 |

We may use third-party Service Providers to monitor and analyze the use of our Service.

92 |
    93 |
  • 94 |

    Google Analytics

    95 |

    Google Analytics is a web analytics service offered by Google that tracks and reports website traffic. Google uses the data collected to track and monitor the use of our Service. This data is shared with other Google services. Google may use the collected data to contextualize and personalize the ads of its own advertising network.

    96 |

    You can opt-out of having made your activity on the Service available to Google Analytics by installing the Google Analytics opt-out browser add-on. The add-on prevents the Google Analytics JavaScript (ga.js, analytics.js, and dc.js) from sharing information with Google Analytics about visits activity.

    For more information on the privacy practices of Google, please visit the Google Privacy & Terms web page: https://policies.google.com/privacy?hl=en

    97 |
  • 98 |
99 | 100 | 101 |

Links To Other Sites

102 |

Our Service may contain links to other sites that are not operated by us. If you click on a third party link, you will be directed to that third party's site. We strongly advise you to review the Privacy Policy of every site you visit.

103 |

We have no control over and assume no responsibility for the content, privacy policies or practices of any third party sites or services.

104 | 105 | 106 |

Children's Privacy

107 |

Our Service does not address anyone under the age of 18 ("Children").

108 |

We do not knowingly collect personally identifiable information from anyone under the age of 18. If you are a parent or guardian and you are aware that your Children has provided us with Personal Data, please contact us. If we become aware that we have collected Personal Data from children without verification of parental consent, we take steps to remove that information from our servers.

109 | 110 | 111 |

Changes To This Privacy Policy

112 |

We may update our Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page.

113 |

We will let you know via email and/or a prominent notice on our Service, prior to the change becoming effective and update the "effective date" at the top of this Privacy Policy.

114 |

You are advised to review this Privacy Policy periodically for any changes. Changes to this Privacy Policy are effective when they are posted on this page.

115 | 116 | 117 |

Contact Us

118 |

If you have any questions about this Privacy Policy, please contact us:

119 |
    120 |
  • By email: backmyitem@gmail.com
  • 121 | 122 | 123 |
124 | 125 |
126 |
127 |
128 |
129 | {% endblock %} -------------------------------------------------------------------------------- /feed/views.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.models import User 2 | from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator 3 | from django.core.validators import validate_email 4 | from django.forms import Textarea, forms, TextInput, ImageField 5 | from django.shortcuts import render, redirect, render_to_response 6 | from django.http import HttpResponse, HttpResponseRedirect 7 | from django.views.generic.edit import FormMixin 8 | from decouple import config 9 | from .models import Report_item, UserNotification, ContactHelp 10 | from django.views import generic 11 | from django.contrib.auth import login, authenticate 12 | from django.shortcuts import render, redirect 13 | from django.views.generic import View, UpdateView, DeleteView 14 | from .forms import SignUpForm, LoginForm, ReportForm 15 | from django.contrib.auth import logout 16 | from django.contrib.auth import get_user_model 17 | from django.core.urlresolvers import reverse_lazy 18 | from django.db.models import Q 19 | from PIL import Image 20 | 21 | 22 | def IndexView(request): 23 | query_list = Report_item.objects.filter(publish=True) 24 | query = request.GET.get('q') 25 | if query: 26 | query_list = query_list.filter(Q(title__icontains=query) | 27 | Q(item_type__icontains=query) | 28 | Q(location__icontains=query) | 29 | Q(Description__icontains=query)).distinct() 30 | 31 | paginator = Paginator(query_list, 5) 32 | page = request.GET.get('page') 33 | try: 34 | qs = paginator.page(page) 35 | except PageNotAnInteger: 36 | qs = paginator.page(1) 37 | except EmptyPage: 38 | qs = paginator.page(paginator.num_pages) 39 | title = "Home-Back My Item" 40 | context = { 41 | "object_list": qs 42 | } 43 | 44 | return render(request, "feed/index.html", context) 45 | 46 | 47 | class SearchItemType(generic.ListView): 48 | template_name = "feed/index.html" 49 | 50 | def get_queryset(self): 51 | query_list = Report_item.objects.filter(publish=True) 52 | slug = self.kwargs.get("slug") 53 | if slug: 54 | query_list = query_list.filter(Q(item_type__icontains=slug)) 55 | return query_list 56 | 57 | 58 | class ReportCreate(generic.CreateView): 59 | model = Report_item 60 | fields = ['title', 'item_type', 'location', 'image', 'Description'] 61 | 62 | def get_form(self, form_class=None): 63 | if form_class is None: 64 | form_class = self.get_form_class() 65 | form = super(ReportCreate, self).get_form(form_class) 66 | form.fields['title'].widget = TextInput( 67 | attrs={'placeholder': '*Enter UID e.g. CBSE Marksheet Roll number 0506***'}) 68 | form.fields['item_type'].widget = TextInput( 69 | attrs={'placeholder': '*What do you found e.g. marksheet,passport,key,wallet'}) 70 | form.fields['location'].widget = TextInput( 71 | attrs={'placeholder': '*Enter street and city name where you found this item'}) 72 | form.fields['Description'].widget = Textarea( 73 | attrs={'rows': 4, 'cols': 15, 'placeholder': 'Optional Field: Any other related detail'}) 74 | 75 | return form 76 | 77 | def form_valid(self, form): 78 | self.object = form.save(commit=False) 79 | self.object.owner = self.request.user 80 | self.object.save() 81 | return FormMixin.form_valid(self, form) 82 | 83 | 84 | class ReportDetail(generic.DetailView): 85 | model = Report_item 86 | template_name = 'feed/detail.html' 87 | 88 | 89 | class SignUpForm(generic.CreateView): 90 | form_class = SignUpForm 91 | template_name = "feed/SignUp.html" 92 | 93 | def get(self, request): 94 | title = "SignUp - BackMyItem" 95 | form = self.form_class(None) 96 | context = { 97 | "title": title, 98 | "form": form, 99 | } 100 | return render(request, self.template_name, context) 101 | 102 | def post(self, request): 103 | 104 | form = self.form_class(request.POST) 105 | if form.is_valid(): 106 | print("form valid") 107 | user = form.save(commit=False) 108 | username = form.cleaned_data['username'] 109 | password = form.cleaned_data['password1'] 110 | user.set_password(password) 111 | form.save() 112 | user = authenticate(username=username, password=password) 113 | if user is not None: 114 | if user.is_active: 115 | login(request, user) 116 | return redirect('feed:index') 117 | else: 118 | print(form.errors) 119 | 120 | return render(request, self.template_name, {'form': form}) 121 | 122 | 123 | class LoginForm(generic.CreateView): 124 | print("login") 125 | form_class = LoginForm 126 | template_name = "feed/SignUp.html" 127 | 128 | def get(self, request): 129 | title = "Login to BackMyItem" 130 | form = self.form_class(None) 131 | context = { 132 | "title": title, 133 | "form": form, 134 | 135 | } 136 | return render(request, self.template_name, context) 137 | 138 | def Post(self, request): 139 | form = self.form_class(request.POST) 140 | if form.is_valid(): 141 | try: 142 | print("try") 143 | username = request.POST['username'] 144 | username = User.objects.get(email=username).username # Get username with email 145 | password = request.POST['password'] 146 | validate_email(username) # If it's a valid email 147 | user = authenticate(request, username=username, password=password) 148 | if user is not None: 149 | if user.is_active: 150 | login(request, user) 151 | return redirect('') 152 | 153 | except: 154 | print("except") 155 | UserModel = get_user_model() 156 | 157 | password = request.POST['password'] 158 | user = authenticate(request, username=username, password=password) 159 | if user is not None: 160 | if user.is_active: 161 | login(request, user) 162 | return redirect('') 163 | else: 164 | print(form.errors) 165 | 166 | 167 | def logout_view(request): 168 | logout(request) 169 | query_list = Report_item.objects.filter(publish=True) 170 | return render(request, "feed/index.html", {'object_list': query_list}) 171 | 172 | 173 | def Profile(request, username): 174 | print(username) 175 | title = username + " - BackMyItem" 176 | qs = Report_item.objects.filter(owner__username=username) 177 | context = { 178 | "object_list": qs, 179 | "title": title, 180 | } 181 | return render(request, "feed/profile.html", context) 182 | 183 | 184 | class ReportUpdate(UpdateView): 185 | model = Report_item 186 | fields = ['title', 'item_type', 'location', 'image', 'Description'] 187 | 188 | 189 | class ReportDelete(DeleteView): 190 | model = Report_item 191 | success_url = reverse_lazy('feed:index') 192 | 193 | 194 | class RequestItem(generic.CreateView): 195 | model = UserNotification 196 | fields = ['Name', 'Mobile_No', 'Proof'] 197 | 198 | def get_form(self, form_class=None): 199 | if form_class is None: 200 | form_class = self.get_form_class() 201 | form = super().get_form(form_class) 202 | form.fields['Name'].widget = TextInput(attrs={'placeholder': '*Enter your name'}) 203 | form.fields['Mobile_No'].widget = TextInput( 204 | attrs={'placeholder': "*Enter your's mobile number to get a call back from angel"}) 205 | form.fields['Proof'].widget = TextInput(attrs={'placeholder': '*enter proof you have for your lost item'}) 206 | return form 207 | 208 | def form_valid(self, form): 209 | print(self.kwargs) 210 | 211 | self.object = form.save(commit=False) 212 | qs = Report_item.objects.filter(id=self.kwargs.get("pk")) 213 | self.object.user = qs[0].owner 214 | self.object.save() 215 | return HttpResponse( 216 | "

Your request has been proceed.


Your will get call from your's angel soon if your's claim to" 217 | " item is valid.


" 218 | "

Go back to homepage

" 219 | "") 220 | 221 | 222 | def show_notification(request, notification_id): 223 | n = UserNotification.objects.get(id=notification_id) 224 | title = "Requested by " + n.Name 225 | context = { 226 | "n": n, 227 | "title": title, 228 | } 229 | n.viewed = True 230 | n.save() 231 | return render(request, "feed/notification.html", context) 232 | 233 | 234 | def read_notification(request, notification_id): 235 | n = UserNotification.objects.get(id=notification_id) 236 | n.viewed = True 237 | n.save() 238 | return HttpResponse("

Your request has been processed

") 239 | 240 | 241 | def mynotification(request): 242 | n = UserNotification.objects.filter(user=request.user, viewed=False) 243 | print(type(n)) 244 | return render_to_response("feed/loggedin.html", 245 | {'full_name': request.user.first_name, 'notification': n, }) 246 | 247 | 248 | def read_Notification(request): 249 | n = UserNotification.objects.filter(user=request.user) 250 | context = { 251 | 'full_name': request.user.first_name, 252 | 'notification': n, 253 | 'title': "All Notifications" 254 | } 255 | print(type(n)) 256 | return render_to_response("feed/loggedin.html", 257 | context) 258 | 259 | 260 | def home_page(request): 261 | title = "About BackMyItem" 262 | return render(request, "static_page/about_us.html", {"title": title}) 263 | 264 | 265 | def privacy_page(request): 266 | title = "Privacy of BackMyItem" 267 | return render(request, "static_page/privacy.html", {"title": title}) 268 | 269 | 270 | class Contact_page(generic.CreateView): 271 | model = ContactHelp 272 | fields = ['Name', 'Email', 'query'] 273 | success_url = reverse_lazy('feed:index') 274 | 275 | 276 | def TeamPage(request): 277 | title = "BackMyItem Team" 278 | return render(request, "static_page/our_team.html", {"title": title}) 279 | 280 | 281 | def notification_context(request): 282 | if request.user.is_anonymous: 283 | return {} 284 | n = UserNotification.objects.filter(user=request.user, viewed=False) 285 | return { 286 | 'notification': n, 287 | 'count': n.count(), 288 | } 289 | 290 | 291 | def api_context(request): 292 | key = config('api_key') 293 | return { 294 | 'api_key': key, 295 | } 296 | 297 | --------------------------------------------------------------------------------