fjdklsakhirluyterlg / revisionwebsitev3 Goto Github PK
View Code? Open in Web Editor NEWmy website
License: MIT License
my website
License: MIT License
ModuleNotFoundError: No module named 'backends' in backends/stastics/data.py
erroneous function:
from backends.models import User
import csv
def write_users():
users = []
query = User.query.all()
for q in query:
data = [q.name, q.timestamp, q.points, q.email]
users.append(data)
with open('users.csv', 'w', newline='') as file:
fieldnames = ["name", "timestamp", "points", "email"]
writer = csv.writer(file)
writer.writerows(users)
however it works in backends/cli/clix.py
import click
from flask import Blueprint
from backends import db
from backends.models import User
clix = Blueprint("cli", __name__, cli_group=None)
@clix.cli.command('create')
@click.argument('name')
def create(name):
print(name)
@clix.cli.command("get")
@click.argument("users")
def get_useres(users):
users = User.query.all()
dict = {}
for user in users:
dict[user.id] = {"name":user.name, "email":user.email, "points":user.points}
print(dict)
why is this?
@fjdklsakhirluyterlg please help
help me all i wanted to do was have them merge before i branch of to other branches
what have i done
upon trying to access the /dashboard page it just redirects to login however user is still logged in as shows by visiting /user/home
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
It would be cool to have a guides section
Describe the solution you'd like
A clear and concise description of what you want to happen.
A section on guides for different things to link to other things
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
this is in src/backends/stastics/data.py again
it gives this error now:
RuntimeError: No application found. Either work inside a view function or push an application context. See http://flask-sqlalchemy.pocoo.org/contexts/.
reminder of the code:
from backends.models import User
from backends import db
import csv
def write_users():
users = []
query = db.session.query(User).all()
for q in query:
data = [q.name, q.timestamp, q.points, q.email]
users.append(data)
with open('users.csv', 'w', newline='') as file:
fieldnames = ["name", "timestamp", "points", "email"]
writer = csv.writer(file)
writer.writerows(users)
write_users()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.