Code Monkey home page Code Monkey logo

storybook-django's People

Contributors

thibaudcolas 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

Watchers

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

storybook-django's Issues

can i use this to build my own server side pattern library aimed at tailwindcss?

Hi there,

I am a bit confused tho I am familiar with Django.

Currently I use django-tailwind which requires me to create a separate theme app inside my Django project.

I like to build a UI component library so that

  1. the components can be reused within the same Django project
  2. and then eventually I can make it reusable across all Django projects that also use django-tailwind

Given this in mind, do I still follow the instructions given here to first install django-pattern-library followed by the npm installation of storybook-django and selecting HTML for the storybook template?

This project no longer runs correctly

Describe the bug

When I start this project to demo its capabilities, it does not proxy the rendered markup into storybook.

I have the Django project running and the storybook running.

Environment

Mac Sonoma
Python 3.9.18

Steps to reproduce

(Write your steps here:)

  1. Clone or download code for project
  2. python -m venv --prompt sb .venv
  3. source .venv/bin/activate
  4. pip install -r requirements.txt
  5. npm install
  6. python manage.py runserver 0:8001
  7. npm run start

Expected behavior

I expected to be able to navigate the Storybook and see the components

Actual behavior

I receive this error in Storybook Error occurred while trying to proxy: localhost:6006/pattern-library/api/v1/render-pattern

image

Usage with Vue

How tightly coupled is this with React ? I'm reading through the code but I'm having trouble seeing what would need to be done to get it working with Vue.

Am I right to say if I don't use any client side frameworks like React, Vue, etc I should just stick to pattern-library?

I have been experimenting and trying to solve my own issues and after a while I am beginning to grok.

The storybook-django is solely for those who want to use a client side framework like React to work with Django via REST.

If I have no intention of using a client-side and use purely serverside rendering, I should stick to pattern-library.

In other words, pattern-library is your attempt at providing a storybook for server side rendering?

Did I get that right?

What does it mean to copy `demo/storybook` into your project?

I have finished the installation for django-pattern-library.

image

i have finished with npx and npm install commands.

Then i see a copy demo/storybook into the project. Copy to where exactly?

And why do I need to copy given that i already npm install storybook-django?

image

Document tag overrides

Is your proposal related to a problem?

This would be nice to document in here so we have a clear example of how to do this with Storybook.

Describe the solution you’d like

Add documentation about this in the README. Technically 99% of the implementation on this is from DPL and has nothing to do with Storybook, but it’d be nice to document this with the Storybook syntax in JS nonetheless.

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.