Hi all,
Just in case someone have the same issue, here is the solution.
from django.db import migrations, connection
import os
def load_data_from_sql(apps, schema_editor):
file_path = os.path.join(os.path.dirname(__file__),
'database_objects.sql')
sql_script = open(file_path).read()
Hi Александр Волков,
It's a bit hard to answer your question properly as I don't know what sort
of application you want to develop.
But for web api, please loot at the link below,
https://www.django-rest-framework.org/
they have a great documentation to help you when creating a restful web
Hi Alexander.
I studied only python, but now I needed to write a program using the jango
rest framework. I don’t know anything about him, please tell me which
source to use (so that I’ve been told from scratch) so that I can work with
him.
Thank you very much.
--
You received this message
Hi Jakob,
Thanks for your reply.
Yes, using the factory and the mocking features is definitely a nice
approach.
But, in this case I also want to test the end point via making a database
call which it will have to have create some stored procedures.
That's why I'm trying to create a mechanism
Look at this https://factoryboy.readthedocs.io/en/latest/
tor. 13. dec. 2018 kl. 09.15 skrev Alexander Lamas <
alexander.g.la...@gmail.com>:
> Hi all,
>
> Does anyone know where and how to implement the reading and execution of a
> sql script file to create all database objects before run the