Closed psemdel closed 1 year ago
I'm still trying to get this working in my local machine. Currently running into No module named 'psycopg2', though I'm using sqlite and python 3.8
what do I expect to see once I python3 manage.py runserver. It looks like localhost/start_bot. A screen shot of the website will help me.
The Django I'm using is the latest version, 4.1.4
Any help is appreciated.
[I think you posted in the wrong issue, but nevermind] Normally, pg is called only in settings from the Django project (line 191). Normally, no mention of pg or any database is performed in the code.
When you start runserver, you should get:
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
December 11, 2022 - 09:54:08
Django version 4.1.2, using settings 'trading_bot.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
No need to start anything before or after. start_bot is principally there to start the worker, which is not needed in the first place.
Ok, I found it. In reporting/models.py I use from "django.contrib.postgres.fields import ArrayField". I look how to change that for the case of sqllite.
So basically, I need to make a many-to-many relation instead of those ArrayField. I will have a problem between my "Indexes" and "Actions" as they are presently different objects. I think https://stackabuse.com/recursive-model-relationships-in-django/ should allow me merging both types and remove this source of bugs. It is a big change, so I cannot promise it will happen in the next hours :( . To test you can remove those ArrayField in reporting/models.
Thanks a lot.
I'm not too worry about it currently. Some background:
1/ I'm using wsl2 in windows 10, so it may be a bit different, but it seems to be fine 2/ Using Sqlite for now as I don't want to use the postgres yet 3/ Using VSCode, vectorbt (I could upgrade to pro but have to see how this works first
I like the ideas you have and that's the main reason why I will commit to get this working. My approach is
1/ Install Django as get this working as a basic website. This is done as I'm using the Django 4.1, it is working fine. 2/ Gradually migrate the other modules in your code to my local environment, make changes to vbt as I go along
I'm happy to report it is now working, of course, there will be some learning and road block I have to overcome
Thanks for your excellent work
Good that it works for you. Don't hesitate to commit, it is still far from perfect.
Still trying to understand the workflow... If you care to comment on how you go about using this, that will help me.
Exploring ...
We can close this issue as I am now using PostgreSQL
Other topic below ;)