apache authentication using Django on windows

2008-11-05 Thread Matt
Hi, I have Django running on Apache 2.2 on windows. I am attempting to use django authentification to secure an apache folder using this configuration: AuthType Basic AuthName "mysite.com" AuthUserFile /dev/null AuthBasicAuthoritative Off Require valid-user PythonPath

Re: apache authentication using Django on windows

2008-11-05 Thread Matt
That worked. Thanks! On Nov 5, 3:41 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote: > Hi, > > Have you tried to create an empty file and use the filename as AuthUserFile? > >   Thomas > > Matt schrieb: > > > > > Hi, > > > I have Django ru

Apache cookie authentification

2008-11-07 Thread Matt
Hi, I am trying to enable django cookie based authentification within apache using the patch at http://code.djangoproject.com/ticket/3583. Apache seems to be suceffuly passing the request onto django, but then fails with the following error: [Fri Nov 07 17:47:40 2008] [error] [client 10.1.0.27]

Help: Running 1.0 and 0.96 side by side?

2008-09-12 Thread Matt
y mess if I try this. Does anyone have ideas on running 0.96 and 1.0 side by side safely? Matt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

No FlatPage matches the given query.

2008-10-05 Thread Matt
Hello, I am running through the Practical Django projects book. I've gotten to the point where I am trying to view an entry detail, but the error that I am getting is: No FlatPage matches the given query Here's my urls.py: from django.conf.urls.defaults import * # Uncomment the next two lines

Re: No FlatPage matches the given query.

2008-10-06 Thread Matt
I had not. Thanks! On Oct 5, 6:27 pm, John Allen <[EMAIL PROTECTED]> wrote: > Have you looked at these notes on how to get the Practical Django > Projects examples to > work:http://blog.haydon.id.au/2008/08/notes-on-practical-django-projects.html > ? --~--~-~--~~~---~

Mysql->postgres migration. Now id not auto incrementing/being added at all

2009-06-28 Thread Matt
Last week I started migrating a project from MySQL over to Postgres to start toying around with GeoDjango. I ran a dumpall in MySQ, altered the results and loaded it up into Postgres into tables created by the syncdb command. Everything works fantastically, except for when I try to add new record

Re: Mysql->postgres migration. Now id not auto incrementing/being added at all

2009-06-28 Thread Matt
Fair enough. If that's as bad as it gets for you on Monday morning, you're doing all right. Thanks for the help. That sounds like it will address the problem. If I run into any problems, I'll post them here. So future travelers, unless I repost, Wayne's plan worked. Thanks! On Jun 28, 1:59 pm,

Django-rest-interface - querying data

2009-07-02 Thread Matt
ited though. Can someone clarify the principals for me, and suggest a way to perform queries RESTfully? Many thanks, Matt. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Django-rest-interface - querying data

2009-07-03 Thread Matt
ven [1], unless the parameters by which a resource list can be filtered are specified. I have ordered the full book though, so I guess I will find out... Matt. [1] http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven On Jul 2, 6:36 pm, Rajesh D wrote: > On Jul 2, 11:

list_filter on Related field

