Giter VIP home page Giter VIP logo

aiohttp-admin's People

Contributors

abogushov avatar alefteris avatar andriisoldatenko avatar arfey avatar asvetlov avatar atemate avatar dependabot-preview[bot] avatar dependabot[bot] avatar doc-hex avatar dreamsorcerer avatar elston avatar goliney avatar gyermolenko avatar imgbotapp avatar ins1ne avatar jettify avatar nickolai-dr avatar popravich avatar pyup-bot avatar romanyakovlev avatar thenx avatar thijstriemstra avatar vladz avatar webknjaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aiohttp-admin's Issues

Cannot install dependencies

I'm trying to run examples but can't install dev dependencies

$ pip install -r requirements-dev.txt 
Collecting aiohttp-jinja2==0.16.0 (from -r requirements-dev.txt (line 1))
  Could not find a version that satisfies the requirement aiohttp-jinja2==0.16.0 (from -r requirements-dev.txt (line 1)) (from versions: 0.0.1, 0.0.2, 0.1.0, 0.2.1, 0.3.0, 0.3.1, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.6.1, 0.6.2, 0.7.0, 0.8.0, 0.12.0, 0.13.0, 0.14.0, 0.15.0)
No matching distribution found for aiohttp-jinja2==0.16.0 (from -r requirements-dev.txt (line 1))

Environment:

