Hi,
I am in a position of "/admin/auth/user/", where it lists a user's
username, e-mail address, first name, last name and staff status. The
title of this page is "Select user to change". If I click a user's
username, then I am transferred to "Change user" webpage.
I checked /django/contrib/auth
Actually I have already created a "userProfile" that extends User. In
the "userProfile" I have "sms". However, this makes me have an extra
table though it works.
I just wonder if I should modify the original view or just use this
userProfile to extend.
On Jun
Thanks Alex. Then I do not make any modifications.
Have a great day.
On Jun 9, 8:29 am, David wrote:
> Actually I have already created a "userProfile" that extends User. In
> the "userProfile" I have "sms". However, this makes me have an extra
> table
/django-project/media_site/"
MEDIA_URL = "/media_site/"
ADMIN_MEDIA_PREFIX = "/media/"
in the template base.html:
blabla
in urls.py:
patterns('',
(r'^media_site/(?P.*)$', 'django.views.static.serve',
{'document_root'
Okt., 18:17, Jim McGaw wrote:
> Hi David,
>
> I don't anything wrong with what you've typed. I have one suggestion:
> use the os.path module from Python to avoid hard-coding the paths to
> your project. Inside of settings.py, you could add:
>
> import os
> # CURRE
Hello django community,
I checked out a django project from svn and tried to start dev server,
however I met
d...@sgbr:~/nimma$ python manage.py runserver
Error: No module named nimma
d...@sgbr:~/nimma$
In my home directory I have
nimma -> svn/nimma/trunk/
svn
and "svn" is a work copy and lea
-14 14:52 urls.py
d...@sgbr:~/nimoy$
On Oct 14, 4:07 pm, Gregor Müllegger wrote:
> Hi,
>
> please try to create an empty __init__.py file in your ~/nimma/
> directory.
>
> Gregor
>
> On 15 Okt., 00:50, David wrote:
>
>
>
> > Hello django community,
>
&
Thank you for the interesting discussion.
Still, my original problem is bothering me.
Any idea what I could do to narrow it down?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this g
;t tell
whether the url wasn't found other the problem occured later on.
Later it would try to find the file in the file system, in
$PROJECT_DIR/media_site/style.css
right?
On 15 Okt., 21:38, Jim McGaw wrote:
> Sorry, David, didn't mean to hijack your discussion!
>
> Looking ov
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/(.*)', admin.site.root),
)
And My Error:
('invalid syntax', ('/home/david/project/cube/urls.py', 15, 41,
"(r'^$', objec
hat won't work I'll comeback!
would you try using a debugger?
thanks anyway for all your help!
On 15 Okt., 23:54, bruno desthuilliers
wrote:
> On 15 oct, 17:44, David wrote:
>
> > Thank you for the interesting discussion.
> > Still, my original problem is bot
Ah great thanks!
On Oct 15, 10:33 pm, Adam Olsen wrote:
> On Thu, Oct 15, 2009 at 10:14 PM, David wrote:
>
> > I can't figure out why this is invalid syntax...
>
> You can't pass a keyword argument to a tuple. It should read:
>
> url(r'^$', object_
Hello,
I would like to use if clause to check if a number is nagative or not
with template in my html file. I read related part in Django template
online document however I did not find what I need.
Is it possilbe to do this with built-in Django filter functions? Or do
I have to install a third-
Thanks Michael for your reply.
What I need is to present money values to end users online. If the
values are less than zero, then I need to put "-$" before them.
Otherwise I just put "$" there.
I will read your link and write a filter to do this.
Thanks again.
On Oct 16, 4:53 pm, "Michael P.
Finally I solved it, and my first suspicion of me being to stupid
proved to be true.
I've put my url-settings in the projects-url-file, instead of the
app's.
However, now I can sleep again :)
Thanks everybody for looking into this, and at least I've learned
about clean setting-files!
--~--~
Finally I solved it, and my first suspicion of me being to stupid
proved to be true.
I've put my url-settings in the projects-url-file, instead of the
app's.
However, now I can sleep again :)
Thanks everybody for looking into this, and at least I've learned
about clean setting-files!
--~--~
is maintained and delivered as an app.
Any expert's opinions?
david
On 28 Okt., 01:15, Mike Dewhirst wrote:
> Todd Blanchard wrote:
> > Total django noob here. Rails/PHP/WebObjects refugee here.
>
> > I'm starting a project where some models need to be fully version
can you explain a bit better? where do you want to insert?
On 28 Okt., 00:46, Vman wrote:
> how do i insert this:
>
> from django.contrib.auth.models import User
> class Bookmark(models.Model):
> title = models.CharField(maxlength=200)
> user = models.ForeignKey(User)
> link = models.ForeignKey(
rrent_pony.
or did i miss anything?
david
On 28 Okt., 17:01, hcarvalhoalves wrote:
> On Oct 27, 4:54 pm, Todd Blanchard wrote:
>
>
>
> > Total django noob here. Rails/PHP/WebObjects refugee here.
>
> > I'm starting a project where some models need to be fu
I would like to have reusable ratings (typical layout with 5 stars). I
have found this http://www.thebroth.com/blog/119/css-rating-stars that
explains how to display this using css. For actually collecting the
rating I was thinking of using an image map or maybe simple radio
buttons. I would like
thank you very much. very interesting answers that will help me!
David
On 31 Okt., 17:54, Ethan Jucovy wrote:
> Hey,
>
> I actually just did 5-star ratings for a project I'm working on, and have
> been trying to figure out if I have anything reusable worth releasing as a
>
Hello
I have just started to learn Django.
I have setup a Blog model, and an Entry model. I would like to use a
generic view to list all of the entries in a given blog. The url to
this should be /blog-slug/.
I am unclear how I can bring up all of the entries for my blog, or
rather how I can pas
Thank you Daniel, that worked perfectly.
--~--~-~--~~~---~--~~
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 em
Hello
I was wondering if unique_for_date is not working or if I am not
understanding how it is meant to be used.
My model:
class Entry(models.Model):
title = models.CharField(max_length=255)
content = models.TextField()
pubDate = models.DateTimeField(auto_now=False,auto_now_add=True
Hi Alessandro
I just tried converting pubDate to a DateField and it didn't solve the
problem.
Does unique_for_date apply to only the admin interface ? Or, just
everything else ?
I am testing this purely with the admin interface.
Thanks
--~--~-~--~~~---~--~~
You
Hello,
I just wonder if anybody has handled this before. Here is a 2-D
dictionary.
dict[key_1] = {'a':'aa', 'b':'bb', 'c':'cc'}
dict[key_2] = {'a':'dd', 'b':'ee', 'c':'ff'}
dict[key_3] = {'a':'eef', 'b': 'ff', 'c':'ghh'}
Assume that this dict is so long that I need to paginate. Do
Thanks Bill. Your reply is quite helpful.
On Nov 4, 12:01 pm, Bill Freeman wrote:
> On Wed, Nov 4, 2009 at 1:32 PM, David wrote:
>
> > Hello,
>
> > I just wonder if anybody has handled this before. Here is a 2-D
> > dictionary.
>
> > dict[key_1] = {
Hi Ramiro
I'm using Django 1.1.1
--~--~-~--~~~---~--~~
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
Hello
Is it possible to redirect upon successful comment submission to the
previous page when using Djangos built in render_comment_form ?
Thank you
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gro
When I order over a ManyToMany relationship, certain records will not
appear. The record which disappears changes depending on the order by
which I sort it. Specifically:
>>> Listing.objects.order_by("book__courses")
gives me Listings with id's (5, 1, 3, 5, 2, 4), and
>>> Listing.objects.order_
as if the duplicate id "swallowing up" the missing records. I
have no clue why though... hope these details help clarify my problem.
On Nov 26, 1:31 pm, David wrote:
> When I order over a ManyToMany relationship, certain records will not
> appear. The record which disappears chan
Hello,
In my template file I have
{% for value in data %}
{% endfor %}
"showDomain(...)" is a JavaScript function. I would like this function
to be called in each iteration of the for-loop when all_domain == 1.
Anybody knows how to call this function? There are no events (click,
Hello John and Daniel, thanks for your replies. Let me tell what I
need in more details.
{% for value in data %}
...
{% endfor %}
Here "showDomain(...)" is ajax. There are many lines of records on the
webpage. If I click a line, then just below this line it shows doma
Thanks Daniel. I am working in the way just as you said.
On Dec 1, 10:21 am, Daniel Roseman wrote:
> On Dec 1, 3:53 pm, David wrote:
>
>
>
>
>
> > Hello John and Daniel, thanks for your replies. Let me tell what I
> > need in more detai
hello,
This is my first time to work in the Ajax filed. What I need to do is
to pass an object from view to a javaScript function in template. The
javaScript is Ajax.
I have googled online and read some posts about json, ajax, etc, but I
am still not quite clear. Can anybody tell me how to do thi
Hi Shawn,
Thanks so much for your reply. Here is an example. I have a following
dictionary in Python
employees = { "accounting" : [ // accounting is an array in
employees.
{ "firstName" : "John", // First
element
"lastN
Cool. Thanks Shawn!
On Dec 11, 7:32 pm, Shawn Milochik wrote:
> You don't need to transfer this to JavaScript once it's in JSON, which is a
> JavaScript object.
>
> If you're using AJAX, it's dead easy.
>
> #use this in your view
> return HttpResponse(simplejson.dumps(employees), mimetype="appli
Hello
If I have a checkbox field for expiration, is there a built-in way I
could store the date that this field is ticked in a datetimefield in
the same model ? and also clear this entry when the checkbox is
unticked ?
Thank you
--
You received this message because you are subscribed to the Goo
Thank you Shawn :-)
I'll give that a go.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.co
I created a MultiWidget, SelectDateTimeWidget, to allow date/time
input with select boxes.
I created a MultiValueField, SelectDateTimeField, to use this widget.
I created a ModelForm, SubmissionForm, that uses this field.
Here are the source files:
* widgets.py: http://dpaste.com/hold/202352/
* fi
Bradley,
I think there's a typing error somewhere there, search for where you
have pollsdjango within your script, you might have mistakenly join
some text together.
David
On Jul 6, 4:56 pm, Bradley Hintze wrote:
> Hi all,
>
> I am following the tutorial
Hello,
Just learning about Django, and I would like to know what the best
way to generate a table from my data, similar to what the "admin" app
does. I attempted to dig into the source of the admin app, but I was
unable to achieve much.
I don't want to create a template that has for loops that l
how the
admin app did it.
Thanks anyways, I will probably end up using this solution :)
On Jul 17, 9:33 am, Carl Nobile wrote:
> David,
>
> The best thing to do is use the Django docs, maybe do their tutorial.
>
> The link below should get you there:
>
> http://docs.dja
I am using the generic view
django.views.generic.create_update.update_object to edit a model. The
form is displayed, the model gets updated, but on redirect, I get an
ImproperlyConfigured exception. Django tells me I need to define a
get_absolute_url method, but I already did, it just doesn't see
Solved.
I used Django's traces to discover that the object wasn't being passed
to the view on POST. Inserting some exceptions in different places in
the source, I found that it was at the point the form was saved that
the model reference was lost. Looking at the form I realized I wasn't
returnin
mysql_config is usually part of the MySQL client library (not to be
confused with the Python/MySQL library). You can get the full mysql
package from http://dev.mysql.com/downloads/mysql
On Aug 16, 12:21 pm, Bradley Hintze
wrote:
> Hi all,
>
> I'm trying to install MySQL for Python on Snow Leopar
if I do
nothing = ModelName.objects.none()
nothing.update(status='new_status')
Then all of my objects in the database get updated. I would expect
nothing to happen but... is an empty QuerySet really supposed to apply
changes like that?
--
You received this message because you are subscribed to
Hello
I have a very simple app that I am writing that simply stores form
data to a database. I can then scroll through and edit data stored in
the database.
I was wondering if there is a built in function that would enable me
to log all data update/changes like the django admin history log does.
Hello
I need to be able to create a form that contains data from my
database. It also needs to have basic pagination at the bottom of the
form as there will be many records, and I would like my users to be
able to use pagination to access them (kind of like MS Access).
I can produce the form ok,
Hi Devin
Thank you for your reply.
I'm not sure if I've explained myself properly, or if I'm
misinterpreting your reply. What I am aiming for is a form containing
a single record. At the bottom of this form will be the pagination
tools << Prev 1 2 3 etc. which will enable the user to navigate
thr
I think there is some confusion here. I'm guessing you are using mysql-
python v1.2.1 since a 1.x mysql version would probably date back to
the mid to late 90s. Ask the admin if it is possible to upgrade mysql-
python for which you do not need to upgrade MySQL itself or even take
down the database.
I have a QuerySet of Books, and I want to create an Action for each
Book in that QuerySet. I want to avoid evaluating the Books QuerySet,
but the only way I can think of doing what I want to do evaluates it.
For example,
def create_actions(books, action)
books is a QuerySet of Book"""
Alright, thanks Daniel.
On Jan 5, 1:12 am, Daniel Roseman wrote:
> On Jan 4, 11:40 pm, David wrote:
>
> > I have a QuerySet of Books, and I want to create an Action for each
> > Book in that QuerySet. I want to avoid evaluating the Books QuerySet,
> > but the only way I
When editing an object using ModelForm, the best way I know is
def my_view(request):
obj_id = request.POST.get('obj_id', '')
old_object = MyModel.objects.get(pk=obj_id)
form = MyModelForm(request.POST, instance=old_object)
...
but I'm thinking the first two lines are a pain to wri
I'm getting an ImportError... I think it's a sys.path problem but I
can't figure out what to do. Below are the details. Any help?
## Mod Python Error ##
MOD_PYTHON ERROR
ProcessId: 17855
Interpreter:'my_django'
ServerName: 'cube.twusa.ca'
DocumentRoot: '/var/www/html'
URI:
In SQL, this would be (and I'm winging this right now so I might be
slightly off)
SELECT name, address, `date`, test_name, grade
FROM Student as stu
LEFT JOIN Grade ON stu.id = Grade.student_id
WHERE `date` >=
(SELECT max(`date`) FROM Grade WHERE student_id = stu.id)
ORDER BY name
Unless you
Generally, when you are redirecting, you usually aren't returning an
HTTP status code of 200. Redirecting implies a status code in
[300,400). You might want to take a look at the HttpResponse
subclasses:
http://docs.djangoproject.com/en/dev/ref/request-response/#httpresponse-subclasses
However, if
using SQLAlchemy/Elixir with pyodbc.
-David
On Mar 3, 6:52 am, "Steven R. Elliott Jr"
wrote:
> Hello,
>
> I have been asked to write a front-end for an accounting system that will
> allow business participating in certain benefits plans the ability to
> receive and pay thei
ly be writing a custom router to direct your
traffic.
-David
On Mar 10, 2:41 am, chiranjeevi muttoju
wrote:
> Hi,
> i want to use *Sharding* concept in for my project. i requirement is, i have
> one user model, and i want to save users by selecting the random databases.
> ie. i have
against a remote database. I'd look at the code
for the remote user classes if that were the case.
-David
On Mar 9, 1:24 pm, Tim Arnold wrote:
> Hi,
> I've read about the custom authentication you can do so you can use
> upstream validators for your views. And a snippet tha
As the stackoverflow link states, pyodbc is the most advanced sql
server library for python. Quite a few libraries use it like
sqlalchemy. If you are using Django on Linux, your only options are
django-pyodbc or use sqlalchemy outside of the Django ORM. If your
environment is on Windows, you can al
ubclass the RemoteUserMiddleware [3].
[1] http://docs.djangoproject.com/en/1.1/howto/apache-auth
[2] http://code.djangoproject.com/ticket/10809
[3] http://docs.djangoproject.com/en/1.1/howto/auth-remote-user
-David
On Mar 26, 7:48 am, Simone Orsi wrote:
> Hi *,
>
> I'm trying t
r, I did not really like this
solution for a variety of reasons.
[1] http://docs.python.org/library/xmlrpclib.html#xmlrpclib.ServerProxy
[2] http://github.com/samuraisam/django-json-rpc
On Mar 26, 10:13 am, Simone Orsi wrote:
> Hi David, Ale, thanks for your answers :)
>
> On 03/26/2
I was really excited about Rails. But however much it claims that it
follows the DRY convention, I unfortunately do find myself repeating
myself for things like the admin area of my site.
That's why the Admin interface of Django has now become ever so much
more appealing to me. Having spent a who
call the relevant configure() method each time I
need to use one of the APIs. Is that the only approach that will work
for this?
On Jul 11, 8:10 am, Robin Becker <[EMAIL PROTECTED]> wrote:
> Hancock, David (DHANCOCK) wrote:
> > We have two Django "projects" with distinct
About a month ago I quit my job at Hollister. I didn't quit it because
I didn't like it there I quit because I was making about 150-200
dollars a day filling out opinion surveys for Nike. I mean seriously
that's close to four times what I was making at Hollister. There are
still job openings if an
Excellent. I just updated to 7003 and the error message is gone.
I really appreciate your taking the time to help me with this.
Cheers!
--
David Hancock
On Jan 6, 6:01 pm, tlp <[EMAIL PROTECTED]> wrote:
> Hello David,
>
> I was not able to reproduce the error on any Linux, Win
>
> If you enter a valid email address in the ADMINS tuple of your
> settings.py, any tracebacks will be emailed to you.
> --
Yes, sorry, I should have been clearer. I'm not having a problem
getting the tracebacks by email, but they contain much less data than
the traceback screens do with DEBUG=
I've been looking at our PostgreSQL logs, trying to track down a
slowness issue, and I've got two questions.
1. Do queries that are created by the API use bind parameters? When I
look in the logs I see the full text of the query and it includes the
actual parameter. Perhaps that's simply just how
I had need of commas in floating-point numbers, and slightly modified
humanize.py with a floatcomma function:
def floatcomma(value):
"""
Converts a float to a string containing commas every three digits.
For example, 3000.65 becomes '3,000.65' and -45000.00 becomes
'-45,000.00'.
"
When I save objects from the admin pages, I get COPIES of what I'm
saving. When I save them through the API, I don't get the duplicates.
I'd like to know if I'm doing something wrong or misunderstanding
something.
Model:
from django.db import models
class Process(models.Model):
process_name
It's not in Europe, but I've been using RimuHosting since December or so, and
they've been great. The connection is fast, downtime is minimal, and their
responses to support questions are always prompt.
On Tue, 15 May 2007 15:12:24 -, urielka <[EMAIL PROTECTED]> wrote:
>
> I am running tw
o use
the InnoDB storage engine and thus have no foreign-key-constraint
enforcement. It also seems like Django authors (in The Book at least)
favor PostgreSQL.
On May 26, 8:40 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2007-05-27 at 08:14 +0800, Russell Keith-Magee wrote:
&
My apologies. I am using 0.96, not an SVN checkout of recent vintage.
I'll check out the two tickets mentioned (starting with 3324), and
search tickets first from now on.
On May 26, 9:46 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sat, 2007-05-26 at 18:02 -0700, Davi
1'974 settings.pyc
09.11.2007 10:42 templates
18.10.2007 09:24 128 __init__.pyc
dir media:
09.11.2007 10:54 images
14.08.2007 18:37 4'929 style.css
I get the content of the html-file (in templates/myDir) but no style
or images.
I
excuse me, can you explain this please?
On Nov 9, 7:25 pm, pepe <[EMAIL PROTECTED]> wrote:
> alert('x');
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
Nobody that could help me?
Do you need further information?
On Nov 9, 7:16 pm, David <[EMAIL PROTECTED]> wrote:
> I seem to have a similar (stupid) problem, which I just can't get:
> (Though it's not the backslashes!)
>
> This is from my settings.py:
> MEDIA_
Thank you Lazlo, today your my hero!
David
--~--~-~--~~~---~--~~
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
Django-0.95, with Oracle backend patch (latest: 3496?) applied.
Python 2.4 on Linux
Oracle XE and Oracle 10gR2
When I try to run syncdb using the Oracle backend, I reliably get the
following error (last part of traceback only, let me know if I should
post the whole traceback):
File "django/db/
Very cool. Great to see.
david.
On 12/5/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> Check it out: The first Django app at washingtonpost.com!
>
> The U.S. Congress Votes Database
> http://projects.washingtonpost.com/congress/
>
> It lets you browse every vote
I'd suggest moving on through the tutorial, and, as the end of
Tutorial 2 states, "When you're comfortable with the admin site, read
part 3 of this tutorial to start working on public poll views." That's
where you can start seeing the poll app's public view.
"Playing with the API" actually = "lea
Hello
I have a form for model test (code below) that saves correctly. I wish
to add records to the modificationlog model every time an instance of
test is saved. What should be saved is the logged in user and the time
of the modification. The below is what I have tried to achieve this
goal, but it
In hindsight a m2m field was inappropriate and instead I have added a
ForeignKey(Test) to the ModificationLog model.
Then added:
a = ModificationLog.objects.create(test=a, modifier=request.user)
after the successful save of any Test instances
--
You received this message because you are subsc
class Log(models.Model):
thing = models.ForeignKey(Thing)
context = models.CharField(max_length=255)
action = models.CharField(max_length=255)
modifier = models.ForeignKey(User, limit_choices_to={'groups__in':
[2]})
modified_on = models.DateTimeField(auto_now=True)
class Thing(
Thanks for your reply. I am grateful for your help. If you remember this
question when you feel less sleepy I'd be very interested to see the inner join
alternative :)
Thanks again
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this
Hi Jani
That was very helpful. Is there a way to include select_related into that
query? or do I have to list every single field I would like to return using
values()?
last_deleted = ModificationLog.objects.values('thing__id', '
thing __prefix', ' thing __first_name', ' thing__last_name', '
t
>
> Hi Jani
>
> That was very helpful. Is there a way to include select_related into that
> query? or do I have to list every single field I would like to return using
> values()?
>
> last_deleted = ModificationLog.objects.values('thing__id', '
> thing__prefix', ' thing __first_name', ' thing__
Thank you akaariai
That put me on the right track.
Log.objects.distinct('thing__id').order_by('thing__id',
'-modified_on').select_related().filter(thing__deleted=0)[:20]
By avoiding the use of values() I was able to then use the result as an
object and access everything I needed.
The above OR
Hello
Given the following models:
CHOICES = (
(0, u'AM'),
(1, u'PM'),
)
class Person(models.Model):
first_name = models.CharField(max_length=255)
last_name = models.CharField(max_length=255)
class PersonStuff(models.Model):
person = models.ForeignKey(Person)
stuff = mode
Hello
I need to produce a form that will contain a series of rows. Each row will
be a specific object. Columns for each row will have data that will need
editting.
ie:
Person1 EditA EditB EditC
Person2 EditA EditB EditC
Person3 EditA EditB EditC
Person4 EditA EditB EditC
The form
Thank you both for your replies.
Having created a modelform and used:
ArticleFormSet = formset_factory(ArticleForm, extra=2)
I have a queryset that produces the objects I want to edit in my formset.
How can I bind these objects to the formset and therefore remove the need
for the extra=2 para
Hi
That is brilliant thank you! I've been struggling with this for too long :(
MyModel Set = modelformset_factory(MyModel)
formset = MyModelFormSet(queryset=
MyModel.objects.select_related().filter(left_team__isnull=True).filter(team=pk))
variables = RequestContext(request, {
Adding ,extra=0 to the modelformset_factory() line appears to do the job.
Thanks for your help guys
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/aJyLcUk
I have models similar to this:
class Person(models.Model):
first_name = models.CharField(max_length=255)
last_name = models.CharField(max_length=255)
class PersonAttendance(models.Model):
person = models.ForeignKey(Person)
worked_date = models.DateField()
class PersonTeamLog(mode
Thanks Tom
Not the end of the world. Just wanted to be sure I hadn't misinterpreted
the ORM capabilities.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/
Hi
I have a known working rawsql queryset that I am trying to use in my
modelformset formset = ModelFormSet(queryset=q). When trying this I receive
the following error:
'RawQuerySet' object has no attribute 'ordered'
Can Raw SQL querysets be used for modelformsets?
Thank you
--
You received
I am trying to abstract a log app that I have made for my project to make
it more DRY. In order to achieve this I have tried to implement Generic FKs
class Modification(models.Model):
content_type = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
content_obje
Just an update, the following got me on the right track.
http://blog.roseman.org.uk/2010/02/22/django-patterns-part-4-forwards-generic-relations/
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https:/
Hello
With a distinct query I understand the need to make the column that is
required to be distinct the first column to order by.
eg:
lm = Modification.objects.select_related().distinct('object_id').filter(
content_type=topic_ct
).exclude(action=2).order_by('object_id', '-m
Hi
This is how my middleware is currently ordered:
'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.gzip.GZipMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMid
101 - 200 of 1501 matches
Mail list logo