Skip to content

Commit

Permalink
upd: support last version of beta
Browse files Browse the repository at this point in the history
  • Loading branch information
hoosnick committed Sep 9, 2023
1 parent 3f9459c commit 5d379f8
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 188 deletions.
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Support Group - <a href="https://t.me/+bYouuOlqt1c3NmYy">Telegram</a><br>
YouTube - <a href="https://youtu.be/r2RO3kJVP7g"> Watch Video</a><br>
This MVP project helps to implement <a href="https://github.com/PayTechUz/payme-pkg">payme-pkg</a>.

<p align="center">
<a href="https://youtu.be/r2RO3kJVP7g">
<img style="width: 60%;" src="https://i.postimg.cc/5NRRSHXp/homemuhammadali-Downloads-Telegram-Desktop-Closer-Li-QWYD-No-Copyright-Music-Audio-Library-Music-m4a.gif">
Expand All @@ -20,18 +21,19 @@ Pay link is a simple interface that provides pay-link functionality.
- `/payments/merchant/` includes all merchant methods that tests on <a href="https://test.paycom.uz/">Payme Sandbox</a>

# Installation
* 1 - clone repo
- ```git clone https://github.com/PayTechUz/payme-sample.git```
* 2 - create a virtual environment and activate
- ```pip3 install virtualenv```
- ```virtualenv venv```
- ```venv\Scripts\activate```(windows) or ```source venv/bin/activate```(unix-based systems)
* 3 - cd into project "cd payme-sample"
* 4 - Install dependencies
- ```pip3 install -r requirements.txt```
* 5 - Set your environment variables
- ```cp .env-sample .env```
* 6 - Run tests and app
- ```python3 manage.py test```
- ```python3 manage.py migrate```
- ```python3 manage.py runserver```

- 1 - clone repo
- `git clone https://github.com/PayTechUz/payme-sample.git`
- 2 - create a virtual environment and activate
- `pip3 install virtualenv`
- `virtualenv venv`
- `venv\Scripts\activate`(windows) or `source venv/bin/activate`(unix-based systems)
- 3 - cd into project "cd payme-sample"
- 4 - Install dependencies
- `pip3 install -r requirements.txt`
- 5 - Set your environment variables
- `cp .env-sample .env`
- 6 - Run tests and app
- `python3 manage.py test`
- `python3 manage.py migrate`
- `python3 manage.py runserver`
17 changes: 12 additions & 5 deletions apps/shop/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.2.4 on 2023-08-24 08:20
# Generated by Django 4.2.4 on 2023-09-09 08:08

from django.db import migrations, models
import django.db.models.deletion
Expand All @@ -13,14 +13,21 @@ class Migration(migrations.Migration):
]

operations = [
migrations.CreateModel(
name='Product',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('image', models.TextField()),
('items', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='payme.item')),
],
),
migrations.CreateModel(
name='CustomOrderModel',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('amount', models.FloatField(blank=True, null=True)),
('user_id', models.IntegerField(blank=True, null=True)),
('full_name', models.CharField(max_length=40)),
('phone_number', models.CharField(max_length=24)),
('wants_at', models.DateTimeField(blank=True, null=True)),
('detail', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='payme.orderdetail')),
],
options={
Expand Down

This file was deleted.

This file was deleted.

23 changes: 0 additions & 23 deletions apps/shop/migrations/0004_product.py

This file was deleted.

23 changes: 0 additions & 23 deletions apps/shop/migrations/0005_remove_customordermodel_user_and_more.py

This file was deleted.

This file was deleted.

17 changes: 0 additions & 17 deletions apps/shop/migrations/0007_remove_customordermodel_product.py

This file was deleted.

18 changes: 0 additions & 18 deletions apps/shop/migrations/0008_customordermodel_wants_at.py

This file was deleted.

10 changes: 1 addition & 9 deletions apps/shop/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,10 @@ class Product(models.Model):
image = models.TextField()

def __str__(self):
amount = self.items.price / 100
formatted_number = '{:,}'.format(amount)
return f"{self.items.title} - {formatted_number} UZS"
return self.items.__str__()


class CustomOrderModel(BaseOrder):
# user = models.ForeignKey(User, on_delete=models.CASCADE)
full_name = models.CharField(max_length=40)
phone_number = models.CharField(max_length=24)
wants_at = models.DateTimeField(null=True, blank=True)

def __str__(self):
amount = self.amount / 100
formatted_number = '{:,}'.format(amount)
return f"ORDER ID: {self.id} - AMOUNT: {formatted_number} UZS"
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
drf-yasg==1.21.5
environs==9.5.0
flake8==6.0.0
payme-pkg @ git+https://github.com/PayTechUz/payme-pkg@03b86d382954797a75217f15cf52d567f1cb6e84
payme-pkg @ git+https://github.com/PayTechUz/payme-pkg@b6b5ee01566918a7bee10aa6ff6581f662968364
pip-chill==1.0.1

0 comments on commit 5d379f8

Please sign in to comment.