Advanced search
BL4CK R4BBITJuly 30, 2019, 1:46 a.m.

DjangoКак прикрутить иконки к списку

Network Social

Хочу в профиле пользователя выводить ссылки на соцсети класс соцсетей профиля оформлен следующим кодом в модели

class SocialNetworks(models.Model):
    SOCIAL_NETWORKS = (
        ('FACEBOOK', 'Facebook'),
        ('VK', 'Вконтакте'),
        ('TWITTER', 'Твиттер'),
        ('INSTAGRAMM', '…
Evgenij LegotskojOct. 27, 2018, 7:36 p.m.

DjangoDjango - Tutorial 040. How to add authentication through social networks. Facebook

Django, Facebook, Social

I added authorization on the site through Facebook.

At the same time collected a couple of pitfalls.

Before Facebook , I already added in authorization through the social network VKontakte and Google . And here I needed to create a privacy policy page, since Facebook requires this page and also requires a user agreement, but I provided a privacy policy page. I think that with the growth of the site I will add a full-fledged page of the user agreement, although it is unknown when it will be. However, the site rules are described in sufficient detail.

Also came across a strict need for https from the site. Generally, if you consider that I have https from Let`s Encrypt , I didn’t think that there would be any problem, but as it turned out, by default django-social-auth forms the return address with HTTP protocol, and for using HTTPS You need to specify this in the settings.

And now let's see how this is done.

Evgenij LegotskojJuly 16, 2018, 3:15 a.m.

DjangoDjango - Tutorial 037. How to add authentication through social networks. Google+

Social, Google, Django, Google API

The second social network through which you can authenticate on the site will be Google+.

I will not go into all the details of setting up and installing the Python Social Auth Django battery, as it was discussed in the previous article . But I note that this time the connection took only half an hour.

However, setting up access through the Google API was more complex than for VKontakte.

Evgenij LegotskojJuly 13, 2018, 3:17 a.m.

DjangoDjango - Tutorial 036. How to add authentication through social networks. VKontakte

django, Social

On the recommendation of users of the site began to add authentication through social networks to the site. The first such social network was VKontakte, as the most popular social network among users of my site.

Django itself has the necessary functionality to work with the OAuth 2.0 protocol, which could be used in the VKontakte API to authenticate users on third-party resources (and not only for authentication). But in this case I did not write my bicycle using bare OAuth support in Django, but found a very good battery, which is probably well known among developers of Django sites, which allowed to introduce authentication via VKontakte in just a couple of hours.

This battery is named Python Social Auth Django .

Let's take a step-by-step look at what we need to do to connect authentication via VKontakte to the site with Django

Evgenij LegotskojSept. 24, 2016, 9:59 a.m.

DjangoDjango - Tutorial 009. Icons of social networks "Share" without JavaScript

Share, Social

Icons of social networks, with which you can share the article from the site, has become part of everyday life for most sites. Web site promotion due to word of mouth is generally pretty efficient variant of growth of many resources, especially if the subject can affect a very large social groups. But now, in general, the question is not about that. And how to fasten a button without using these third-party services, such as buttons or by Yandex fairly well-known service UpToLike , which also allows you to track statistics.

But the main disadvantage of all these services is that they are retarding the work pages the user. Especially in recent upsets me UpToLike. Therefore, a logical step is the introduction of these keys without any JavaScript.

Fornex

Let me recommend you a great European Fornex hosting.

Fornex has proven itself to be a stable host over the years.

For Django projects I recommend VPS hosting

Following the link you will receive a 5% discount on shared hosting services, dedicated servers, VPS and VPN

View Hosting
MP

C ++ - Test 004. Pointers, Arrays and Loops

  • Result:60points,
  • Rating points-1
SI

C ++ - Test 004. Pointers, Arrays and Loops

  • Result:60points,
  • Rating points-1
k

C ++ - Test 004. Pointers, Arrays and Loops

  • Result:90points,
  • Rating points8
Last comments
H

Python: How to Test Internet Speed

In behalf of cinephiles who submit self-referential scares, these 10 movies iron crucial spirits at the audience — and themselves. The “Bay” franchise returned to theaters this weekend wit…
H

Python: How to Test Internet Speed

There may be no animus franchise that opens with as dull-witted and satiating a ritual as Scream. As the shaping followers’s logo appears on wall, we rather enter upon hearing the ringing of a l…
A
  • Andrew
  • Jan. 12, 2022, 11:41 a.m.

Qt/C++ - Lesson 038. Switching between windows in the Qt

Здравствуйте, а как сделать чтобы второе и третье окно не сохраняли свои параметры а создавались заного? Только начинаю изучать прогграмирование и пишу протенькую игру сделал 2 окна, одно с меню…
j
  • juvf
  • Dec. 28, 2021, 11:56 p.m.

Deploying Qt and QML Applications on Linux and Windows

написал приложение, холоворд на qt виджетах, без qml. Из визарда QtCreator. Собрал кросскомпилятором. Нужно перенести на таргет. juvf@juvf-VirtualBox:~/qtWs/test/imx6/release$ ~/CQtDeploye…
AO

Qt/C++ - Lesson 023. Moving QGraphicsItem on QGraphicsScene with mouse help

А есть возможность передавать координаты классу, что-бы он рисвал, допустим линию?
Now discuss on the forum
MS

Октуда берется user?

Я все понял, спасибо большое за помощь)
AB

Sorting the added QML elements in the ListModel

I am writing an alarm clock in QML, I am required to sort the alarms in ascending order (depending on the date or time (if there are several alarms on the same day). I've done the sorting …
VK

Как получить ссылку на обьект присылающий сигнал через сигнал/слот?

Вот и ответ: Спасибо Александру за подсказку. void Core::onLogin(QString m_login) { Worker *m_worker = qobject_cast (sender()); hashLogin.insert(m_login, m_wor…
v

подтвердить значение в SpinBox

Мне необходимо подтвердить значение в SpinBox нажатием клавиши Enter и перевести фокус на другое поле. self.doubleSpinBox.returnPressed.co nnect(self.pressedKeys) def pressedKeys(sel…

Сортировка по дате и времени QSortFilterProxyModel QSqlRelationalTableModel

Добрый день. Наследуйте модель сортировки от QSortFilterProxyModel и переопределите метод QSortFilterProxyModel::lessThan таким образом, чтобы вы забирали через индексы дату и в…
About
Services
© EVILEG 2015-2021
Recommend hosting TIMEWEB