Re: Stucked in Tutorial 3

2010-08-22 Thread Nick
the problem is on the return HttpResponse (t.render(c)) line. Check that your indentation is correct On Aug 22, 9:51 am, craphunter wrote: > Hi, > > I am very new in Django and Python. I am stucked in Tutorial 3 in part > "Write views that actually do something". > > I don't get it to run the ind

Strange problem accessing JS for admin

2010-08-24 Thread Nick
I have a model set up to use collapsable inlines but for some reason the path to my js files is acting very strange. I can find the core.js at http://mysite.com/media/js/core.js but when i try to reach any other js http://mysite.com/media/js/inline.min.js I get a server error "/media/js/inlines.

Re: Strange problem accessing JS for admin

2010-08-25 Thread Nick
Stranger still, I can get to the /media/js/admin/ RelatedObjectLookups.js but not the jquery library On Aug 24, 4:51 pm, Nick wrote: > I have a model set up to use collapsable inlines but for some reason > the path to my js files is acting very strange. > > I can find the co

prepopulated_fields problem (+admin CSS issues)

2010-09-14 Thread Nick
a 1600 width screen and 3 or 4 columns are shrunken to 75-100 pixels wide with a 1000 pixel white space before it shows the sidebar. Thanks, Nick -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djan

Re: prepopulated_fields problem (+admin CSS issues)

2010-09-14 Thread Nick
erent titles. As for my second question. Can you not help because you haven't experienced this issue, or is it something you just don't have a problem with? On Sep 14, 11:20 am, "nick.l...@gmail.com" wrote: > Nick, > > I can answer you first question...but not reall

contrib.comments, admin section [unable to see comments]

2010-09-14 Thread Nick
Hello, I tried to troubleshoot this with Google and #django on IRC but I'm coming up empty. I've been following the practical django projects second edition book using django 1.2.3 on a local server. I have added 'django.contrib.comments' to my settings file + adjusted my urls.py file just like t

Re: contrib.comments, admin section [unable to see comments]

2010-09-14 Thread Nick
;s worst nightmare. On Sep 14, 8:19 pm, Karen Tracey wrote: > On Tue, Sep 14, 2010 at 12:52 PM, Nick < > > > > > > iregisteratwebsiteswitht...@gmail.com> wrote: > > Hello, > > > I tried to troubleshoot this with Google and #django on IRC but I'm > >

Re: Tools to ease template/ui development

2010-09-15 Thread Nick
I would go with PyCharm. Unfortunately it's not free but for $49 I don't think you'll find anything better. It has really solid template highlighting and code complete along with the best Python/Django support I've seen yet. I'm still new to Django but I did spend a fair bit of time looking for an

Re: syncdb problem - windows, sqlite

2010-09-15 Thread Nick
This seems to happen when you specify an incorrect path to the database in NAME. Fix: Use the correct path. :D It looks like you spelled 'frameworks' incorrectly. On Sep 15, 12:03 pm, Aju wrote: > Hi, > > I am using the Django tutorial (Windows xp, python 2.5.4, django 1.2.3) and > am facing a

Django and third party python apps, best practices for path locations?

2010-09-15 Thread Nick
Let's say you have Python installed to D:/dev/python2.6 Is it wise/common practice to put django and other third party python libraries (like pygments or markdown) in the python2.6/Lib/site- packages/ directory while putting your actual projects in a completely separate location off the python pat

Re: Django and third party python apps, best practices for path locations?

2010-09-15 Thread Nick
On Sep 15, 9:50 pm, "nick.l...@gmail.com" wrote: > Nick, > > yes...and no. > > Have you looked at using Virtualenv?http://pypi.python.org/pypi/virtualenv > > On Thu, Sep 16, 2010 at 1:44 AM, Nick > > > > > > wrote: > > Let's say you have

Re: Django and third party python apps, best practices for path locations?

