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

All python packages upgraded to latest version(django 1 to 3) #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file removed ._.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ ENV/

bestoon/settings.py
*.orig
.DS_Store
*.DS_Store
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To run Bestoon in development mode; Just use steps below:
## Run On Windows

If You're On A Windows Machine , Make Environment Ready By Following Steps Below:
1. Install `python2`, `pip`, `virtualenv`
1. Install `python2`, `pip`, `virtualenv`
2. Clone the project using: `git clone https://github.com/jadijadi/bestoon`.
3. Make Environment Ready Like This:
``` Command Prompt
Expand Down
16 changes: 16 additions & 0 deletions bestoon/asgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
ASGI config for bestoon project.

It exposes the ASGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""

import os

from django.core.asgi import get_asgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bestoon.settings')

application = get_asgi_application()
18 changes: 9 additions & 9 deletions bestoon/settings.py.sample
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""
Django settings for bestoon project.

Generated by 'django-admin startproject' using Django 1.10.4.
Generated by 'django-admin startproject' using Django 3.0.

For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
https://docs.djangoproject.com/en/3.0/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
https://docs.djangoproject.com/en/3.0/ref/settings/
"""

import os
Expand All @@ -17,10 +17,10 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'ees#cr8y%!0o=%8r2wbxcgcz0u8s!&91=b2f@a_c%&4*c&ey&a'
SECRET_KEY = '_9unun*x3vp&x%(^g3torgh7=)&uno3oez&4tw*c6tfi2)gdj^'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
Expand Down Expand Up @@ -74,7 +74,7 @@ WSGI_APPLICATION = 'bestoon.wsgi.application'


# Database
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases

DATABASES = {
'default': {
Expand All @@ -85,7 +85,7 @@ DATABASES = {


# Password validation
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
{
Expand All @@ -104,7 +104,7 @@ AUTH_PASSWORD_VALIDATORS = [


# Internationalization
# https://docs.djangoproject.com/en/1.10/topics/i18n/
# https://docs.djangoproject.com/en/3.0/topics/i18n/

LANGUAGE_CODE = 'en-us'

Expand All @@ -118,7 +118,7 @@ USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.10/howto/static-files/
# https://docs.djangoproject.com/en/3.0/howto/static-files/

STATIC_URL = '/static/'

Expand Down
16 changes: 9 additions & 7 deletions bestoon/urls.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
"""bestoon URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin
from django.urls import path
from django.conf.urls import url, include

urlpatterns = [
url(r'^admin/', admin.site.urls),
path('admin/', admin.site.urls),
url(r'', include('web.urls')),

]
4 changes: 2 additions & 2 deletions bestoon/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
It exposes the WSGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bestoon.settings")
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bestoon.settings')

application = get_wsgi_application()
29 changes: 14 additions & 15 deletions manage.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bestoon.settings")

def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bestoon.settings')
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the
# issue is really that Django is missing to avoid masking other
# exceptions on Python 2.
try:
import django
except ImportError:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
)
raise
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)


if __name__ == '__main__':
main()
15 changes: 11 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
Django==1.11.23
python-postmark==0.4.10
requests==2.12.4
django-cors-middleware
asgiref==3.2.3
certifi==2019.11.28
chardet==3.0.4
Django==3.0
django-cors-middleware==1.5.0
idna==2.8
python-postmark==0.5.1
pytz==2019.3
requests==2.22.0
sqlparse==0.3.0
urllib3==1.25.7
Binary file removed web/._.DS_Store
Binary file not shown.
3 changes: 0 additions & 3 deletions web/.coafile

This file was deleted.

42 changes: 39 additions & 3 deletions web/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-20 12:28
from __future__ import unicode_literals
# Generated by Django 3.0 on 2019-12-18 07:29

from django.conf import settings
from django.db import migrations, models
Expand All @@ -16,6 +14,44 @@ class Migration(migrations.Migration):
]

operations = [
migrations.CreateModel(
name='News',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=250)),
('text', models.TextField()),
('date', models.DateTimeField()),
],
),
migrations.CreateModel(
name='Passwordresetcodes',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('code', models.CharField(max_length=32)),
('email', models.CharField(max_length=120)),
('time', models.DateTimeField()),
('username', models.CharField(max_length=50)),
('password', models.CharField(max_length=50)),
],
),
migrations.CreateModel(
name='Token',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('token', models.CharField(max_length=48)),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Income',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('text', models.CharField(max_length=255)),
('date', models.DateTimeField()),
('amount', models.BigIntegerField()),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Expense',
fields=[
Expand Down
28 changes: 0 additions & 28 deletions web/migrations/0002_income.py

This file was deleted.

35 changes: 0 additions & 35 deletions web/migrations/0003_user.py

This file was deleted.

38 changes: 0 additions & 38 deletions web/migrations/0004_auto_20161223_1242.py

This file was deleted.

26 changes: 0 additions & 26 deletions web/migrations/0005_passwordresetcodes.py

This file was deleted.

Loading