Trouble Deploying Django to Railway.app
I am trying to get Railway to work as I like their features. I had the Railway account for a few days before I realized that I could get to learn it way quicker if I upgraded my account to the Developer one. My intention is to deploy the Django project's development environment (app plus database) onto Railway. My Django project is API only and I need the frontend dev environment (which I will host in a separate environment on Railway) to have access to the backend's API endpoints online.
When I deploy the development environment now, after referencing https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Deployment#getting\_your\_website\_ready\_to\_publish, I get the following deploy log "Watching for file changes with StatReloader
"Performing system checks... System check identified no issues (0 silenced). May 14, 2023 - 16:19:46 Django version 4.2.1, using settings 'project.settings.local' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C."
However, I get "Application failed to respond" when I try to access the project using the generated domain.
Here are the rest of my configurations and logs: build log: https://pastebin.com/pKw65eGe (I hid some data by replacing it with "xxx") base.py (base settings) https://pastebin.com/5fTkXTGB local.py (dev environment) https://pastebin.com/cfLPiDzm requirements.txt https://pastebin.com/T35yEriz (I'll clean it up once I figure out which libraries I do
/r/django
https://redd.it/13hj7bl
I am trying to get Railway to work as I like their features. I had the Railway account for a few days before I realized that I could get to learn it way quicker if I upgraded my account to the Developer one. My intention is to deploy the Django project's development environment (app plus database) onto Railway. My Django project is API only and I need the frontend dev environment (which I will host in a separate environment on Railway) to have access to the backend's API endpoints online.
When I deploy the development environment now, after referencing https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Deployment#getting\_your\_website\_ready\_to\_publish, I get the following deploy log "Watching for file changes with StatReloader
"Performing system checks... System check identified no issues (0 silenced). May 14, 2023 - 16:19:46 Django version 4.2.1, using settings 'project.settings.local' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C."
However, I get "Application failed to respond" when I try to access the project using the generated domain.
Here are the rest of my configurations and logs: build log: https://pastebin.com/pKw65eGe (I hid some data by replacing it with "xxx") base.py (base settings) https://pastebin.com/5fTkXTGB local.py (dev environment) https://pastebin.com/cfLPiDzm requirements.txt https://pastebin.com/T35yEriz (I'll clean it up once I figure out which libraries I do
/r/django
https://redd.it/13hj7bl
MDN Web Docs
Django Tutorial Part 11: Deploying Django to production
That's the end of this tutorial on setting up Django apps in production, and also the series of tutorials on working with Django. We hope you've found them useful. You can check out a fully worked-through version of the source code on Github here. The next…
sql-compare: package to compare SQL schemas
## What My Project Does
This package allows to compare two SQL files (or strings) to know whether their statements are the same or not. The comparison doesn't care about the order of the columns in a table or the order of the values in an enumerator. It also excludes irrelevant data like comments.
GitHub repository
PyPI
Its main usage is to compare the schemas of two databases (e.g. staging and production).
At Mergify, we use it in our test suite to check that the migration scripts generated by Alembic will create the database schema expected by the SQLAlchemy models. I wrote a blog post about the creation of the package.
## Target Audience
We use it in our CI/CD. This package is meant for testing mainly, but it could be used for something else probably.
This package is ready for production.
We have been using it at Mergify for several months now. Our test suite fails whenever Alembic misses something in a migration script. We deliver to production several times a day thanks to that.
## Comparison
We didn't find any suitable alternative.
Alembic can compare a database schema with SQLAlchemy models, but it doesn't detect every differences.
We used migra in the past, but it is not maintained anymore.
/r/Python
https://redd.it/1dvsqk7
## What My Project Does
This package allows to compare two SQL files (or strings) to know whether their statements are the same or not. The comparison doesn't care about the order of the columns in a table or the order of the values in an enumerator. It also excludes irrelevant data like comments.
GitHub repository
PyPI
Its main usage is to compare the schemas of two databases (e.g. staging and production).
At Mergify, we use it in our test suite to check that the migration scripts generated by Alembic will create the database schema expected by the SQLAlchemy models. I wrote a blog post about the creation of the package.
## Target Audience
We use it in our CI/CD. This package is meant for testing mainly, but it could be used for something else probably.
This package is ready for production.
We have been using it at Mergify for several months now. Our test suite fails whenever Alembic misses something in a migration script. We deliver to production several times a day thanks to that.
## Comparison
We didn't find any suitable alternative.
Alembic can compare a database schema with SQLAlchemy models, but it doesn't detect every differences.
We used migra in the past, but it is not maintained anymore.
/r/Python
https://redd.it/1dvsqk7
PyPI
sql-compare
Compare SQL schemas
pandas/python functions (pushing and calling dataframe)
Hello all,
I am fairly new to python and all so i am having difficulty managing next.
So i wanted to create a dim table in separate file, then push few columns to SQL, and allow somehow for few other columns to be allowed to be pulled in another python file, where i would merge it with that data-frame.(creating ID keys basically),
But i am having difficulties doing that,its giving me some long as error. (This part when i am calling in other file : (product_table= Orders_product() )
Could someone point me to right direction?
Product table:
import pandas as pd
from MySQL import getmysqlengine
#getting file
File=r"ExcelFilePath"
Sheet="Orders"
df=pd.readexcel(File, sheetname=Sheet)
productcolumns=["Product Category","Product Sub-Category","Product Container","Product Name"]
def Ordersproduct():
#cleaning text/droping duplicates
dfproducts = df[productcolumns].copy()
for productCol in productcolumns:
dfproducts[productCol] = dfproducts[productCol].str.strip()
dfproducts['ProductKeyJoin'] = dfproductsproduct_columns.agg('|'.join, axis=1)
/r/Python
https://redd.it/1lhyni4
Hello all,
I am fairly new to python and all so i am having difficulty managing next.
So i wanted to create a dim table in separate file, then push few columns to SQL, and allow somehow for few other columns to be allowed to be pulled in another python file, where i would merge it with that data-frame.(creating ID keys basically),
But i am having difficulties doing that,its giving me some long as error. (This part when i am calling in other file : (product_table= Orders_product() )
Could someone point me to right direction?
Product table:
import pandas as pd
from MySQL import getmysqlengine
#getting file
File=r"ExcelFilePath"
Sheet="Orders"
df=pd.readexcel(File, sheetname=Sheet)
productcolumns=["Product Category","Product Sub-Category","Product Container","Product Name"]
def Ordersproduct():
#cleaning text/droping duplicates
dfproducts = df[productcolumns].copy()
for productCol in productcolumns:
dfproducts[productCol] = dfproducts[productCol].str.strip()
dfproducts['ProductKeyJoin'] = dfproductsproduct_columns.agg('|'.join, axis=1)
/r/Python
https://redd.it/1lhyni4
Reddit
From the Python community on Reddit
Explore this post and more from the Python community