class Addnum(models.Model):
num1 = models.IntegerField("First number")
num2 = models.IntegerField("Second number")
# display result:
def __unicode__(self):
return "%s plus %s is %s" %(self.num1,self.num2,selfnum1+self.num2)
from django.template import Context,loader,RequestContext
from django.shortcuts import render_to_response, get_object_or_404
from django.forms import ModelForm
from project.addnums.models import Addnum
class Addnumform(forms.ModelForm):
class Meta:
model = Addnum
def getnum(request):
if request.POST:
form = Addnumform(request.POST)
if form.is_valid:
f = form.save()
#return a success view with the result
return HttpResponseRedirect("/success/%d/" % f.id)
else:
form = Addnumform()
return render_to_response('web/addnum.html',
context_instance=RequestContext(request,
{"form":form,
}))
def success(request,id):
nums = Addnum.objects.get(pk=id)
return render_to_response('web/addnum.html',
context_instance=RequestContext(request,
{"nums":nums,
}))
{% extends base.html %}
{%block content %}
{% if form.errors %} Please correct the errors below {% endif %}
{% extends base.html %}
{%block content %}
{{nums}}
{% endblock %}
I have Changed the login screen previously it was taking input User name, password, Base URL and topic or product as
Now at first User has to give the base URL which can be selected from one drop down box, and User name and password. like
After clicking login it will login to the base URL and if success full then it will go to the product selection page.
Then clicking the finish button it will load the bugs for first run depending on the selected product and continue with a screen
Once the bugs are loaded then and next run onwords it will go to the main window which will show the list of bugs already downloaded.
I have added the modify option to it if one bug is selected from the list of the bugs it can be modified with their fields and comments can be added.
Thaks.:)
Lately, I worked on fine tuning the code for wordgroupz. I fixed some bugs that I was aware of, like unable to parse data retrieved from wiktionary pages which did not have any ‘Contents’ field, error launching games when no words in db, some bugs in webster view, etc. Now, I have added a dialog which will show a message saying ‘Not enough data’ if the number of words in the db are not enough for playing games. I have also added support for parsing data from wiktionary pages which have no ‘Contents’ field. Also made some fixes in the webster view.
I today updated the RPM for wordgroupz to wordgroupz-0.3b-4.fc13.noarch.rpm
You can install the latest version of wordgroupz as follows:
1) download rtnpro.repo into /etc/yum.repos.d/
2) then as root, do :
yum install wordgroupz
You can also get the source code from http://gitorious.org/wordgroupz/
Please test wordgroupz, and feel free to drop in your suggestions.