$ python -V
Python 3.5.2
$ pip -V
pip 9.0.2 from /home/goliney/.virtualenvs/aiohttp_admin/lib/python3.5/site-packages (python 3.5)
$git log -1
commit 9a024868b52ed9e4235e68ffb0ce50c1d2f19dc4
Author: Arfey <[email protected]>
Date:   Wed Mar 21 21:24:57 2018 +0200

    updated the code to new version of aiohttp, fixed some typos and decorated html (#339)

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.4 LTS
Release:	16.04
Codename:	xenial

Please help

Implement admin view generator

It is possible to generate config.js base on information about schema. Possible solution would be to use regular jinja2 templates to render js mark up.

Add javascript linter

Now we have custom scripts like login.js, it would be nice to have javascript linter to check it on each PR.

Unclear how to install aiohttp_admin in another project

I tried to do pip install aiohttp-admin and pip install aiohttp_admin - and got a Could not find a version that satisfies the requirement message from pip.

The best way to install it I found so far is pip install -e .
Is there a better way to include aiohttp_admin into user's project?

Move from docker machine to just docker

Machine was the only way to run Docker on Mac or Windows previous to Docker v1.12. (from the docs)

I would like to try and switch from docker machine to just docker.

  • it is default
  • even though I tried to run tests on mac - I had some troubles switching
  • currently DOCKER_MACHINE_IP option is spread in places it shouldn't be (e.g. polls app it overrides host from config)

SimpleType modifies value during validation

SimpleType is defined as t.Int | t.Bool | t.String | t.Float which is used to validate ListQuery and Filters, in particular. During this validation it converts int-like strings to int. Later the filters are created with respect to collection schema. The value gets checked again but it is not string anymore which results in an error.

So a quick example of this error: you have a string column and you are trying to use int-like value in a filter.

There's a related trafaret issue. Usage of newly-introduced Raw-types is suggested.

ng-admin debug mode

ng-admin currently compiled and minified with all possible dependencies. I think having some sort of debug mode, when sources of ng-admin are readable, could be very helpful.

@goliney is it possible to build ng-admin without minification or attach source maps somehow?

Add UUID support

It is possible to add support for UUID types (sqlalchemy.dialects.postgresql.base.UUID and sqlalchemy_utils.types.uuid.UUIDType) in backend/sa_utils.py ?
And add serialize for UUID and Enum types in utils.py ?

Motor AttributeError

ERROR:aiohttp.server:Error handling request
Traceback (most recent call last):
File "/home/oscar/.pyenv/versions/ads/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 390, in start
resp = await self._request_handler(request)
File "/home/oscar/.pyenv/versions/ads/lib/python3.6/site-packages/aiohttp/web_app.py", line 352, in _handle
resp = await handler(request)
File "/home/oscar/.pyenv/versions/ads/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 106, in impl
return await handler(request)
File "/home/oscar/.pyenv/versions/ads/lib/python3.6/site-packages/aiohttp_session/init.py", line 149, in factory
response = await handler(request)
File "/home/oscar/.pyenv/versions/ads/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 106, in impl
return await handler(request)
File "/home/oscar/.pyenv/versions/ads/lib/python3.6/site-packages/aiohttp_admin/backends/mongo.py", line 47, in list
count = await self._collection.find(query).count()
AttributeError: 'AsyncIOMotorCursor' object has no attribute 'count'

trafaret 2.0.0 breaks, consider pinning version

text-ferret_1  | Postgres is up - continuing...
text-ferret_1  | INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
text-ferret_1  | INFO  [alembic.runtime.migration] Will assume transactional DDL.
text-ferret_1  | Traceback (most recent call last):
text-ferret_1  |   File "/usr/local/bin/adev", line 8, in <module>
text-ferret_1  |     sys.exit(cli())
text-ferret_1  |   File "/usr/local/lib/python3.7/site-packages/click/core.py", line 764, in __call__
text-ferret_1  |     return self.main(*args, **kwargs)
text-ferret_1  |   File "/usr/local/lib/python3.7/site-packages/click/core.py", line 717, in main
text-ferret_1  |     rv = self.invoke(ctx)
text-ferret_1  |   File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
text-ferret_1  |     return _process_result(sub_ctx.command.invoke(sub_ctx))
text-ferret_1  |   File "/usr/local/lib/python3.7/site-packages/click/core.py", line 956, in invoke
text-ferret_1  |     return ctx.invoke(self.callback, **ctx.params)
text-ferret_1  |   File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
text-ferret_1  |     return callback(*args, **kwargs)
text-ferret_1  |   File "/usr/local/lib/python3.7/site-packages/aiohttp_devtools/cli.py", line 84, in runserver
text-ferret_1  |     run_app(*_runserver(**active_config))
text-ferret_1  |   File "/usr/local/lib/python3.7/site-packages/aiohttp_devtools/runserver/main.py", line 45, in runserver
text-ferret_1  |     config.import_app_factory()
text-ferret_1  |   File "/usr/local/lib/python3.7/site-packages/aiohttp_devtools/runserver/config.py", line 134, in import_app_factory
text-ferret_1  |     module = import_module(module_path)
text-ferret_1  |   File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
text-ferret_1  |     return _bootstrap._gcd_import(name[level:], package, level)
text-ferret_1  |   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
text-ferret_1  |   File "<frozen importlib._bootstrap>", line 983, in _find_and_load
text-ferret_1  |   File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
text-ferret_1  |   File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
text-ferret_1  |   File "<frozen importlib._bootstrap_external>", line 728, in exec_module
text-ferret_1  |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
text-ferret_1  |   File "/report/report/app.py", line 13, in <module>
text-ferret_1  |     from .admin import setup_admin
text-ferret_1  |   File "/report/report/admin.py", line 1, in <module>
text-ferret_1  |     import aiohttp_admin
text-ferret_1  |   File "/src/aiohttp-admin/aiohttp_admin/__init__.py", line 5, in <module>
text-ferret_1  |     from .admin import (
text-ferret_1  |   File "/src/aiohttp-admin/aiohttp_admin/admin.py", line 8, in <module>
text-ferret_1  |     from .utils import json_response, validate_payload, LoginForm
text-ferret_1  |   File "/src/aiohttp-admin/aiohttp_admin/utils.py", line 50, in <module>
text-ferret_1  |     SimpleType = t.IntRaw | t.Bool | t.String | t.FloatRaw
text-ferret_1  | AttributeError: module 'trafaret' has no attribute 'IntRaw'

Add Admin-On-Rest/Searchkit for Material UI and React.js client

Hi guys,

Hope you are all well !

I was giving a try to aio-libs and I saw that ng-admin was integrated but it would be awesome and more interesting to add, from the same authors, admin-on-rest for a maetrial ui and reactjs version of the admin interface. ( link). It would fit greatly also with https://github.com/searchkit/searchkit.

Some others related links that could fit perfectly with aio-libs:

Can you estimate how complicated it would be ? Have you already discussed that ?

Have a great day !

Cheers,
Richard

New release?

Hi there, when can I expect a new release of the source code?

Enums no appropriate shows in admin

Thanks for your product. It helps much.

Scope

In admin-panel some list resources that have enum property

Prerequisites

class AuthConfirmType(enum.Enum):
    SMS = "СМС"
    BIRTH_DAY = "Дата рождения"

settings = sa.Table(
    "settings",
    meta,
    sa.Column("id", sa.Integer(), primary_key=True),
   .....
   sa.Column(
        "auth_confirm_by",
        sa.Enum(AuthConfirmType),
        nullable=True,
    )
)

Description

In admin-panel I catch error on detail-action.
if I change enums on this (add str )

class AuthConfirmType(str, enum.Enum):
    SMS = "СМС"
    BIRTH_DAY = "Дата рождения"

I will catch misleading value, that no will use properly.

To hook this misbehavior need override jsonEncoder, but in PGResource I can't use mixins, ( only copy-paste,
It's pain

Several operators per field in mongo filters

Looks like you can't use both $gt and $lt in the filter.
mongo_utils.create_filter creates dict for query and then iterates through operators and assigns operator to the fiels in mongo_utils.op instead of adding it. One possible solution could be creating default dict with dict factory instead of dict in mongo_utils.create_filter and updating it in mongo_utils.op.

Yum broken when RPM from this requirement with underscores.

Please never use underscores in python-packages names.

PEP-008 conatins

Python packages should also have short, all-lowercase names, although the use of underscores is discouraged.

We have a really problem. When our build system convert all dependencies to RPM (using FPM) yum is broken. We are can't use this package in our projects.

What i need to do after installing aiohttp_admin??

I have already installed aiohttp_admin but there arent anything in the documentation what to do after installing. What i need to import and where i need to do it. Please can you write it in the documentation.

Fix yarn install

5.51s$ yarn install
yarn install v0.17.0
$ rm -rf ./aiohttp_admin/static/ng-admin/
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
error An unexpected error occurred: "ENOENT: no such file or directory, lstat '/home/travis/.cache/yarn/npm-angular-ui-codemirror-0.3.0-9246cd11e9b9a986ea553788a20a0be677f171f0'".
info If you think this is a bug, please open a bug report with the information provided in "/home/travis/build/aio-libs/aiohttp_admin/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

for example see https://travis-ci.org/aio-libs/aiohttp_admin/jobs/176128987

@goliney not urgent, please take a look on free time

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.