Code Monkey home page Code Monkey logo

revisionwebsitev3's Introduction

Hi there ๐Ÿ‘‹

fjdklsakhirluyterlg's GitHub stats

revisionwebsitev3's People

Contributors

dependabot[bot] avatar fjdklsakhirluyterlg avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

revisionwebsitev3's Issues

error

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

branches not merging

help me all i wanted to do was have them merge before i branch of to other branches

Guides

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.

no application found

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()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.