Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,4 @@ bower_components
assets/
node_modules

djangosnippets/static/css/site.css
theme/static/css/dist/styles.css
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ In a Python 3.11 virtual environment::
$ cd requirements
$ pip install -r development.txt
$ cd ..
$ python manage.py tailwind install
$ python manage.py migrate

Now you can start the development server::
Expand All @@ -63,9 +64,9 @@ are included in the fixtures folder. Also included are five snippets to get you
$ python manage.py createsuperuser
$ python manage.py loaddata fixtures/cab.json

You will need to build the site.css with tailwindcss::
To use Tailwind, you need to start the Tailwind server::

$ npm run build
$ python manage.py tailwind start

Now you should be able to use the development version of djangosnippets
on port 8000.
Expand Down
3 changes: 3 additions & 0 deletions djangosnippets/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ def user_url(user):
"comments_spamfighter",
"ratings",
"taggit",
"tailwind",
"theme",
"django_recaptcha",
"django_extensions",
"rest_framework",
Expand Down Expand Up @@ -104,6 +106,7 @@ def user_url(user):
STATIC_URL = "/assets/static/"
STATIC_ROOT = os.path.join(PROJECT_ROOT, "..", "assets", "static")
STATICFILES_DIRS = (os.path.join(PROJECT_ROOT, "static"),)
TAILWIND_APP_NAME = "theme"

SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
MESSAGE_STORAGE = "django.contrib.messages.storage.session.SessionStorage"
Expand Down
22 changes: 0 additions & 22 deletions djangosnippets/static/tailwind/site.css

This file was deleted.

4 changes: 2 additions & 2 deletions djangosnippets/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load static %}<!DOCTYPE html>
{% load static tailwind_tags %}<!DOCTYPE html>
<html lang="en">
<head>
<title>djangosnippets: {% block head_title %}Home{% endblock %}</title>
Expand All @@ -7,9 +7,9 @@
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css">
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/smoothness/jquery-ui.css" />
<link rel="alternate" href="{% url 'cab_feed_latest' %}" type="application/atom+xml" title="Feed of latest snippets" />
<link href="{% static "css/site.css" %}" rel="stylesheet">
<link rel="stylesheet" href="{% static "css/main.css" %}" type="text/css" />
{% block feeds %}{% endblock %}
{% tailwind_css %}
</head>
<body class="{% block bodyclass %}{% endblock %}">
<div id="accountbar"><div class="inner">
Expand Down
Loading