2010-09-15 Thread Nick
to get around to setting it up and learning how to use it. On Sep 15, 11:01 pm, Mike Dewhirst wrote: > On 16/09/2010 12:06pm, Nick wrote: > > > Yes and no. I'm familiar with the term but haven't read up on it > > enough to wrap my head around installing it and getti

Why does extending a class create so much overhead?

2010-09-19 Thread Nick
I'm still a newbie to django but I think I want to start working on my first real project and I'm kind of confused about extending another application's features without creating overhead. I started to investigate flat pages because I planned to have a few flat pages however I wanted to add a few

Manual ordering

2010-10-20 Thread Nick
I am working on the output for some data and I would like to manually assign the order as there is no field that I can order by that will give me the desired output. Is there a way to manually declare the order of output based on the PKs of an entry? -- You received this message because you are s

Re: Manual ordering

2010-10-20 Thread Nick
Worked like a charm. This was a limited case so I won't be needing any checks to ensure that the ID's are all in the queryset since there are only 5 or 6. Thanks again. On Oct 20, 10:44 am, Shawn Milochik wrote: > Given a tuple/list of primary keys named ordered_ids and a queryset named > record

Excessive tmp table creation for mysql

2010-11-09 Thread Nick
Yesterday I received a warning from our DB monitoring system stating that my django DB had an excessive amount of temp tables created. Here is the error: * Nagios 2.10 * Notification Type: PROBLEM Service: mysql_tmp_disk_tables Host: Address: State: WARNING Date/Time: Mon Nov 8 15:19:18

Create new entry on first save of different model

2010-12-09 Thread Nick
I am working on a project in which I need to evaluate a field in one model and based on its values add entries to another model. I don't quite now how to succinctly put that into words which is why searching for a solution has been so annoying. Here is my example Type_Choices = ( ('Person', '

Re: Create new entry on first save of different model

2010-12-09 Thread Nick
el2. > > -- > eng. Ilian Iliev > Web Software Developer > > Mobile: +359 88 66 08 400 > Website: ilian.i-n-i.org > > On Thu, Dec 9, 2010 at 11:21 PM, Nick wrote: > > I am working on a project in which I need to evaluate a field in one > > model and based on its va

Re: Create new entry on first save of different model

2010-12-09 Thread Nick
Nevermind. I think I got it. On Dec 9, 3:57 pm, Nick wrote: > Thanks for the reply. I'm working on the override. How to I affect a > model from the save of another model. > > On Dec 9, 3:37 pm, Ilian Iliev wrote: > > > Hi, > > > you can overload the save me

Dynamic URL for representatives DB

2010-01-31 Thread Nick
n.site.urls)), (r'^reps/(P?_\d+)/$', 'Government.Reps.views.detail'), I think that I am either overthinking this or way UNDER thinking it. This is my first go at a template being called via variables passed in the URL. I have a good background in templates and the models po

Re: Dynamic URL for representatives DB

2010-01-31 Thread Nick
up the URL. On Jan 31, 2:05 pm, Daniel Roseman wrote: > On Jan 31, 7:29 pm, Nick wrote: > > > > > Thanks in advance for anyone answering this thread. > > > I am building a DB of local government representatives. My goal is to > > spit out a general list of the re

Re: Dynamic URL for representatives DB

2010-01-31 Thread Nick
Just checked again and I'm getting the output I was looking for. Thanks for the help. I guess the server was just taking a little time to pick up changes to the URL confs. On Jan 31, 5:58 pm, Nick wrote: > Daniel, > > Thanks for the quick reply.  I have made the adjustments to

Re: Dynamic URL for representatives DB

2010-01-31 Thread Nick
f the object in the Rep table. Thanks again. Nick On Jan 31, 10:08 pm, Nick wrote: > Just checked again and I'm getting the output I was looking for. > Thanks for the help. I guess the server was just taking a little time > to pick up changes to the URL confs. > > On Jan

Re: Dynamic URL for representatives DB

