Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2154a90

Browse files
authored
docs: add details to CSS generation (#2623)
* docs: add details to CSS generation* docs: no NBSP* docs: note automatic compiles
1 parent354631b commit2154a90

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

‎docs/source/install.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ This is a simple wrapper around running `python manage.py` in the container, all
8888
Manual setup
8989
------------
9090

91-
First, install [PostgreSQL](https://www.postgresql.org/download/) on your machine and run it. *pythondotorg* currently uses Postgres 15.x.
91+
First, install[PostgreSQL](https://www.postgresql.org/download/)on your machine and run it.*pythondotorg*currently uses Postgres 15.x.
9292

9393
Then clone the repository:
9494

@@ -102,13 +102,13 @@ Then create a virtual environment:
102102
$ python3 -m venv venv
103103
```
104104

105-
And then you'll need to install dependencies. You don't need to use `pip3` inside a Python 3 virtual environment:
105+
And then you'll need to install dependencies. You don't need to use`pip3`inside a Python 3 virtual environment:
106106

107107
```
108108
$ pip install -r dev-requirements.txt
109109
```
110110

111-
*pythondotorg* will look for a PostgreSQL database named `pythondotorg` by default. Run the following command to create a new database:
111+
*pythondotorg*will look for a PostgreSQL database named`pythondotorg`by default. Run the following command to create a new database:
112112

113113
```
114114
$ createdb pythondotorg -E utf-8 -l en_US.UTF-8
@@ -121,7 +121,7 @@ If the above command fails to create a database and you see an error message sim
121121
createdb: database creation failed: ERROR: permission denied to create database
122122
```
123123
124-
Use the following command to create a database with *postgres* user as the owner:
124+
Use the following command to create a database with*postgres*user as the owner:
125125
126126
```
127127
$ sudo -u postgres createdb pythondotorg -E utf-8 -l en_US.UTF-8
@@ -135,25 +135,25 @@ If you get an error like this:
135135
createdb: database creation failed: ERROR: new collation (en_US.UTF-8) is incompatible with the collation of the template database (en_GB.UTF-8)
136136
```
137137
138-
Then you will have to change the value of the `-l` option to what your database was set up with initially.
138+
Then you will have to change the value of the`-l`option to what your database was set up with initially.
139139
````
140140

141-
To change database configuration, you can add the following setting to `pydotorg/settings/local.py` (or you can use the `DATABASE_URL` environment variable):
141+
To change database configuration, you can add the following setting to`pydotorg/settings/local.py`(or you can use the`DATABASE_URL`environment variable):
142142

143143
```
144144
DATABASES = {
145145
'default': dj_database_url.parse('postgres:///your_database_name'),
146146
}
147147
```
148148

149-
If you prefer to use a simpler setup for your database you can use SQLite. Set the `DATABASE_URL` environment variable for the current terminal session:
149+
If you prefer to use a simpler setup for your database you can use SQLite. Set the`DATABASE_URL`environment variable for the current terminal session:
150150

151151
```
152152
$ export DATABASE_URL="sqlite:///pythondotorg.db"
153153
```
154154

155155
```{note}
156-
If you prefer to set this variable in a more permanent way add the above line in your `.bashrc` file. Then it will be set for all terminal sessions in your system.
156+
If you prefer to set this variable in a more permanent way add the above line in your`.bashrc`file. Then it will be set for all terminal sessions in your system.
157157
```
158158

159159
Whichever database type you chose, now it's time to run migrations:
@@ -162,15 +162,15 @@ Whichever database type you chose, now it's time to run migrations:
162162
$ ./manage.py migrate
163163
```
164164

165-
To compile and compress static media, you will need *compass* and *yui-compressor*:
165+
To compile and compress static media, you will need*compass*and*yui-compressor*:
166166

167167
```
168168
$ gem install bundler
169169
$ bundle install
170170
```
171171

172172
```{note}
173-
To install *yui-compressor*, use your OS's package manager or download it directly then add the executable to your `PATH`.
173+
To install*yui-compressor*, use your OS's package manager or download it directly then add the executable to your`PATH`.
174174
```
175175

176176
To create initial data for the most used applications, run:
@@ -179,7 +179,7 @@ To create initial data for the most used applications, run:
179179
$ ./manage.py create_initial_data
180180
```
181181

182-
See [create_initial_data](https://pythondotorg.readthedocs.io/commands.html#command-create-initial-data) for the command options to specify while creating initial data.
182+
See`pythondotorg`[create_initial_data](https://pythondotorg.readthedocs.io/commands.html#command-create-initial-data)for the command options to specify while creating initial data.
183183

184184
Finally, start the development server:
185185

@@ -190,19 +190,24 @@ $ ./manage.py runserver
190190
Optional: Install Elasticsearch
191191
-------------------------------
192192

193-
The search feature in Python.org uses Elasticsearch engine. If you want to test out this feature, you will need to install [Elasticsearch](https://www.elastic.co/downloads/elasticsearch).
193+
The search feature in Python.org uses Elasticsearch engine. If you want to test out this feature, you will need to install[Elasticsearch](https://www.elastic.co/downloads/elasticsearch).
194194

195-
Once you have it installed, update the URL value of `HAYSTACK_CONNECTIONS` settings in `pydotorg/settings/local.py` to your local ElasticSearch server.
195+
Once you have it installed, update the URL value of`HAYSTACK_CONNECTIONS`settings in`pydotorg/settings/local.py`to your local ElasticSearch server.
196196

197197
Generating CSS files automatically
198198
----------------------------------
199199

200-
Due to performance issues of [django-pipeline](https://github.com/jazzband/django-pipeline/issues/313), we are using a dummy compiler `pydotorg.compilers.DummySASSCompiler` in development mode. To generate CSS files, use `sass` itself in a separate terminal window:
200+
```{warning}
201+
When editing frontend styles, ensure you ONLY edit the `.scss` files.
201202
203+
These will then be compiled into `.css` files automatically.
202204
```
203-
$ cd static
204-
$ sass --compass --scss -I $(dirname $(dirname $(gem which susy))) --trace --watch sass/style.scss:sass/style.css
205-
```
205+
206+
Static files are automatically compiled inside the[Docker Compose`static` container](../../docker-compose.yml)
207+
when running`make serve`.
208+
209+
When your pull request has stylesheet changes, commit the`.scss` files and the compiled`.css` files.
210+
Otherwise, ignore committing and pushing the`.css` files.
206211

207212
Running tests
208213
-------------
@@ -220,7 +225,7 @@ $ coverage run manage.py test
220225
$ coverage report
221226
```
222227

223-
Generate an HTML report with `coverage html` if you like.
228+
Generate an HTML report with`coveragehtml`if you like.
224229

225230
Useful commands
226231
---------------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp