This commit is contained in:
Andros Fenollosa 2024-03-01 09:20:05 +01:00
parent cf436b3da0
commit 2337fc3f49
3 changed files with 97 additions and 8 deletions

View File

@ -91,8 +91,13 @@ a:hover,
padding-bottom: 0; padding-bottom: 0;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
}
@media (width < 600px) {
.nav-main__link--logo {
z-index: -1; z-index: -1;
} }
}
.image { .image {
display: block; display: block;

91
one.org
View File

@ -321,6 +321,38 @@ And open the browser at ~http://localhost:8000/~. You should see the home page w
#+ATTR_HTML: :class block-center #+ATTR_HTML: :class block-center
[[#/img/quickstart/minimal-template.webp][Random number]] [[#/img/quickstart/minimal-template.webp][Random number]]
* FAQ
:PROPERTIES:
:ONE: one-custom-default-doc
:CUSTOM_ID: /docs/faq/
:TITLE: FAQ (Frequently Asked Questions)
:DESCRIPTION: Frequently asked questions about Django LiveView.
:END:
** Do I need to know JavaScript to use Django LiveView?
No, you don't need. You can create SPAs without using APIs, without JavaScript, and without learning anything new. If you know Python, you know how to use Django LiveView.
** Can I use JavaScript?
Yes, you can. You can use JavaScript to capture events, send and receive strings over a WebSockets channel.
** Can I use Django's native tools?
Of course. You can still use all of Django's native tools, such as its ORM, forms, plugins, etc.
** Do I need to use React, Vue, Angular or any other frontend framework?
No. All logic, rendering and state is in the backend.
** Can I use Django REST Framework or GraphQL?
Yes, you can.
** Who finances the project?
Only me and my free time.
* Tutorials * Tutorials
:PROPERTIES: :PROPERTIES:
:ONE: one-custom-default-page :ONE: one-custom-default-page
@ -329,7 +361,64 @@ And open the browser at ~http://localhost:8000/~. You should see the home page w
:DESCRIPTION: List of all tutorials. :DESCRIPTION: List of all tutorials.
:END: :END:
In progress - [[#/tutorials/make-a-blog/][Make a blog]]
- [[#/tutorials/add-a-commentary-system/][Add a commentary system]]
* Make a blog
:PROPERTIES:
:ONE: one-custom-default-page
:CUSTOM_ID: /tutorials/make-a-blog/
:TITLE: Make a blog
:DESCRIPTION: Create a blog using Django LiveView.
:END:
Below we will make a simple blog with classic features:
- A list with posts
- Single page post
- Controls to navegate between list posts and singles
- Pagination
- Search
If you want to include a system commentary, read the next tutorial.
** Creating models
Before starting, we will create the models that we will use in the blog.
** Adding fake data
** Preparing views (SSR)
** Making templates
** Including actions
** Adding the feature: infinite scroll
** Adding the feature: search
* Add a commentary system
:PROPERTIES:
:ONE: one-custom-default-page
:CUSTOM_ID: /tutorials/add-a-commentary-system/
:TITLE: Make a blog
:DESCRIPTION: Create a commentary system using Django LiveView.
:END:
** Creating models
** Adding fake data
** Preparing views (SSR)
** Making templates
** Including actions
** Getting data
** Showing
* Source code * Source code
:PROPERTIES: :PROPERTIES:

View File

@ -105,13 +105,8 @@
(:ul.nav__list.nav__list--docs.nav-docs__list (:ul.nav__list.nav__list--docs.nav-docs__list
(:li.nav-docs__item (:li.nav-docs__item
(:a.nav-docs__link (@ :href "/docs/quickstart/") "Quickstart")) (:a.nav-docs__link (@ :href "/docs/quickstart/") "Quickstart"))
(:li.nav-docs__item
(:a.nav-docs__link (@ :href "/docs/installation/") "Installation"))
(:li.nav-docs__item
(:a.nav-docs__link (@ :href "/docs/usage/") "Usage"))
(:li.nav-docs__item (:li.nav-docs__item
(:a.nav-docs__link (@ :href "/docs/faq/") "FAQ")) (:a.nav-docs__link (@ :href "/docs/faq/") "FAQ"))
(:li.nav-docs__item )))
(:a.nav-docs__link (@ :href "/docs/api/") "API")))))
(:main.main.main--docs (:main.main.main--docs
,content)))))) ,content))))))