2010-02-01 Thread Nick
You are exactly right. Thanks, this was a learning curve I was having trouble getting over. You have been an immense help and are a credit to this online community. On Feb 1, 3:42 am, Daniel Roseman wrote: > On Feb 1, 4:30 am, Nick wrote: > > > I'm definitely going to cont

Deciding how to start building a search form

2010-02-23 Thread Nick
A few of these will be boolean/checkbox fields and some will be text fields. Anyways, what I'm wondering is, should I build this up by hand or should I use something like haystack? I am only querying against a DB and not en entire site. Thanks in advance, Nick -- You received this mes

Re: two different models, order by date

2010-02-23 Thread Nick
In the view set up something like all = [Books.objects.all() & Movies.objects.all()].orderby('date') On Feb 23, 2:22 pm, ds wrote: > Hello group, > > i have a simple question here, i've been trying to found the answer > but somehow i got confused if this is wheter possible or not: > > I have two

Re: Deciding how to start building a search form

2010-02-23 Thread Nick
Thanks adam, that was the direction I was looking for. On Feb 23, 4:57 pm, Andy McKay wrote: > On 2010-02-23, at 12:50 PM, Nick wrote: > > > Anyways, what I'm wondering is, should I build this up by hand or > > should I use something like haystack?  I am only querying agai

A search project beginneth

