Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
80027d2c
Kaydet (Commit)
80027d2c
authored
Ara 25, 2013
tarafından
Yaroslav Halchenko
Kaydeden (comit)
Tim Graham
Ara 25, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Unified listing of shell commands/code
- use code-block:: bash - prefix the command with $
üst
0dd90756
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
28 deletions
+45
-28
upgrade-version.txt
docs/howto/upgrade-version.txt
+1
-1
unit-tests.txt
docs/internals/contributing/writing-code/unit-tests.txt
+27
-17
tutorial01.txt
docs/intro/tutorial01.txt
+14
-7
tutorial02.txt
docs/intro/tutorial02.txt
+1
-1
django-admin.txt
docs/ref/django-admin.txt
+2
-2
No files found.
docs/howto/upgrade-version.txt
Dosyayı görüntüle @
80027d2c
...
@@ -54,7 +54,7 @@ The most convenient way is to use pip_ with the ``--upgrade`` or ``-U`` flag:
...
@@ -54,7 +54,7 @@ The most convenient way is to use pip_ with the ``--upgrade`` or ``-U`` flag:
.. code-block:: bash
.. code-block:: bash
pip install -U Django
$
pip install -U Django
pip_ also automatically uninstalls the previous version of Django.
pip_ also automatically uninstalls the previous version of Django.
...
...
docs/internals/contributing/writing-code/unit-tests.txt
Dosyayı görüntüle @
80027d2c
...
@@ -30,15 +30,17 @@ sample settings module that uses the SQLite database. To run the tests:
...
@@ -30,15 +30,17 @@ sample settings module that uses the SQLite database. To run the tests:
.. code-block:: bash
.. code-block:: bash
git clone git@github.com:django/django.git django-repo
$
git clone git@github.com:django/django.git django-repo
cd django-repo/tests
$
cd django-repo/tests
PYTHONPATH=..:$PYTHONPATH ./runtests.py
$
PYTHONPATH=..:$PYTHONPATH ./runtests.py
.. versionchanged:: 1.7
.. versionchanged:: 1.7
Older versions of Django required specifying a settings file:
:
Older versions of Django required specifying a settings file:
PYTHONPATH=..:$PYTHONPATH python ./runtests.py --settings=test_sqlite
.. code-block:: bash
$ PYTHONPATH=..:$PYTHONPATH python ./runtests.py --settings=test_sqlite
``runtests.py`` now uses ``test_sqlite`` by default if settings aren't provided
``runtests.py`` now uses ``test_sqlite`` by default if settings aren't provided
through either ``--settings`` or :envvar:`DJANGO_SETTINGS_MODULE`.
through either ``--settings`` or :envvar:`DJANGO_SETTINGS_MODULE`.
...
@@ -111,7 +113,7 @@ internationalization, type:
...
@@ -111,7 +113,7 @@ internationalization, type:
.. code-block:: bash
.. code-block:: bash
./runtests.py --settings=path.to.settings generic_relations i18n
$
./runtests.py --settings=path.to.settings generic_relations i18n
How do you find out the names of individual tests? Look in ``tests/`` — each
How do you find out the names of individual tests? Look in ``tests/`` — each
directory name there is the name of a test. Contrib app names are also valid
directory name there is the name of a test. Contrib app names are also valid
...
@@ -123,13 +125,13 @@ of the ``i18n`` module, type:
...
@@ -123,13 +125,13 @@ of the ``i18n`` module, type:
.. code-block:: bash
.. code-block:: bash
./runtests.py --settings=path.to.settings i18n.tests.TranslationTests
$
./runtests.py --settings=path.to.settings i18n.tests.TranslationTests
Going beyond that, you can specify an individual test method like this:
Going beyond that, you can specify an individual test method like this:
.. code-block:: bash
.. code-block:: bash
./runtests.py --settings=path.to.settings i18n.tests.TranslationTests.test_lazy_objects
$
./runtests.py --settings=path.to.settings i18n.tests.TranslationTests.test_lazy_objects
Running the Selenium tests
Running the Selenium tests
~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~
...
@@ -141,7 +143,7 @@ the tests with the ``--selenium`` option:
...
@@ -141,7 +143,7 @@ the tests with the ``--selenium`` option:
.. code-block:: bash
.. code-block:: bash
./runtests.py --settings=test_sqlite --selenium admin_inlines
$
./runtests.py --settings=test_sqlite --selenium admin_inlines
.. _running-unit-tests-dependencies:
.. _running-unit-tests-dependencies:
...
@@ -165,9 +167,11 @@ dependencies:
...
@@ -165,9 +167,11 @@ dependencies:
You can find these dependencies in `pip requirements files`_ inside the
You can find these dependencies in `pip requirements files`_ inside the
``tests/requirements`` directory of the Django source tree and install them
``tests/requirements`` directory of the Django source tree and install them
like so:
:
like so:
pip install -r tests/requirements/py2.txt # Python 3: py3.txt
.. code-block:: bash
$ pip install -r tests/requirements/py2.txt # Python 3: py3.txt
You can also install the database adapter(s) of your choice using
You can also install the database adapter(s) of your choice using
``oracle.txt``, ``mysql.txt``, or ``postgres.txt``.
``oracle.txt``, ``mysql.txt``, or ``postgres.txt``.
...
@@ -200,13 +204,17 @@ Contributors are encouraged to run coverage on the test suite to identify areas
...
@@ -200,13 +204,17 @@ Contributors are encouraged to run coverage on the test suite to identify areas
that need additional tests. The coverage tool installation and use is described
that need additional tests. The coverage tool installation and use is described
in :ref:`testing code coverage<topics-testing-code-coverage>`.
in :ref:`testing code coverage<topics-testing-code-coverage>`.
To run coverage on the Django test suite using the standard test settings::
To run coverage on the Django test suite using the standard test settings:
.. code-block:: bash
$ coverage run ./runtests.py --settings=test_sqlite
coverage run ./runtests.py --settings=test_sqlite
After running coverage, generate the html report by running:
After running coverage, generate the html report by running::
.. code-block:: bash
coverage html
$
coverage html
When running coverage for the Django tests, the included ``.coveragerc``
When running coverage for the Django tests, the included ``.coveragerc``
settings file defines ``coverage_html`` as the output directory for the report
settings file defines ``coverage_html`` as the output directory for the report
...
@@ -225,6 +233,8 @@ multiple modules by using a ``tests`` directory in the normal Python way.
...
@@ -225,6 +233,8 @@ multiple modules by using a ``tests`` directory in the normal Python way.
If you have URLs that need to be mapped, put them in ``tests/urls.py``.
If you have URLs that need to be mapped, put them in ``tests/urls.py``.
To run tests for just one contrib app (e.g. ``auth``), use the same
To run tests for just one contrib app (e.g. ``auth``), use the same
method as above::
method as above:
.. code-block:: bash
./runtests.py --settings=settings django.contrib.auth
$
./runtests.py --settings=settings django.contrib.auth
docs/intro/tutorial01.txt
Dosyayı görüntüle @
80027d2c
...
@@ -17,7 +17,7 @@ tell Django is installed and which version by running the following command:
...
@@ -17,7 +17,7 @@ tell Django is installed and which version by running the following command:
.. code-block:: bash
.. code-block:: bash
python -c "import django; print(django.get_version())"
$
python -c "import django; print(django.get_version())"
If Django is installed, you should see the version of your installation. If it
If Django is installed, you should see the version of your installation. If it
isn't, you'll get an error telling "No module named django".
isn't, you'll get an error telling "No module named django".
...
@@ -55,7 +55,7 @@ code, then run the following command:
...
@@ -55,7 +55,7 @@ code, then run the following command:
.. code-block:: bash
.. code-block:: bash
django-admin.py startproject mysite
$
django-admin.py startproject mysite
This will create a ``mysite`` directory in your current directory. If it didn't
This will create a ``mysite`` directory in your current directory. If it didn't
work, see :ref:`troubleshooting-django-admin-py`.
work, see :ref:`troubleshooting-django-admin-py`.
...
@@ -131,8 +131,13 @@ The development server
...
@@ -131,8 +131,13 @@ The development server
----------------------
----------------------
Let's verify this worked. Change into the outer :file:`mysite` directory, if
Let's verify this worked. Change into the outer :file:`mysite` directory, if
you haven't already, and run the command ``python manage.py runserver``. You'll
you haven't already, and run the command:
see the following output on the command line:
.. code-block:: bash
$ python manage.py runserver
You'll see the following output on the command line:
.. parsed-literal::
.. parsed-literal::
...
@@ -568,9 +573,11 @@ make new ones - it specialises in upgrading your database live, without
...
@@ -568,9 +573,11 @@ make new ones - it specialises in upgrading your database live, without
losing data. We'll cover them in more depth in a later part of the tutorial,
losing data. We'll cover them in more depth in a later part of the tutorial,
but for now, remember the three-step guide to making model changes:
but for now, remember the three-step guide to making model changes:
* Change your models (in models.py)
* Change your models (in ``models.py``).
* Run ``python manage.py makemigrations`` to create migrations for those changes
* Run :djadmin:`python manage.py makemigrations <makemigrations>` to create
* Run ``python manage.py migrate`` to apply those changes to the database.
migrations for those changes
* Run :djadmin:`python manage.py migrate <migrate>` to apply those changes to
the database.
The reason there's separate commands to make and apply migrations is because
The reason there's separate commands to make and apply migrations is because
you'll commit migrations to your version control system and ship them with
you'll commit migrations to your version control system and ship them with
...
...
docs/intro/tutorial02.txt
Dosyayı görüntüle @
80027d2c
...
@@ -469,7 +469,7 @@ template directory in the source code of Django itself
...
@@ -469,7 +469,7 @@ template directory in the source code of Django itself
.. code-block:: bash
.. code-block:: bash
python -c "
$
python -c "
import sys
import sys
sys.path = sys.path[1:]
sys.path = sys.path[1:]
import django
import django
...
...
docs/ref/django-admin.txt
Dosyayı görüntüle @
80027d2c
...
@@ -38,8 +38,8 @@ Usage
...
@@ -38,8 +38,8 @@ Usage
.. code-block:: bash
.. code-block:: bash
django-admin.py <command> [options]
$
django-admin.py <command> [options]
manage.py <command> [options]
$
manage.py <command> [options]
``command`` should be one of the commands listed in this document.
``command`` should be one of the commands listed in this document.
``options``, which is optional, should be zero or more of the options available
``options``, which is optional, should be zero or more of the options available
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment