Skip to content

Commit 05ec156

Browse files
Merge pull request #1 from LeonardoCruzx/dev
Dev
2 parents 7b03307 + 9332a7f commit 05ec156

File tree

28 files changed

+360
-7
lines changed

28 files changed

+360
-7
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dist/
2+
build/
3+
__pycache__
4+
*.egg-info
5+
main.py

README.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,48 @@
1-
# Django rest starter
1+
# Django rest starter
2+
3+
python package created with the aim of adding functionality to the creation of a project built with django and django rest framework
4+
5+
![Badge](https://img.shields.io/badge/Python-3.7-blue?style=plastic&logo=python) ![Badge](https://img.shields.io/badge/Pypi-9cf?style=plastic&logo=pypi)
6+
7+
![Badge](https://img.shields.io/github/issues/LeonardoCruzx/django-rest-starter?style=plastic) ![Badge](https://img.shields.io/github/forks/LeonardoCruzx/django-rest-starter?style=plastic) ![Badge](https://img.shields.io/github/stars/LeonardoCruzx/django-rest-starter?style=plastic) ![Badge](https://img.shields.io/github/license/LeonardoCruzx/django-rest-starter?style=plastic)
8+
9+
10+
## 💡 Objective
11+
12+
I built this project to make more easy build rest web apps with django and django rest
13+
14+
### This fits to you if:
15+
16+
- You want build django rest web applications more easily;
17+
- Want use Heroku;
18+
19+
## ⚙️ How to install:
20+
21+
install the package globaly:
22+
```
23+
pip install django-rest-starter
24+
```
25+
26+
## 💻 How to use:<br>
27+
28+
create the project:
29+
```
30+
django-rest-starter nome_do_seu_projeto
31+
```
32+
optional arguments:<br>
33+
`--user`:<br>
34+
```
35+
Add user template to the project
36+
```
37+
`--heroku`:<br>
38+
```
39+
Add heroku template to the project
40+
```
41+
42+
## 🤝 Contributions
43+
44+
if you have any tips or proposals to improve the code, open an issue and detail your proposal. every contribution is welcome.
45+
46+
## 📜 License
47+
48+
this project is using the mit license [MIT](https://github.com/LeonardoCruzx/django-rest-starter/blob/master/LICENSE).

setup.cfg

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ description-file = README.md
55
package_dir =
66
=src
77

8-
packages=find:
8+
packages= find:
99

1010
include_package_data = true
1111

1212
zip_safe = false
1313

1414
[options.package_data]
15-
* = *.json
15+
* = *json, *.example
1616

1717
[options.packages.find]
1818
where=src
1919

20+
[options.entry_points]
21+
console_scripts =
22+
django-rest-starter = django_rest_starter.__main__:main

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
setuptools.setup(
88
name='django-rest-starter',
9-
version='0.0.1',
9+
version='1.0.0',
1010
url='https://github.com/LeonardoCruzx/django-rest-starter',
1111
author='Leonardo Cruz',
12-
author_email='leonardo.m.cruz@hotmail.com',
13-
description='descricao curta',
12+
author_email='leonardo.m.cruz0@gmail.com',
13+
description='Package to start a django with rest',
1414
long_description=long_description,
1515
long_description_content_type="text/markdown",
1616
packages=setuptools.find_packages(),

src/_django/__init__.py

Whitespace-only changes.

src/_django/_django.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import os
2+
from _template.template import Template
3+
4+
class Django(Template):
5+
6+
def create_project(self):
7+
os.system(f'django-admin startproject {self.project_name} {self.project_path}')
8+
9+
def create_project_dir(self):
10+
self.project_name = self.project_path.split("\\")[-1]
11+
os.makedirs(self.project_name)
12+
self.project_path = os.getcwd() + f"\\{self.project_name}"

src/_django/base_template/__init__.py

Whitespace-only changes.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
.venv/
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*,cover
47+
.hypothesis/
48+
49+
# Translations
50+
*.mo
51+
*.pot
52+
53+
# Django stuff:
54+
*.log
55+
56+
# Sphinx documentation
57+
docs/_build/
58+
59+
# PyBuilder
60+
target/
61+
62+
#Ipython Notebook
63+
.ipynb_checkpoints
64+
db.sqlite3
65+
66+
local_settings.py
67+
media/
68+
staticfiles/

src/_heroku/__init__.py

Whitespace-only changes.

src/_heroku/_heroku.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from _template.template import Template
2+
3+
class Heroku(Template):
4+
pass

0 commit comments

Comments
 (0)