2010-02-26 Thread Nick
checkboxes and radio buttons (some can have multiple selections and some can't) to filter the search based on type of representative, district, city. etc. I'm throwing this out as I battle through the forms processing part of the Django book. Thanks, Nick -- You received this message becau

building a form with multiple filters

2010-03-03 Thread Nick
I am trying to build a search form with multiple filters/input objects. Basically, i want to be able to allow for a simple searhc based on one criteria or multiple. So if someone searches the name field(q) they can filter by political party, or city, etc. Also, I would like to be able to return re

Re: best practices for creating a template/theming layer for users in a django app

2010-03-03 Thread Nick
If I'm understanding what you're asking, it should be as simple as adding an entry per user that designates the template/theme you'd like to use and then passing that as a variable (ex. {{ MEDIA_URL }} {{ templatename }} where template name would be the directory name of the template. Let me know

Re: best practices for creating a template/theming layer for users in a django app

2010-03-03 Thread Nick
i am not familar > with rails, but i assume it allows you to create custom template tags > like django. I doubt this is the method they are using? Are they > probably just using a custom template system from scratch? > > On Mar 3, 5:30 pm, Nick wrote: > > > If I'm und

Re: best practices for creating a template/theming layer for users in a django app

2010-03-03 Thread Nick
ume it allows you to create custom template tags > like django. I doubt this is the method they are using? Are they > probably just using a custom template system from scratch? > > On Mar 3, 5:30 pm, Nick wrote: > > > If I'm understanding what you're asking, it should

Re: best practices for creating a template/theming layer for users in a django app

2010-03-04 Thread Nick
sorry, let me rewrite that last part render_to_response ('%s/index.html' u'theme', {'dictionary': dictionary}) On Mar 4, 12:11 am, Nick wrote: > It seems like this would be best handled at the view level, you could > pass a url variable in the render_to_resp

Re: modify date in django twitter app

2010-03-08 Thread Nick
I think this may help http://www.magpiebrain.com/2005/08/21/formatting-dates-with-django/ try using strftime and formatting from there. On Mar 8, 3:16 pm, "het.oosten" wrote: > I forgot to mention that my desired output of the date is: > 2010-02-22 20:46:03 > > On 8 mrt, 22:13, "het.oosten" wr

Extending a custom built API

2010-03-08 Thread Nick
I am working on an api that outputs a list of JSON based on certain criteria. Currently if someone enters http://example.mysite/slideshows/api?id=1 it returns a JSON serialized output of the slideshow with that ID. What I would like to do is allow for multiple ids, so http://example.mysite/slides

Re: Extending a custom built API

2010-03-08 Thread Nick
pm, felix wrote: > you are already basically there > > id = request.GET.get('id') > if id: >   ids = id.split(',') >   slideshows = slideshow.objects.filter(id__in=ids) > > then returns that as json however you like > > On Mar 8, 11:41 pm, Nick wrote: >

Re: Extending a custom built API

2010-03-09 Thread Nick
. On Mar 9, 11:03 am, Tom Evans wrote: > On Mon, Mar 8, 2010 at 10:41 PM, Nick wrote: > > I am working on an api that outputs a list of JSON based on certain > > criteria.  Currently if someone > > entershttp://example.mysite/slideshows/api?id=1 > > it returns a JS

Re: making query using filter()

2010-03-10 Thread Nick
Sounds like what you want is something like: MyCategories = Category.objects.exclude(name!='mycateogry') only problem is, django doesn't support the != operator so you're going to have to go with a query object: add this to your view from django.db.models import Q (importing the Q object http:/

Re: if statement with url

2010-03-10 Thread Nick
Just pop this into your template: {% url Path.to.a.view.for.this.template as the_url %} # you are importing a view's url structure right here and then storing it as "the_url". Since you're not looking for anything dynamic we can end that definition here (more here http://docs.djangoproject.com/en

Re: Filtering by another object's ManyToMany properties

2010-03-10 Thread Nick
try search__questions.id the __ spans the many to many relationship On Mar 10, 4:38 pm, Laereom wrote: > I have two models, we'll call them 'Question' and 'Search'. > > Search has a many to many field called 'questions' which contain, > naturally, a set of questions. > > I want to retrieve a Que

SQL Server 2008 and django

2010-03-11 Thread Nick
s not been tested and is reliable. Thanks in advance for any responses. Nick -- 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 em

Re: SQL Server 2008 and django

2010-03-12 Thread Nick
t; > On Mar 11, 8:29 pm, Sam Lai wrote: > > >http://stackoverflow.com/questions/842831/using-sql-server-with-djang... > > > Might help. No personal experience though. > > > On 12 March 2010 12:16, Nick wrote: > > > > I am working on a new project that has a Microsoft

Modifying admin to filter choices

2010-03-16 Thread Nick
I am working on a project that has a portion of the admin with three different "choices" options. The section of the model that this thread is concerned with looks like this: Department_Choices = ( ('Advertising', 'Advertisinf'), ('NIC', 'NIC'), ('Production', 'Production'), ) Department_Groups

RSS feeds of model instances by tag

2010-04-04 Thread Nick
m with the TagField() is it can be multivalued. Is there a way to split a tag field and then do a match on each item in the list? Any suggestions? I'm scripting in Django 1.1, using postgreSQL, and Windows XP. Thank you very much. Nick -- You received this message because you are

Re: admin page will not display

2010-04-13 Thread Nick
try resetting your server On Apr 13, 4:50 pm, NicMAN wrote: > Hi all, i recently tried to open my admin page and it won't let me > open it keeps saying > > Caught an exception while rendering: Tried create_user in module > applications.views. Error was: 'module' object has no attribute > 'create_

Re: Doing query with 'ne' terms.

2007-06-14 Thread Nick
On Jun 15, 12:50 pm, "Nicholas Ding" <[EMAIL PROTECTED]> wrote: > but I wanna 'where column1 <> %s and column2 <> %s' > If I were using exclude, the SQL must be 'where not (column1 = %s and > column2 = %s), that's different. http://www.djangoproject.com/documentation/db-api/#complex-lookups-with-

Access ManyToMany objects

2008-01-22 Thread nick
New to django and python. Just trying some basics here.I have the following model: class Author(models.Model): name = models.ForeignKey(User) def __str__(self): return self.name.username class Entry(models.Model): body_text = models.TextField()

Re: Access ManyToMany objects

2008-01-23 Thread nick
Thank you Eric, it helped a lot. The 'name' attribute does get me confused every now and then...good point! - nick On Jan 23, 12:09 am, Eric Abrahamsen <[EMAIL PROTECTED]> wrote: > > Question: In python, how do I access name attribute in Author? That > > is, I&#x

Re: How do you get at a RadioFieldRenderer object from a template? (newforms)

2007-05-06 Thread Nick
I needed to do a similar thing... in my case I needed the radio inputs in separate table cells. The way I did it was to write a custom widget, but I'd also be interested to hear of another way to achieve the same thing. Cheers, Nick On May 7, 3:53 am, "Joseph Heck" <[EMAIL

Feasibility of postgis fields?

2006-06-15 Thread nick
Hi - as a person investigating django for managing metadata that will also have a spatial/gis component (lat/lon bounding boxes), would the reccommended approach be to create a new field for use in my models? Admittedly this would be specific to the postgres+postgis backend. I'd be looking to imp

Re: Feasibility of postgis fields?

2006-06-15 Thread nick
the geom field afterwards with custom sql. Thanks, Nick --~--~-~--~~~---~--~~ 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 unsubscr

unbuffered output to client/end-user

2006-07-15 Thread Nick
data. I'm trying to write a live traceroute in django, so that each line gets sent to the browser (client) directly, instead of having all the lines in a variable and returning that to the browser (client).Hopefully someone can help me, thanks in advance! Kind Regards,Nick Parrine-mail: [

Re: unbuffered output to client/end-user

2006-07-15 Thread Nick
Martin,Cool, this actually works with yielding, thank you very much.You don't seem to be THAT new too django:)Kind Regards,Nick ParrinOn 7/15/06, Martin Glueck <[EMAIL PROTECTED]> wrote: Nick,I'm new to Django so if I'm wrong here, I hope that somebody willcorrect me.&

Re: unbuffered output to client/end-user

2006-07-16 Thread Nick
Martin,You mean if I access the model? I tried looking up a close() method for the DB api but couldn't find anything.Could you be more specific, maybe give an example, so I can write it down in case I ever need it. Currently trying to learn django, so I have a lot of newbie questions.

Re: unbuffered output to client/end-user

2006-07-16 Thread Nick
On 7/16/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: Nick wrote:> Martin,Well, not exactly :-)Haha, shouldn't post with my eyes closed while waking up. > You mean if I access the model?Yes. By the time your response iterator starts working Django hasalready closed the database c

list_editable raising a MultiValueDictKeyError

2012-02-07 Thread Nick
Whenever I use list_editable inside of the django admin attempting to save the data results in Exception Type: MultiValueDictKeyError Exception Value:"Key 'form-0-id' not found in Whenever I create custom forms I simply add in the form-0 inputs as a hidden field. How do I work ar

Re: templates couple apps to a site; how do you separate them?

2012-03-13 Thread Nick
When writing an app one of the things you do is set limitations. It's the same for people who choose to use pluggable apps, you're trading customization for convenience. The way I would go about it is to write multiple outputs that are handled primarily in the view. You could set up a keyword para

Getting a no such column error when adding data and syncdb is not syncing

2013-01-18 Thread Nick
This is my first django project outside of the tutorials and it's frustrating to stumble over something so simple. I'm getting this error when I try to add a product: > DatabaseError at /admin/products/product/add/ > > table products_product has no column named pub_date > > This is what my mode

Strange problem with admin, ManyToMany and DEBUG=False

2011-05-02 Thread Nick
ad the code between test attempts. I've tried embedded mode and restarted Apache just incase the changes weren't being loaded properly, but this gives the same behaviour. I'm using Django 1.2.5. Thanks, Nick -- You received this message because you are subscribed to the Google Grou

Re: Strange problem with admin, ManyToMany and DEBUG=False

2011-05-02 Thread Nick
Hi, Yes sorry that wasn't clear. There is basically: page = get_object_or_404(models.Page, slug=level0) which varies depending on the number of "level" arguments passed into the view. So "page" will always be a lookup of a Page object. Thanks, Nick On May 2, 11:05 

Re: Strange problem with admin, ManyToMany and DEBUG=False

2011-05-02 Thread Nick
ks! :) Is this a bug I've just stumbled across, or should admin.autodiscover() always be after models are imported in urls.py? Thanks, Nick -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dja

