Hi,
When i edit a records none of the modelchoicefields are getting selected
using form edit form instance.
I have gone though below blog, but confusing
http://blog.brendel.com/2009/07/setting-initial-value-for-djangos.html
*view.py* :
def EditTable(request, get_id):
detail_data = shortc
Hi,
below is model
class Employee(models.Model):
name = models.CharField(max_length=50, primary_key=True)
dep = models.CharField(max_length=10)
class Meta(object):
db_table = u'employee'
class EmpSal(models.Model):
emp_name = models.ForeignKey(Employee, db_column='emp_name')
emp
Thank you for the response,Let me give a try and let you know.
Thanks & Regards
sushanth reddy
On Tue, May 24, 2011 at 12:30 PM, Ori Livneh wrote:
> Check out the python-dateutil <http://labix.org/python-dateutil> module
> (not in the standard lib, but available via pip and e
Hi,
How to get model filter on date ranges. In my project using employee doj, i
need to deign a table. like employee who have joined less than three months
, 3-6month, 6-12 months, 12-24 months.
Depart < 3month 3-6months 6-12months 12-24months
- --
This is awesome Brice,
Nice Work
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For m
Hi Tarkeshwar,
Thank you for the response,But here i am directly passing list to the
template,
Can you please help me how to extract that list into that date format.
Thanks in advance
sushanth
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
Hi Tom,
I given try but not printing any values in html.
can you please add some more code
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send
it worked,thanks aaa ton
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more optio
Hi JAson,
Thanks a ton,it worked
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For m
Hi ,
I am trying to sum in HTML,but template tag return 0 ,
View.py
def gen_Report(request):
### query returns below output
list=[{'total': 1744, 'user': u'x'}, {'total': 13, 'user': u'y'},
{'total': 126, 'user': u'z'}, {'total': 46, 'user': u'm'}, {'total': 4,
'user': u'n'}
I using jplot in my app .if list is in unicode(u) ,it not displaying the
charts,thats the reason i want to remove it ...
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsu
Hi,
Django query gives me below output format,but i want below format
date=`[{'total': 1744, 'name: u'x'}, {'total': 13, 'name': u'm'},
{'total': 126, 'role': name'n'}]`
m=[]
for i in m:
m.append(i.values())
print m
it give me output
[[1744,u'x'], [13,u'
hi,
how to log model inserts,updates and deletes?
I am not using django admin,in my app there are multiple tables
i just want to records only which model or table name, field name,previous
value,who edited,and what time
to one log table?
Who edited (my app uses SSO,it should pick up remote user
thanks you for the link ,KG
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more op
I have gone through to that documentation,but output in wired format ,plz
add few lines of codes to undersstand better
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsub
Hi,
How to write below data to csv in below output format ?
list of dict
data=[{'date': datetime.date(2011, 2, 8), 'user': u'xxx', 'status':
u'P'}, {'date': datetime.date(2011, 2, 8), 'user': u'yyy', 'status': u'P'},
{'date': datetime.date(2011, 2, 8), 'user': u'zzz', 'status': u'P'},
Hi Tom,
Can you please add few lines of code example,
to make code more efficient?sorry for troubling.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from th
Hi ,
I want to make total at the end of the each row,i have explained the details
in below
link.
http://stackoverflow.com/questions/5223093/how-to-aggreate-in-html-django
Can you please help me
Thanks in advance
sushanth
--
You received this message because you are subscribed to the Google
Hi,
I am trying to create csv download ,but results download gives me in
different format
below is the link which gives the details of the problem
http://stackoverflow.com/questions/5222841/django-csv-header-and-row-format-problem
--
You received this message because you are subscribed to the
I am trying to insert data into db it throws below error,can any please fix
this.
model.py
from django.db import models
# Create your models here.
class Profile(models.Model):
name = models.CharField(max_length=50, primary_key=True)
assign = models.CharField(max_length=50)
doj
I am trying to create a dynamic filtered drop down choice fields,i gone
through below blog but it confusing,can any one suggest easy way to do this
in django.
http://www.nerdydork.com/dynamic-filtered-drop-down-choice-fields-with-django.html
Thanks in advance :)
--
You received this message b
i AM trying to create a from which is linked with foriegnkey.
Model.py
enter code here
model.py
class CreateD(models.Model):
id=models.IntegerField(primary_key=True)
db = models.CharField(max_length=50, blank=True)
iss = models.CharField(max_length=100, blank=True)
s
Thanks a ton sam...
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options,
hi Sam,
Here is example model:
class Profile(models.Model):
name = models.CharField(max_length=50, primary_key=True)
assign = models.CharField(max_length=50)
doj = models.DateField()
dob = models.DateField()
class Meta:
db_table = u'profile'
def __str__(sel
HI,
How to write joins in django,i have gone through below django documentation
,but joins are not working for my model
http://www.djangoproject.com/documentation/models/many_to_many/
http://docs.djangoproject.com/en/1.2/topics/db/queries/#lookups-that-span-relationships
and some blogs
My Mod
25 matches
Mail list logo