2009-08-25 Thread Matt
I am putting together a project that involves the following models: class contentcreator(models.Model): name = models.CharField(max_length=50) phone = models.CharField(max_length=60, blank=True) supervisor = models.CharField(max_length=60) department = models.CharField(max_length=

total newb question with custom save()

2009-09-08 Thread Matt
hey folks, I have two models: ___ class contentcreator(models.Model): name = models.CharField(max_length=50) phone = models.CharField(max_length=60, blank=True) supervisor = models.CharField(max_length=60) department = models.Cha

Re: total newb question with custom save()

2009-09-08 Thread Matt
Thank you. That worked perfectly. On Sep 8, 1:39 pm, Daniel Roseman wrote: > On Sep 8, 7:56 pm, Matt wrote: > > > > > hey folks, > > > I have two models: > > ___ > > class contentcreator(models.

Django Registration templates not talking to my other pages. Sometimes.

2009-06-02 Thread Matt
e, which is the redirect from the login page. Here's the curveball: When I log in to the admin site, and then go to my project, everything works smashingly. I can go to all of my pages, and it says, "Hi, Matt!" What is going on here? I assume I

Re: Django Registration templates not talking to my other pages. Sometimes.

2009-06-04 Thread Matt
redirect screen IS displaying the correct user name, but now all the other pages kick them back to the login page. Any thoughts on what might be going on here? It's entirely possible (likely, even) that I just screwed something up in a very basic way. On Jun 3, 10:47 am, Jashugan wrot

Re: Django Registration templates not talking to my other pages. Sometimes.

2009-06-09 Thread Matt
I haven't toyed with the debugging tool yet. Thanks for the suggestion -- I'll let you know how it woks out. On Jun 8, 4:48 pm, Jashugan wrote: > On Jun 4, 2:45 pm, Matt wrote: > > > It looks like you're right and the login page isn't actually logging >

Equivalent of timesince in the view

2009-06-18 Thread Matt
I am working on a project involving PyAMF to do display in Flash, so I don't believe I'm able to use the timesince template tag. Is there a way to pass along timesince-type information in my view for each record in a QuerySet? I'm basically looking for something similar to the annotate() method u

Passing arguments on redirect (Django 1.1)

2009-09-30 Thread Matt
way to pass these extra args without having to include them in the URL? Sorry if this is basic, but I'm new to Django. Thanks, Matt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Passing arguments on redirect (Django 1.1)

2009-09-30 Thread Matt
are errors, the display is handled in JS (not through another template). Thanks, Matt On Sep 30, 12:53 pm, Daniel Roseman wrote: > On Sep 30, 5:05 pm, Matt wrote: > > > > > I'm using the redirect() function provided in Django > > 1.1:http://docs.djangoproject.com/en/dev

{% for articles in article_list %}

2009-10-01 Thread Matt
How do you add an article to that? I mean put some python and django code down so I can understand it but, here's what I think it might be: example.py #!C:/Python/python import datetime today = datetime.datetime.today() class article_list(): class articles(): def from_Sarah():

Radar

2009-10-02 Thread Matt
Does Django have a "radar", like it searches for child templates that extends the parent template? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-user

Re: Radar

2009-10-02 Thread Matt
then do you view the child template in a browser, and it looks for the parent template, then outputs the all the code? On Oct 2, 1:42 pm, Karen Tracey wrote: > On Fri, Oct 2, 2009 at 7:00 AM, Matt wrote: > > > Does Django have a "radar", like it searches for child temp

Re: Radar

2009-10-02 Thread Matt
Also, I meant if view a parent template, it looks for child templates around it that extend it. I think my question above is the other way around On Oct 2, 6:33 pm, Matt wrote: > then do you view the child template in a browser, and it looks for the > parent template, then outputs the a

Re: Radar

2009-10-03 Thread Matt
oh that makes sense --~--~-~--~~~---~--~~ 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+

Datetime

2009-10-05 Thread Matt
what are all the attributes of datetime.datetime? Like: time = datetime.datetime. class time_is_now(request): html = "It is now %s" % time return HttpResponse(html) And others? --~--~-~--~~~---~--~~ You received this message because you are

Many-To-Many issue; trying to find a way around conditional id

2010-04-19 Thread Matt
Hoping you all can tell me what I'm doing that's stupid here. I have three models: class highschool(models.Model): name = models.CharField(max_length=50) address = models.CharField(max_length=60) city = models.CharField(max_length=60) state = models.CharField(max_length=2) class c

Re: Many-To-Many issue; trying to find a way around conditional id

2010-04-19 Thread Matt
Oops. That title should be "conditional if," of course. On Apr 19, 2:43 pm, Matt wrote: > Hoping you all can tell me what I'm doing that's stupid here. I have > three models: > > class highschool(models.Model): >     name = models.CharField(max_length=5

Form Functionality

2010-11-13 Thread Matt
e form render_to_response form Then I have a view that processes /. I am curious what you guys think about using HttpResponseRedirect to facilitate clean urls. Am I making this too complicated? Thanks, Matt -- You received this message because you are subscribed to the Google Groups "Django u

Site wide configuration in admin

2010-02-06 Thread Matt
Hi all I'd like to provide site wide configuration settings in the admin panel. I'd like users to be able to edit things like the front page text and specify a featured event (represented by a model). How can this be achieved? Thanks -- You received this message because you are subscribed to

Confusion over CRUD generic views and newforms

2007-07-25 Thread Matt
ield}} for every field. So my first question is: how can this be done automatically? Secondly, am I shooting myself in the foot here by using elements of oldforms which will be canned in the next stable release? And if so, are there any resources out there on how to do this the 'right' way? M

Re: Confusion over CRUD generic views and newforms

2007-07-25 Thread Matt
/servers/ basehttp.py", line 379, in send_preamble 'Date: %s\r\n' % (formatdate()[:26] + "GMT") File "socket.py", line 262, in write self.flush() File "socket.py", line 249, in flush self._sock.sendall(buffer) error: (32, 'Broke

Re: Confusion over CRUD generic views and newforms

2007-07-26 Thread Matt
27;t been implemented (or even patched) for newforms yet. Thanks, Matt. On Jul 26, 12:19 am, "Etienne Robillard" <[EMAIL PROTECTED]> wrote: > I think the default value for {{ form }} is {{ form.as_table }}, so > perhaps it is safe to just use the default {{ form

Re: Confusion over CRUD generic views and newforms

2007-07-25 Thread Matt
Hi Eric, Unfortunately neither of those seem to do anything - the template seems to just skip over it. I first tried with the 0.96 release, and I have updated to the SVN version with the same result. Any idea what I'm doing wrong? Thanks, Matt. On Jul 25, 6:55 pm, "[EMAIL PROTECTED

Re: Confusion over CRUD generic views and newforms

2007-07-26 Thread Matt
to redo my work when the next release comes out. The CRUD generic views seem so useful - I'll be amazed if there's not a working newforms solution out there somewhere. If anyone knows please enlighten me! Thanks, Matt. --~--~-~--~~~---~--~~ You receive

Re: Confusion over CRUD generic views and newforms

2007-07-29 Thread Matt
Thanks Phil. Seems to do exactly what it promises. Regards, Matt. On Jul 29, 12:10 pm, "Phil Davis" <[EMAIL PROTECTED]> wrote: > On 26/07/07, Matt <[EMAIL PROTECTED]> wrote: > > > Can you confirm that the CRUDgenericviewsare compatible with > >newforms?

Match from list in URLconf

2007-07-29 Thread Matt
Hello list, I was wondering if the following is possible with the URLconf: I'd like the URL regex to match part of a URL if it exists within a specific list of values. For example, if you wanted to direct users to their area of your site, you might have something like this: www.mysite.com

Re: Match from list in URLconf

2007-07-30 Thread Matt
Hi everyone, Thanks for the suggestions. The problem is a little more subtle than my example suggested. For instance, if you also had categories of users and wanted to be able to list the users in each category, a 'human-friendly' url scheme might look like this: www.mysite.com/

Re: Match from list in URLconf

2007-07-31 Thread Matt
n existing URL structure so I've got to do it this way. At least now I know I've surveyed all the options. Thanks again all, Matt. On Jul 30, 7:57 pm, Emanuele Pucciarelli <[EMAIL PROTECTED]> wrote: > Il giorno 30/lug/07, alle ore 17:21,Mattha scritto: > > > For instan

Dynamically changing newforms

2007-08-20 Thread Matt
ields, but those changes are applied on a class-wide (as opposed to per-instance) basis, which doesn't help me because I have multiple Question forms on each page. Short of including the extra context information (example answer, required etc.) ins

Re: Dynamically changing newforms

2007-08-22 Thread Matt
sed to determine the datatype of an object. Thanks again, Matt. On Aug 20, 11:53 pm, Doug B <[EMAIL PROTECTED]> wrote: > You could build a builder function that does what you want (totally > untested, rough example). The form_for_model functions are good > working examples if I

Re: how to speed up objects saving

2008-02-04 Thread Matt
t may be? The situation is the same on both the dev server and through Apache. Alex - have you made any progress overriding the save method, and if so, what kind of speedup did you get? Thanks all, Matt. On Feb 1, 2:34 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > In addition to Ivan

mod_wsgi & trailing slashes on urls

2008-03-03 Thread Matt
o') os.environ['DJANGO_SETTINGS_MODULE'] = 'src.settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() - Can someone with a better understanding of mod_wsgi can explain why the examples at [1] include trailing slashes on aliases? Doe

Re: mod_wsgi & trailing slashes on urls

2008-03-04 Thread Matt
moves the /my_app/foo prefix from the url in the address bar and feeds the rest to Django - in the first url_pattern above, that would be an empty string. My guess is that mod_wsgi is sending it None instead, causing the exception. Simply matching something other than the empty string would a

Setting up get_absolute_url with a generic view

2008-04-20 Thread Matt
I'm trying to get the following get_absolute_url function working in one of my models: def get_absolute_url(self): return ('django.views.generic.date_based.object_detail', (), { 'year': self.start_date.year,

Creating search forms

2008-05-20 Thread Matt
render_to_response('projects/projects_list.html', RequestContext(request, context)) I've been looking around a bit at generic views, but it didn't seem to be quite what I am looking for. Is this ty

Re: Best way of getting objects within a certain date range (method or manager)?

2008-06-30 Thread Matt
On Jun 30, 8:36 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > It sounds like I'm using "event_date" without defining it first. But > the examples in the Django documentation do the same thing. What am I > doing wrong? Try: super(CurrentManager, self).get_query_set().filter(event_date__gte=

Re: Django Cheat Sheet

2007-02-16 Thread Matt
ntegerField no longer has auto_now and auto_now_add parameters. * The distinction between lists and tuples has been removed. M. -- Matt Riggott. Dictated but not read. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &quo

How does django interact with memcached?

2007-04-24 Thread Matt
ress of the memcached instance being queried. Thanks in advance, Matt Bennett. [1] http://www.backhand.org/wackamole/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post t

Using settings.LOGIN_URL and django.core.urlresolvers.reverse

2007-04-25 Thread Matt
verse('gigall.apps.accounts.views.profile') This fails; the URLs used are Django's defaults. Does anyone know why this is so? And can I work around it? Cheers, M. -- Matt Riggott (mailto:[EMAIL PROTECTED]). Dictated but not read. --~--~-~--~~~---~--~--

Re: Using settings.LOGIN_URL and django.core.urlresolvers.reverse

2007-04-25 Thread Matt
W) return HttpResponseRedirect('%s?%s=%s' % (login_url, REDIRECT_FIELD_NAME, quote(request.get_full_path( _checklogin.__doc__ = view_func.__doc__ _checklogin.__dict__ = view_func.__dict__ return _checklogin return _dec (Pretty-printed co

newforms unique field(s)

2007-05-21 Thread Matt
sg': msg}) else: f = invite_me return render_to_response( 'invite/index.html', {'form':f,}) If someone could point me in the right direction it would be greatly appreciated. Thanks Matt --~--~-~--~~

Re: newforms unique field(s)

2007-05-21 Thread Matt
After looking at http://code.google.com/p/django-registration/: forms.py [...] def clean_username(self): """ Validates that the username is not already in use. """ if self.cleaned_data.get('username', None): try: user = User.objects

Re: How to add a onclick attribute to a newforms element

2007-10-14 Thread Matt
Greg, You might want to give http://en.wikipedia.org/wiki/Unobtrusive_JavaScript a read. It discourages the use of inline javascript like that. Matt. On Oct 14, 1:01 am, Greg <[EMAIL PROTECTED]> wrote: > Nevermind, > Got it figured out > > s_check = > forms.CharField(widge

ImageField Validation Error

2007-11-04 Thread Matt
I've got a model with an ImageField. But, when I attempt to add an image via the Admin interface, I receive the error message: "Upload a valid image. The file you uploaded was either not an image or a corrupted image." I'm pretty sure that all of my paths are set correctly because I can change th

AutoImageField auto_rename

2007-11-09 Thread Matt
saved with the correct PK naming schema. Any help would be greatly appreciated. Thanks Matt 1-http://code.djangoproject.com/wiki/CustomUploadAndFilters --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

TinyMCE Popup Problem

2007-11-19 Thread Matt
roblem? Thanks, Matt --~--~-~--~~~---~--~~ 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 [EMAIL PR

Re: sql.py cannot find tables that it generated sql to create

2007-11-30 Thread Matt
Was this ever fixed? I'm still experiencing similar behavior in r6783. Thanks! --Matt On Nov 15, 4:55 pm, richbodo <[EMAIL PROTECTED]> wrote: > ... > > Thanks. I switched to Postgres for now and everything works fine. > I'll switch back in a few days and fi

Issues trying to Caching a View

2007-12-04 Thread Matt
4 11:52:21 -- Does anyone have an idea of what the issue could? Am I attempting to cache the file properly? Thanks, Matt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&quo

Re: Dynamic class definitions

2007-12-05 Thread Matt
ds' [1] will help you with that. Otherwise, if the complexity is just presentation/form-based, you can use custom form fields/widgets. See James Bennett's excellent writeup on newforms for more on that (and newforms in general) [2]. Matt. [1] http://www.djangoproject.com/documentation/cu

Re: Issues trying to Caching a View

2007-12-05 Thread Matt
Alright... I think I might have tracked it down. I think it's an issue with "Vary: Cookie" and it appears their is a fix for making this header only show up when the request varies on the cookie. http://code.djangoproject.com/ticket/3586 Haven't confirmed this yet, but seem l

Re: Issues trying to Caching a View

2007-12-05 Thread Matt
h the user specific factor. Instead, with Vary: Cookie, the browser goes back to the server and grabs the file again. Which is not what I want. Any help would be appreciated. Thanks, Matt On Dec 5, 12:26 pm, Matt <[EMAIL PROTECTED]> wrote: > Alright... I think I might have tracked it

Reload Admin interface after model changes

2006-10-06 Thread Matt
eating it again (with the same name). However, the admin interface is still trying to use the old DB model. What can I do to reload the admin interface so that it uses the new models? Matt --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Re: Reload Admin interface after model changes

2006-10-06 Thread Matt
n to confirm that it was a problem with not restarting apache. Matt --~--~-~--~~~---~--~~ 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

Geocoding in contrib admin

2007-01-15 Thread Matt
a for an Event, I would like to redirect to a page that has the geocode result/s before saving the lat/lng. I am fairly new to Python and Django, so any suggestions would be a great help. Thanks Matt [1]http://exogen.case.edu/projects/geopy/ --~--~-~--~~~---~--~

Re: Geocoding in contrib admin

2007-01-16 Thread Matt
Adrian - Thanks for the advice. I was trying to do some template/view magic. Matt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: Django Cheat Sheet

2007-02-13 Thread Matt
f the fields options in the Admin inner class - something we're forever looking up.) A loud 'Thank you!' should go to the designer, Ed, for managing to make all that text look presentable. Cheers, Ed. M. -- Matt Riggott. Dictated but not read. --~--~-~--~~~---~-

AW: Non-model driven ordering

2005-09-23 Thread Matt
pe to hold the order and then add re-order widgets to the admin list page?) Comments / suggestions? Thanks. - matt

Re: Non-model driven ordering

2005-09-23 Thread Matt
Cool. And I sort of have it working. class Pizza: name = meta.CharField(maxlength=100) class Topping: name = meta.CharField(maxlength=100) pizza = meta.ForeignKey(Pizza, edit_inline=meta.TABULAR) class META: admin = meta.Admin() order_with_respect_to = 'pizza' On the p

Re: Non-model driven ordering

2005-09-23 Thread Matt
TABLE pizza_toppings ( id integer NOT NULL PRIMARY KEY, pizza_id integer NOT NULL REFERENCES pizza_pizzas (id), name varchar(50) NOT NULL, _order integer NULL ); COMMIT; ideas? I am using sqlite3... could there be a sqlite3 problem with _order? - matt [1] http://www.koder

Re: Non-model driven ordering

2005-09-23 Thread Matt
Ok, this is as far as I can go tonight... explicitly adding _order = meta.IntegerField(null=True) to my Topping model makes the admin list page work. But the sql then has 2 _order fields in the create table, and the detail admin form fails with: TemplateSyntaxError: Variables and attribute

Re: Non-model driven ordering

2005-09-24 Thread Matt
Thanks for the hint. Here's what worked for me: class Toppings: ... class META: admin = meta.Admin(ordering=('_order',)) order_with_respect_to = 'pizza' and now the orderings seem to work. ... but (and there's always a but, huh?) now on an individual topping edit page t

Re: initial data

2005-09-24 Thread Matt
to clarify for those as slow as I am... the "models' Python model names" refers to the plural names of your modul class names. rewriting the example to (hopefully) make this more clear: class Poll(meta.Model): ... class Choice(meta.Model): ... will look for the following files: apps/

Re: Referencing MEDIA_URL from templates

2005-10-04 Thread Matt
good question. looking at the {% debug %} output I'd hoped that this would work: {{ myproject.settings.main.MEDIA_URL }} but it doesn't output for me.

LDAP _without_ built-in Django user authentication

2006-03-07 Thread Matt
I've read about a 'hack' Jason Huggins posted a month ago. He implements LDAP support for his Django app, but it requires every user to be in both LDAP and the user database table. This seems pointless to me. Either you use Django's built-in database authentication or you use LDAP, not both. I

Re: LDAP _without_ built-in Django user authentication

2006-03-08 Thread Matt
Is there any good documentation for implementing LDAP with Django? The admin feature of Django is awesome and I'd love to use it, but in addition to the need for LDAP my app will have to parse uploaded CSV files in order to populate certain database tables simply because there is far too much dat

Re: LDAP _without_ built-in Django user authentication

2006-03-09 Thread Matt
If it was my decision I'd simply use Django's authentication. Unfortunately it's my supervisor's decision, and he wants me to use LDAP _exclusively_ so that's what I have to do. I don't know much about LDAP, but from what I understand users can be grouped based on their level of access. For exam

Re: LDAP _without_ built-in Django user authentication

2006-03-09 Thread Matt
Sure that would work, but it sounds like a lot of work, and it's duplicating a lot of data. Another issue that would create problems is adding users to LDAP directly -- Django wouldn't know about those users. --~--~-~--~~~---~--~~ You received this message becaus

Re: LDAP _without_ built-in Django user authentication

2006-03-09 Thread Matt
OK, I was confused about why Django still needs usernames in its database even though LDAP is the new authentication method. I thought it would require authenticating via LDAP, then checking for the user _and_ pass in Django's database. I didn't realize that I will only have to copy the username

SESSION_COOKIE_AGE in global_settings.py

2006-03-10 Thread Matt
I'm trying to change the behavior of my session cookies. Currently, if a user does not log out before closing his browser, then he can return to the admin anytime within 2 weeks without being prompted to log in again. Ideally I want the session cookie to be erased when the user closes his browse

Re: SESSION_COOKIE_AGE in global_settings.py

2006-03-10 Thread Matt
Thanks for the reply, Rob. I finally figured out one of my problems. Changing the setting in my global_settings.py file was not affecting my project, so I had to add the # SESSION # section (which includes SESSION_COOKIE_AGE, SESSION_SAVE_EVERY_REQUEST, and a few others) to my project-specific s

Test database not auto-flushing

2013-03-01 Thread Matt
I have a bunch of unit test files, all of which consist of django.test.TestCase classes. Wrote myself a little shell script to uncomment/comment test file imports in my __init__.py file, so I can run tests from certain test files, based off the command line arguments I give it. I am also abl

How to write a view that accesses a method over all objects in a given model?

2011-04-26 Thread matt
First post, creating first Django project and having a of an issue I was hoping for some help with! I'm trying to write my own search which takes as input a user's location and returns a list of places (from my db) sorted by proximity. Here's roughly what I've got: in models.py: class Place(mode

Re: How to avoid passing of the same parameters in many views

2010-12-19 Thread Matt
I am doing something similar to Alexay, I have a context processor repeating the same query for all of my views. Piotr, ( or anyone ) can you expand more about caching the data? Maybe some ideas of things to Google for. On Dec 19, 2:25 am, Piotr Kilczuk wrote: > Hi, > > I have a block, included i

Noob question: using multiple classes in a detail page's view

2010-12-21 Thread Matt
I have two classes in my model: nonprofit and executive. It's a one-to- many relationship, multiple executives for each nonprofit. I created an index page that displays all executives and all nonprofits. I've created detail pages for nonprofit and executive. But when I try to link back to a nonprof

Re: Noob question: using multiple classes in a detail page's view

2010-12-21 Thread Matt
re is a performance gain, it does not require database queries. > > 2010/12/21 Matt > > > > > > > > > > > I have two classes in my model: nonprofit and executive. It's a one-to- > > many relationship, multiple executives for each nonprofit. > &g

Django development -

2018-01-25 Thread Matt
ssic feature / debug question - but I didn't knwo where else to ask. Thanks! -Matt -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsu

Unable to get tests to work

2016-08-17 Thread Matt
When I'm trying to get tests to work it simply states that its unable to import .tests. I'm not sure what I'm missing here. Here is some output please let me know if you need more: ./manage.py tests backups https://dpaste.de/4U9C The test file: https://dpaste.de/bBZt -- You received this mess

Re: Unable to get tests to work

2016-08-17 Thread Matt
Sorry for the typo, but I have already do that way. I have the output in the the first link. On Wednesday, August 17, 2016 at 2:24:19 PM UTC-6, Fred Stluka wrote: > > Matt, > > Drop the "s" from "tests": > > ./manage.py test backups > > --Fred &g

Re: Unable to get tests to work

2016-08-17 Thread Matt
UTC-6, Fred Stluka wrote: > > Matt, > > Oops! Right. I just noticed that in the dpaste. > > My next guess is you may need to change the name "good_index_text" > to something that starts with "test_" to get it to be recognized as a > test. > > Or

Re: Unable to get tests to work

2016-08-18 Thread Matt
Here you go: https://dpaste.de/OF8j On Wednesday, August 17, 2016 at 11:16:27 PM UTC-6, Gergely Polonkai wrote: > > Hello, > > this “refreshes.backups.tests” thing bothers me a lot. Could you show us > your directory structure, please? > > Best, > Gergely > > On

Re: Unable to get tests to work

2016-08-18 Thread Matt
Gergely > > On Wed, Aug 17, 2016, 23:03 Matt > wrote: > >> Ok a step forward. When I spell out the tests it works: >> >> https://dpaste.de/2MXf >> >> But when I run test without arguments, it fails out: >> >> https://dpaste.de/cgTH >> >

Re: Unable to get tests to work

2016-08-19 Thread Matt
xplain why there are some pyc files but not all. pytest was an attempt to resolve the issue outside of django's manage.py. It failed as well. Here is the pytest.ini: [pytest] DJANGO_SETTINGS_MODULE=refreshes.settings Thanks, Matt On Friday, August 19, 2016 at 10:37:51 AM UTC-6, Fr

Set user permission via python

2019-04-09 Thread matt
Hi, I'm trying to set a permission for a user that I'm creating with a python script. I've tested and found that the codename for the permission is "display_data.settings" using the following: python manage.py shell from django.contrib.auth.models import User user_name = User.objects.get(userna

Re: Query help

2019-09-12 Thread Matt
Tosin, Please refer below. This should help. https://docs.djangoproject.com/en/2.2/topics/db/queries/ best, matt On Thu, Sep 12, 2019 at 10:01 AM Tosin Ayoola wrote: > Halo guyz I actually need a little help, I'm working on a airline tickets > reservations project using postm

filtering pulldowns in django admin

2008-10-21 Thread Matt Berg
I realize there is probably a very simple solution for this but it has been bothering me. How do I filter a pulldown in the admin. If I have an inline form, for example, I want to be able to limit results in a pulldown to the parent object/form. Thanks for the help. Matt

Anyone have any good solutions for site navigation?

2008-10-24 Thread Matt Wilson
My site has a global-navigation header, with links to 5 sections of the site. I highlight the section that the viewer is currently viewing in the global header. Other than the highlighting, the header is the same on every page of the site. Then I also have a "local" navigation that shows differ

Advice needed on admin-template replacement

2008-11-02 Thread Matt Brown
I'm wondering if I did the right thing, here. I wanted to replace the admin/base_site.html template, but only for requests to /myapp/admin/ *, leaving requests to /admin/* alone. The first thing I tried was a copy/modify of base_site.html to myapp/ templates/admin/myapp/, but the modifications w

Re: Advice needed on admin-template replacement

2008-11-02 Thread Matt Brown
hanks, - Matt On Nov 2, 12:58 pm, Matt Brown <[EMAIL PROTECTED]> wrote: > I'm wondering if I did the right thing, here.  I wanted to replace the > admin/base_site.html template, but only for requests to /myapp/admin/ > *, leaving requests to /admin/* alone. > > The

filter_horizontal

2008-12-16 Thread Matt Davies
Hello everyone I'd like to know everything there is to know about using the filter_horizontal method when displaying admin backend choices. I want to re-engineer it. I was wondering if anyone has done anything like this and could give me a couple of pointers to get started. Any assistance as al

Re: filter_horizontal

2008-12-17 Thread Matt Davies
Thanks Rajesh That's exactly what I was looking for. 2008/12/16 Rajesh Dhawan > > > I'd like to know everything there is to know about using the > > filter_horizontal method when displaying admin backend choices. > > > > I want to re-engineer it. > > > > I was wondering if anyone has done any

  1   2   3   4   5   6   >