Skip to content

Instantly share code, notes, and snippets.

🍑

Qasim Albaqali qasimalbaqali

🍑
View GitHub Profile
View .block
license: mit
@qasimalbaqali
qasimalbaqali / .block
Created Oct 21, 2019
Fast Interactive Canvas Scatterplot
View .block
license: mit
View Baggage.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VDBCore
{
public class Baggage
{
View Flight.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RandomNameGeneratorLibrary;
namespace VDBCore
{
public class Flight
@qasimalbaqali
qasimalbaqali / models.py
Created Aug 22, 2015
Uploading multiple images in Django using Fromset(modelformset_factory). Read more on my blogpost http://qasimalbaqali.com/uploading-multiple-images-in-django-for-a-single-post/
View models.py
class PostForm(forms.ModelForm):
title = forms.CharField(max_length=128)
body = forms.CharField(max_length=245, label="Item Description.")
class Meta:
model = Post
fields = ('title', 'body', )
class ImageForm(forms.ModelForm):
@qasimalbaqali
qasimalbaqali / index.html
Last active Aug 29, 2015
How a template would look like when using two models in a Django ListView http://stackoverflow.com/questions/12187751/django-pass-multiple-models-to-one-template
View index.html
{% for post in posts %}
<a href="{% url 'post' post_name_slug=post.slug %}"></a>
{% endfor %}
{% for post_comments in comments %}
{{ post_comments }}
{% endfor %}
You can’t perform that action at this time.