Skip to content

Instantly share code, notes, and snippets.

from django.shortcuts import render
from forms import DeptForm
from django.http import HttpResponse
from librehatti.catalog.models import Category, PurchaseOrder,PurchasedItem
def add_material(request):
if request.method == 'POST':
form = DeptForm(request.POST)
<html>
<head>
<title>Lab Reports</title>
</head>
<body>
<form action='librehatti/print/views/add_material' method='POST'>
{% csrf_token %}
<b>Material:</b>
<select>
{% for i in material_name %}
<html>
<h1 style="text-align:center;">GURU NANAK DEV ENGINEERING COLLEGE</h1>
<p style="text-align:center;">punjab Govt. Aided Status, NBA Accredited ISO-9001-2008 Certified</p>
<p style="text-align:center;font-size:200%;">Testing & Consultancy Cell</p>
<p style="text-align:center;">Gill Park, Gill Road, Ludhiana-141006</p>
<p style="text-align:center;">Website:http//tcc.gndec.ac.in Email:tcc@gndec.ac.in Ph:0161-2491193,5064509 Fax:0161-5064742</p>
<head><title>Lab Reports</title></head>
<table style="border:1px solid black;border-collapse:collapse;width:1000px">
from django.shortcuts import render
from django.http import HttpResponse
from librehatti.bills.models import QuotedOrder, QuotedItem
from librehatti.catalog.models import *
from django.contrib.auth.models import User
import useraccounts
def proforma(request):
quoted_order = QuotedOrder.objects.get(id=quote_buyer_id)
from django.shortcuts import render
from models import TaDa
from forms import TaDaForm
from django.db.models import Sum
def tada_form(request):
ob= TaDa.objects.filter(id=1).values('departure_time_from_tcc','arrival_time_at_site',
'departure_time_from_site','arrival_time_at_tcc',
'tada_amount','start_test_date','end_test_date',
'testing_site','testing_staff')
<html>
<head>
<title> TA/DA Form </title>
</head>
<style>
h2 { text-align : center;}
.form { margin-left:40%; }
.button {margin-left:50%; }
</style>
<body>
from django.db import models
class TaDa(models.Model):
#suspence = models.ForeignKey(SuspenceOrder)
suspence_id= models.IntegerField()
departure_time_from_tcc= models.TimeField()
arrival_time_at_site = models.TimeField()
departure_time_from_site = models.TimeField()
arrival_time_at_tcc = models.TimeField()
tada_amount = models.IntegerField()
@divyanshikathuria
divyanshikathuria / structure.php
Created October 12, 2014 13:01
I have incorporated dataproviders in the test.
<?php
/**
* The tests here verify the structure of the code. This is for outright bugs,
* not just style issues.
*/
class StructureTest extends MediaWikiTestCase {
/**
* Verify all files that appear to be tests have file names ending in
* Test. If the file names do not end in Test, they will not be run.
* @group medium