https://medium.com/@rayanuthalas/build-a-video-call-website-using-django-agora-a20ba6b8e7d5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -sL https://deb.nodesource.com/setup_19.x | sudo -E bash - | |
sudo apt-get install -y nodejs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Run this command when time is not update with elastic search and it shows this error TransportError(403, u'{"message":"Signature expired: | |
sudo ntpdate ntp.ubuntu.com | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class SomeModel(models.Model): | |
email = models.EmailField() | |
first_name = models.CharField(max_length=50) | |
last_name = models.CharField(max_length=50) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scp ubuntu@<ip_address>:<path_of_file> /home/sanjay/Desktop/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button type="button" class="btn btn-success js-create-supplier" data-url="{% url 'supplier:modal-create' %}"> | |
<span class="glyphicon glyphicon-plus"></span> | |
New Supplier | |
</button> | |
<div class="modal fade" id="modal-popup" role="dialog"> | |
<div class="modal-dialog"> | |
<div class="modal-content"> | |
</div> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qs = ProductCategory.objects.all() | |
slug_list = [item['slug'] for item in cat_list if item['slug'] in qs_slugs] | |
preserved = Case(*[When(slug=slug, then=pos) for pos, slug in enumerate(slug_list)]) | |
qs= qs.order_by(preserved) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for widget in form.field_name %} | |
<tr> | |
<th> | |
<label for="{{widget.id_for_label}}"> | |
<input type="{{widget.data['type']}}" name="{{widget.data['name']}}" value="{{widget.data['value']}}" {% if widget.data['selected'] %}selected{% endif %} {% for k, v in widget.data['attrs'].items() %} {{k}}="{{v}}" {% endfor %}> | |
</label> | |
</th> | |
<td> | |
{{widget.choice_label}} | |
</td> |
NewerOlder