H
H
HeartOfProgrammer2016-03-19 22:13:40
Django
HeartOfProgrammer, 2016-03-19 22:13:40

Why can't create superuser in Django?

I am using python 3.5 and django 1.9.4. wrote in terminal:

python manage.py migrate
python manage.py createsuperuser

Gives it out
Superuser creation skipped due to not running in a TTY. You can run `manage.py createsuperuser` in your project to create one manually.

I understood what the problem was, I wanted to solve it in this way:
python manage.py syncdb --noinput
python manage.py migrate
python manage.py createsuperuser

but after I write this:
python manage.py syncdb --noinput
it gives me this:
Unknown command: 'syncdb'
Type 'manage.py help' for usage.

What to do in such cases?)

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
sim3x, 2016-03-19
@sim3x

Superuser creation skipped due to not running in a TTY .
You can run `manage.py createsuperuser` in your project to create one manually.

the operation does not require automation in the form of hooks from the git - do it yourself or by hand ssh
migrate includes syncdb

N
nowm, 2015-01-21
@megapihar6

This is because :last-childis the last element of the parent container. Quite the last one. There shouldn't be any elements after it. You won't be able to use and :last-of-type, because last-of-type implies the last element by name, not by class (and if after the last div.blog-item there is at least one div at the same level of the hierarchy, this div.blog-item will stop be last-of-type).
In general, I would do separators between elements like this:

.blog-item + .blog-item {
    /* В ситуации с 5-ю элементами с классом .blog-item, которые строго 
     * следуют друг за другом, этот селектор применится
     * к элементам со второго по пятый. Первый будет проигнорирован.
     */
}

Илья Босенок, 2015-12-13
@bosenok

Если религия позволяет, сделайте с помощью JQuery

$('.blog-data .blog-item:last')
    .css('border-bottom', 'none');

G
GreatRash, 2015-01-21
@GreatRash

Потому что элемент не является последним чилдом у родителя. Последним чилдом является div.scroll. Когда вы его удаляете правило для div.blog-item вступает в силу.
Вас интересует селектор :last-of-type.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question