Coder Social home page Coder Social logo

absurd-django's Introduction

absurd-django's People

Contributors

patrick91 avatar wilhelmklopp 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

Watchers

 avatar  avatar  avatar  avatar

absurd-django's Issues

Failed to install JavaScript dependencies

$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"18.2.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0 || ^17.0.0" from [email protected]
npm ERR! node_modules/react-shadow
npm ERR!   react-shadow@"^19.0.3" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/markus/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/markus/.npm/_logs/2022-09-25T08_59_03_433Z-debug-0.log

Update how loading pages work

Current we always re-execute the code when the "file" changes, and when we do that we set a variable called browser_page to the URL we defined in the preview browser.

We should change this to have our javascript calling a function to load a page, its signature could look like this:

def load_page(url, method, body) -> Response:
    ...

this will allow us to also handle form events and other kinds of navigation.

Interactivity/hook iframe up to browser/browser history api (?)

It would be cool to have a button on the "my todos" page called "add" where clicking on the button adds a todo to the list of todos:

image

For simplicity this button could just be a form submit GET to the "/add" URL (or similar)

But where does the request actually go? Currently it would go to https://absurd-django.vercel.app/add as opposed to our Django app. How could we make it be served by our Django app?

@patrick91 curious what you think here and what approaches we have available to us

Fix first loading issue

At the moment we get this error when running the code for the first time:

from e
django.core.exceptions.ImproperlyConfigured: The included URLconf '__main__' does not appear to have any patterns in it. If you see the 'urlpatterns' variable with valid patterns in the file then the issue is probably caused by a circular import.

Support migrations

It would be great if we could use Django's migrations instead of manually running SQL to create/modify tables

Probably depends on #2 and #6 and maybe also #5

Add a file tree

It would be nice to allow users to write multiple files. We could even change the default template to be the django one

Persist code changes

When you make changes to the code, and then reload the page, it would be great if your changes stuck around

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.