UpdateView help

2011-06-20 Thread Nick
UpdateView.as_view())) 1) What do I do to get from the URL responder into the class- based view, to tell the view what object I want to edit? 2) Why do I get a "name 'get_object' is not defined" error when I run this code? Thanks!! Nick -- You received this message bec

Multiple Databases

2011-07-05 Thread Nick
single model (think of these as customer specific databases). I will be using sqlite and want to save the path/ connection details of the dynamically created databases in one of the primary db's. Is this possible and if so what is the best approach to take? Thanks Nick -- You received thi

Conditional inline for django admin

2010-12-13 Thread Nick
I am working with an app that has several different models that are connected to a central model via a ForiegnKey. I'd like to display a certain inline based on a value from the central model. Ex. model1 some_field central = ForeignKey(CentralModel) model2 some_field central = ForeignKey(Centra

Admin inline adding one too many extra rows to the form

2010-12-14 Thread Nick
I have three models. Two are inlines of another model in the Admin. I have their extra parameters set to 0 so: class model1(admin.StackedInline): model = Model1 extra = 0 class model2(admin.StackedInline): model = Model1 extra = 0 class model3(admin.ModelAdmin): inline = [

redirecting on SMTP error

2010-12-20 Thread Nick
I have an app with some SMTP errors that are getting tricky. Our network team is working on our email servers for the next few days and it is affecting the auto-notifications portion of the app. Right now i am getting a 550 'relay not permitted' error. How can I trap this error and redirect upon e

Re: Serialize Data for JSON output

2010-12-20 Thread Nick
This sounds like it is an issue with your JS for your carousel. If you are needing to get your JSON directly into your JS code then you can just make gallery_thumbs_json_s list as a variable {'caro_list': gallery_thumbs_json_s} and then just call it in your template On Dec 20, 9:16 am, Dave Saye

string format date in query

2010-12-29 Thread Nick
I am using a little raw SQL to pull out a count of events by month. I am able to retrieve the correct information but am getting the month value in numerical form rather than an actual name. So instead of January I get a 1. Here is query: dates = markers.extra(select={'month': 'month(date)'}).valu

View file not processing any new additions

2011-02-09 Thread Nick
I have a view for an application that loops through a queryset and cleans the data for a certain kind of output but leaves all the DB data in tact as it was entered for archiving purposes. There are multiple conditional checks that are working fine but anything new I've added or subtracted from the

Re: View file not processing any new additions

2011-02-09 Thread Nick
Additionally, if I change any of the other elements in the view, say: es = ExamplTESTFORFAULT.object.all() it doesn't raise an error. Only when there is a syntax error. On Feb 9, 11:53 am, Nick wrote: > I have a view for an application that loops through a queryset and > cleans the

Re: View file not processing any new additions

2011-02-09 Thread Nick
Nevermind. I was checking the template for one view and editing another. Idiotic. yeesh. On Feb 9, 12:12 pm, Nick wrote: > Additionally, > > if I change any of the other elements in the view, say: es = > ExamplTESTFORFAULT.object.all() it doesn't raise an error. Only when &g

Populating charfield with ID's from many to many

2011-03-01 Thread Nick
I am trying to populate a CharField with id's from a many-to-many field. I am doing this by overriding the save method on the model save and using the default django admin for data entry, however, it requires 2 saves in order to get the data from the many-to-many field to populate the varchar fiel

A little help before I run down the wrong rabbit hole

2011-03-15 Thread Nick
I am working on an election application. I am at the point where I would like to start putting together the data entry point for the app and would like a little advice on how to proceed. Here is a (simplified) version of my models: class Candidate(models.Model): f_name = models.CharField()

Re: A little help before I run down the wrong rabbit hole

2011-03-15 Thread Nick
Thanks, Shawn. That was the first question I had. There will likely be more to follow but I didn't want to chase the wrong solution from the start. On Mar 15, 3:02 pm, Shawn Milochik wrote: > You can use formsets, which can be passed querysets upon > initialization. If this doesn't help, feel fre

Accessing values in formset loops

2011-03-29 Thread Nick
I am looping through a formset and attempting to add an additional field to the form that is a multi select checkbox that has a value of the ID of the current iteration of the formset loop. So: model1: name = CharField ID = IntegerField FK = ForeignKey('model2') model2: name my for

Re: Accessing values in formset loops

2011-03-29 Thread Nick
I guess the bigger question is, can I access the values of the fields without spitting out a form field? On Mar 29, 2:45 pm, Nick wrote: > I am looping through a formset and attempting to add an additional > field to the form that is a multi select checkbox that has a value of > the

inlineformset_factory default values

2011-03-30 Thread Nick
I am using inlineformsets_factory on a form and every time I save those fields that are not made available in the form are overridden to null values on save. How do i get it just to update those fields that are specifically listed in the form? -- You received this message because you are subscri

Re: inlineformset_factory default values

2011-03-30 Thread Nick
ave() return HttpResponseRedirect('') else: formset = CampaignFormSet(instance=r) here is the template {% for form in formset %} {{form.name.value}} {{form.party}} {{form.vote}} On Mar 30, 1:14 pm, Nick wrote: > I am using inlineformsets_factory on a form and eve

idiotic foreignkey error

2011-03-31 Thread Nick
I have a model with 3 foreignkeys to another model. This has never been an issue for me before but now it's throwing an error: has more than 1 ForeignKey to My model looks like this: a_race = models.ForeignKey('Race', related_name='arace', blank=True) b_race = models.ForeignKey('Race', related

Re: idiotic foreignkey error

2011-03-31 Thread Nick
sorry, they have unique names. When i was writing this message out I messed them up. the names are arace, brace and crace. I think this has something to do with some relic inlinde formsets I was using a while ago. On Mar 31, 2:19 pm, Shawn Milochik wrote: > They need unique related_name values.

Re: idiotic foreignkey error

2011-03-31 Thread Nick
I needed to declare fk_name in the inline formsets. I still stand by the fact that it's an idiotic error message. Not helpful at all. On Mar 31, 2:26 pm, Nick wrote: > sorry, they have unique names. When i was writing this message out I > messed them up. the names are arace, brac

Accessing object ID in override of model save()

2011-04-01 Thread Nick
Is there a way to access what the ID of a new object being created in the admin? so if you wanted to ovveride the save and then do a get_or_create on another object in another model with a foreignkey back to the object you are creating you would have that ID at your disposal. -- You received thi

Multiple selects for ForeignKey in admin

2008-10-24 Thread Nick Sandford
the category chosen. Would be useful for having lots of Bar objects to chose from and not having to use raw_id_fields Any ideas? Cheers, Nick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Can python/django match the features of php/zend framework?

2008-10-26 Thread Nick Lo
F communities being equally helpful. The reasons outside the frameworks are probably more likely to give you your answers than a feature-by-feature comparison... and of course testing them out. Cheers, Nick --~--~-~--~~~---~--~~ You received this me

Re: Django Forums

2008-11-12 Thread Nick Lo
one is just enter email and "go"; too easy! Aside from that, anyone missing a forum-like interface should find some comfort here: http://groups.google.com/group/django-users/topics?hl=en Nick --~--~-~--~~~---~--~~ You received this message because

Re: Django newbie observation

2008-11-12 Thread Nick Lo
e same way: http://docs.djangoproject.com/en/dev/topics/db/sql/ You don't have to use the Django ORM for everything and you can always fall back on just SQL until you're confident enough. Cheers, Nick --~--~-~--~~~---~--~~ You received this message beca

Re: Named URLs for Flatpages?

2008-12-16 Thread Nick Sandford
{ 'url': '/about/' }, name='about'), and then in your templates you can say {% url about %} and it should work as advertised. Hope this helps! Cheers, Nick --~--~-~--~~~---~--~~ You received this message because you are subscribe

Re: Renaming of mailing lists to avoid user confusion

2008-08-20 Thread Nick Lo
confusion for this user. Nick --~--~-~--~~~---~--~~ 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

Re: Renaming of mailing lists to avoid user confusion

2008-08-20 Thread Nick Lo
flow of user questions into the internals discussions and in fact makes them worse as users are even more confused as to where they should ask questions. It would more than likely just increase the need to redirect traffic to the correct list. Nick --~--~-~--~~~--

Re: Renaming of mailing lists to avoid user confusion

2008-08-20 Thread Nick Lo
bscribe to the developer list to get to know who they are. Nick --~--~-~--~~~---~--~~ 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 T

lighttpd + fcgi + FORCE_SCRIPT_NAME = admin grief

2008-08-21 Thread Nick Clarey
once = ( "^(/media.*)$" => "$1", "^(/site_media.*)$" => "$1", "^/favicon\.ico$" => "/media/favicon.ico", "^(/.*)$" => "/site.fcgi$1", ) accesslog.fil

Verbose model name in Admin interface

2008-09-01 Thread Nick Day
any easy way to do this without directly modifying the admin templates? Thanks, Nick --~--~-~--~~~---~--~~ 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@goo

Re: Verbose model name in Admin interface

2008-09-01 Thread Nick Day
Oops I totally missed that - thanks! Nick On Sep 1, 10:58 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Mon, Sep 1, 2008 at 4:56 AM, Nick Day <[EMAIL PROTECTED]> wrote: > > I have a model called "en".  In the admin interface this appears as > &

Re: Verbose model name in Admin interface

2008-09-01 Thread Nick Day
thout modifying the admin templates? Thanks, Nick On Sep 1, 12:39 pm, Nick Day <[EMAIL PROTECTED]> wrote: > Oops I totally missed that - thanks! > > Nick > > On Sep 1, 10:58 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > > > On Mon, Sep 1, 2008 at 4

Different __unicode__ return values for admin site?

2008-09-01 Thread Nick Day
for more detail to be shown in the admin site, where as the normal site shows a less-detailed field (short_name). Any help very much appreciated! Cheers, Nick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: limiting choices in admin.ModelAdmin based on request.user

2008-09-01 Thread Nick Day
Would somebody be able to provide a simple example of using get_form() within the ModelAdmin to retrieve the currently logged-in user? Thanks in advance, Nick On Aug 26, 10:16 am, patrickk <[EMAIL PROTECTED]> wrote: > can someone provide an example for this? > > moreover, how is

Re: Different __unicode__ return values for admin site?

2008-09-01 Thread Nick Day
Thanks for your help - I used list_display and it works fine. Cheers, Nick On Sep 1, 2:55 pm, "Valts Mazurs" <[EMAIL PROTECTED]> wrote: > Hello, > > I guess that you want to have more details in admin list view. > You can use list_display configuration attribute in

Re: limiting choices in admin.ModelAdmin based on request.user

2008-09-01 Thread Nick Day
Thanks! :) Nick On Sep 1, 3:18 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Sep 1, 2:53 pm, Nick Day <[EMAIL PROTECTED]> wrote: > > > Would somebody be able to provide a simple example of using get_form() > > within the ModelAdmin to retrieve the currently l

Displaying ManyToMany relations in Admin

2008-09-19 Thread Nick Sandford
If so, can I change it? Also, is there any better way to do this? I'm not too fussed about it since generally I don't have to edit the information, but it would be nice to be able to. Thanks in advance, Nick. --~--~-~--~~~---~--~~ You received this mess

Suggested approach for a date based form layout

2008-09-29 Thread Nick Lo
ey came up with? Cheers, Nick --~--~-~--~~~---~--~~ 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

<    1   2   3   4   5   6   7   >