Re: Best Practices to Make your Apps Portable

2007-07-26 Thread Ryan
I like this setup. I will use this as a basis for my own upcoming project. Thanks. RG On Jul 25, 11:12 am, Sebastian Macias <[EMAIL PROTECTED]> wrote: > Thanks a lot for the feedback everyone. > > I have come up a perfect setup and folder structure (at least > perfect for my needs) that will

Re: choices/ and getting rid of the dashes?

2007-09-10 Thread Ryan
Use initial when calling your form class. formClass = forms.form_for_model(Person) form = formClass(initial={'gender': 'm'}) On Sep 6, 4:31 pm, Mark Green <[EMAIL PROTECTED]> wrote: > Hi all, > > This is my model: > > class Person(models.Model): > GENDER_CHOICES = ( > ( 'm', 'Male'

GEOIP_LIBRARY_PATH in settings.py

2008-10-16 Thread ryan
Is this correct?: GEOIP_LIBRARY_PATH = '/home/USERNAME/geoip/lib/libGeoIP.a' --~--~-~--~~~---~--~~ 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

Re: ViewDoesNotExist No module. where is it being called, I don't want it to.

2008-10-17 Thread ryan
"I do have A feild in my times model named user" Is it a ForeignKey to Django's User model? If so you need to import that at the top of your models.py file -ryan On Oct 17, 3:42 pm, KillaBee <[EMAIL PROTECTED]> wrote: > I keep getting this error that says ViewDoesNotExist:

Re: ViewDoesNotExist No module. where is it being called, I don't want it to.

2008-10-17 Thread ryan
no, i just checked yr code. that's not it. On Oct 17, 5:25 pm, ryan <[EMAIL PROTECTED]> wrote: > "I do have A feild in my times > model named user" > > Is it a ForeignKey to Django's User model? > If so you need to import that at the top of your models.py file &

distinct doesn't work after sorting by reverse foreign key

2008-12-04 Thread ryan
For instance, I have two objects: 1) Blog 2) Entry with a ForeignKey to Blog, and a Date field titled DateAdded Now, I want to list all my blogs, ordering by the most recent added entry. I tried: blog.objects.all().sort_by('entry__dateAdded').distinct() But the result was that is a given blog

Re: distinct doesn't work after sorting by reverse foreign key

2008-12-04 Thread ryan
... ) On Dec 4, 9:24 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2008-12-04 at 19:09 -0800, ryan wrote: > > For instance, I have two objects: > > 1) Blog > > 2) Entry with a ForeignKey to Blog, and a Date field titled DateAdded > > > Now, I want to lis

Re: distinct doesn't work after sorting by reverse foreign key

2008-12-04 Thread ryan
... ) On Dec 4, 9:24 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2008-12-04 at 19:09 -0800, ryan wrote: > > For instance, I have two objects: > > 1) Blog > > 2) Entry with a ForeignKey to Blog, and a Date field titled DateAdded > > > Now, I want to lis

Re: distinct doesn't work after sorting by reverse foreign key

2008-12-04 Thread ryan
uld expect. On Dec 4, 10:17 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2008-12-04 at 20:15 -0800, ryan wrote: > > thanks for the thorough reply! I now understand how to proceed. > > > However, I'm not convinced that distinct shouldn't do this for me...

Re: distinct doesn't work after sorting by reverse foreign key

2008-12-04 Thread ryan
expect from a distinct() function? On Dec 4, 10:22 pm, ryan <[EMAIL PROTECTED]> wrote: > There's no mind reading required. I have a queryset of Blog objects, > not entry objects (or SQL rows for that matter). When I call distinct, > I would expect a "distinct set of blog object

Re: AlreadyRegistered Exception after newforms-admin merge

2008-09-10 Thread ryan
Good catch. Thank you On Aug 3, 10:14 pm, "Pedro Valente" <[EMAIL PROTECTED]> wrote: > I'm not sure if it's your case, but I got the AlreadyRegistered errors > because before the merge I used the NFA branch and had an admin import > inside __init__.py (not needed anymore). > > I had forgotten

django-facebookconnect

2009-04-02 Thread Ryan
think. -- Ryan Mark http://ryan-mark.com 847 691 8271 --~--~-~--~~~---~--~~ 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 unsubs

inline model's choices field empty in admin

2009-06-02 Thread ryan
When I edit a User in the admin, the sales_team and user_class dropdowns are empty. If anyone can point out my error or point me to the django core code that ignores the choices, I would greatly appreciate it. #models.py SALES_TEAM_CHOICES = enumerate(('CLS','CCS','TPS')) USER_CLASS_CHOICES =

Re: inline model's choices field empty in admin

2009-06-02 Thread ryan
) user_class = models.IntegerField(choices=USER_CLASS_CHOICES) last_name = models.CharField(max_length=40) first_name = models.CharField(max_length=30) This behavior is not mentioned as a caveat in http://docs.djangoproject.com/en/dev/ref/models/fields/#choices ryan On Jun 2, 11:22 am

Re: inline model's choices field empty in admin

2009-06-02 Thread ryan
Thank you sir. I got this from "Python Web Dev. w/ Django". An unforseen side effect. ryan On Jun 2, 12:05 pm, Daniel Roseman <roseman.dan...@googlemail.com> wrote: > On Jun 2, 4:53 pm, ryan <writepyt...@gmail.com> wrote: > > > This additional model, which

__all__in instead of __in

2009-06-04 Thread ryan
= models.ManyToManyField(Station, blank=True, null=True) >>> from myapp.models import Station, Order >>> from django.contrib.auth.models import User >>> u = User.objects.get(username__exact='ryan') >>> user_stations = u.get_profile().station.all().values_list('pk', flat=True)

Re: __all__in instead of __in

2009-06-04 Thread ryan
answering my own question, seems like: Order.objects.filter(Q(station=1), Q(station=2), Q(station=3)) -ryan On Jun 4, 2:29 pm, ryan <writepyt...@gmail.com> wrote: > #models.py > class Station(models.Model): >     station_name = models.CharField(max_length=20) > > cla

Re: __all__in instead of __in

2009-06-04 Thread ryan
) terrestrial_active_orders = all_terrestrial_active_orders.exclude (station__in=excluded_terrestrial_stations) On Jun 4, 3:05 pm, ryan <writepyt...@gmail.com> wrote: > answering my own question, seems like: > > Order.objects.filter(Q(station=1), Q(station=2), Q(station=3)) > > -ry

upload_to ignored outside of admin?

2009-06-23 Thread ryan
class Creative(models.Model): creative = models.FileField(upload_to='creative') element = models.ForeignKey(Element) #views.py(1) attachment = request.FILES[attachment_num] element.creative_set.create(creative=attachment) #views.py(2) attachment = request.FILES[attachment_num]

model subclasses

2009-06-26 Thread ryan
Let's say I have a Polygon model class Polygon(Models.model): side_length = models.IntegerField() Depending on the view I'm in, I want to calculate the perimeter of the polygons as a square, or as a triangle (or anything other polygon). What I'd like to do is somehow create a subclass of

differences in seek method for TemporaryUploadedFile & InMemoryUploadedFile

2009-07-20 Thread ryan
In the following code, the second loop of "for row in csv_reader:" is empty when dealing with an InMemoryUploadedFile object. Setting FILE_UPLOAD_MAX_MEMORY_SIZE equal to zero forces the use of a TemporaryUploadedFile object and solves the problem. It seems that seek(0) doesn't work with an

Re: differences in seek method for TemporaryUploadedFile & InMemoryUploadedFile

2009-07-20 Thread ryan
answering my own question, i think this has something to do with an exhausted iterator -ryan On Jul 20, 12:39 pm, ryan <writepyt...@gmail.com> wrote: > In the following code, the second loop of "for row in csv_reader:" is > empty when dealing with an InMemoryUploade

Handling IntegrityError on transaction middleware commit

2009-11-27 Thread Ryan
I had an IntegrityError come up on transaction commit (using postgres) today on a production site -- trying to insert an invalid foreign key value (an admin deleted something she shouldn't have). The problem was that instead of emailing me the exception like usual, django logged the exception to

Canberra developers

2008-05-19 Thread Ryan
I live in Canberra, Australia and I'm putting together a web start-up, hopefully using the Django framework. Does anyone know of any competent Django developers, or at least Python coders, in my neck of the woods? --~--~-~--~~~---~--~~ You received this message

Location of non-app-specific static files?

2012-11-03 Thread Ryan
the templates directory at this level. Does any one have any input on this? Thanks, Ryan -- 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/-/4H39KqmnTug

Re: Location of non-app-specific static files?

2012-11-05 Thread Ryan
That is not a bad idea as everything that is project specific, but not app specific, would live in one place. Thanks, Ryan On Sunday, 4 November 2012 15:14:43 UTC, Xavier Ordoquy wrote: > > Hi, > > One thing I've seen - and adopted - is to have one application that > contains t

Editing .po files for RTL languages

2012-01-23 Thread Ryan
I'm needing to translate several Django sites/apps into arabic (a Right-To-Left language) and I'm having difficulty editing the .po files when the message to translate contains Left-To-Right variables or HTML markup. Whether I'm using TextMate, TextWrangler or poedit, if I'm editing a translation

South African Django Developers

2011-05-04 Thread Ryan
Are there any Django developers in Johannesburg, South Africa? If so, who can I get in touch with? Thanks. -- 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 admin and jQuery select filtering

2011-05-27 Thread Ryan
this more dynamic so the same code could be used for most (if not all) forms? Any help would be greatly appreciated. Many thanks, Ryan -- 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: choice_set.all()

2011-05-29 Thread Ryan
Can you post your model code please? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com.

Re: Form and ForeignKey Limiting

2011-05-29 Thread Ryan
Could you not change the queryset of the ModelChoiceField in the view? That way you will have access to the current user from request.user. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Auditing Record Changes in All Admin Tables

2011-05-29 Thread Ryan
This will show you how to achieve this in the django admin: https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.save_model -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Django dynamic form simple Example

2011-05-29 Thread Ryan
t<http://code.google.com/p/django-dynamic-formset/>jQuery plugin in order to allow the user to add or remove more forms dynamically. Hope this helps, Ryan -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Form and ForeignKey Limiting

2011-05-29 Thread Ryan
/#django.contrib.admin.ModelAdmin.save_model. Just make sure you set editable=False in your model definition for manager in the Task model. Ryan -- 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: custom User class

2011-05-29 Thread Ryan
If all you want to do is store additional information about your users, the recommended way to do this is to use a user profile: https://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users Ryan -- You received this message because you are subscribed

Re: Form and ForeignKey Limiting

2011-05-29 Thread Ryan
queryset when you create the form instance in your view. Ryan -- 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-user

Re: Django - UserProfile m2m field in admin - error

2011-05-29 Thread Ryan
I can confirm that I get the same error. I wonder if it is anything to do with the two different forms auth uses for user creation and change? On a side note, how did you get your code so nicely formatted? Ryan -- You received this message because you are subscribed to the Google Groups

Re: Auditing Record Changes in All Admin Tables

2011-05-31 Thread Ryan
That code is supposed to go in the models admin definition like so: admin.py: -- class AuditAdmin(admin.ModelAdmin): def save_model(self, request, obj, form, change): obj.user = request.user obj.save() Ryan -- You received this message

Re: Auditing Record Changes in All Admin Tables

2011-06-01 Thread Ryan
: obj.updated_by = request.user else: obj.created_by = request.user obj.save() class Entity1Admin(AuditAdmin): pass admin.site.register(Entity1, Entity1Admin) Hope that helps, Ryan -- You received this message because you are subscribed to the Google

Re: Auditing Record Changes in All Admin Tables

2011-06-01 Thread Ryan
That bit is the easy bit :p Just change request.user to request.user.username Ryan -- 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/-/RXpUd1

column cannot be null

2011-06-01 Thread Ryan
blank = True means that a django form will not require a value, but the database still does so it's expected that you provide a value elsewhere. In order to allow a null entry into the database, you will need to add null = True to that definition aswell Hope this helps, Ryan -- You received

Re: Auditing Record Changes in All Admin Tables

2011-06-01 Thread Ryan
No problem. One final piece of advice would be to move the readonly_fields out of Entity1Admin and into AuditAdmin. That way you only have to define it once and inherit from it as with all the other options rather than re-defining it for each new model. Ryan -- You received this message

Re: confused over use of XYZ.objects.get() method

2011-06-04 Thread Ryan
are trying to span a relationship. So these two should actually be question__id and assessment__id. However the line above that with question = question and assessment = assessment should work fine when you have a question that is actually in the database. Hope that helps you, Ryan -- You

Re: ManyToManyField limit_choices_to that instance via Django admin.

2011-06-07 Thread Ryan
This is possible, but I'm not sure if you could do it via limit_choices_to. The admin docs shows how to accomplish this here: https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.formfield_for_manytomany Ryan -- You received this message because you

Re: VERY cheap django hosting?

2011-06-11 Thread Ryan
Do you know how their python is provided? mod_python? mod_wsgi? fgci? Thanks, Ryan -- 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/-/6KIjlspcjIw

Strange cookie error, only for some IE users?

2010-10-21 Thread Ryan
At a client site, I have occasionally had her customers complain that they get cookie errors when they try to log in, even though they have cookies enabled and they are able to log in to other sites. Clearing out their cookies doesn't seem to help. Most (95-99%) users can log in fine. The

Re: Strange cookie error, only for some IE users?

2010-10-21 Thread Ryan
Solved my own problem. User's clocks were set ahead so the Internet Explorer (pinnacle of stupid design) expired the cookie instantly. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

How to set individual cache items so they don't timeout?

2010-11-24 Thread Ryan
go about caching an item so it doesn't timeout if I don't want to set the default timeout to zero? Thanks, Ryan -- 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 u

Re: How to set individual cache items so they don't timeout?

2010-11-24 Thread Ryan
tting enables a thin wrapper around Django’s memcached (or locmem) cache class that allows cache times of “0”, which memcached interprets as “forever” and locmem is patched to see as forever." Ryan On Nov 24, 2:02 am, Ryan <rfug...@gmail.com> wrote: > I found this thread about how a timeo

override TabularInline get_formset - need to call super method?

2010-05-07 Thread ryan
Hi I'm trying to change the extra value based on a related object's attribute. The relevant bit of code starts with: ## begin alterations This way of doing it works, but should I be calling super() at the end? if so, why? I've been reading up on super a lot.

Re: override TabularInline get_formset - need to call super method?

2010-05-07 Thread ryan
would this be preferable? from admin.py class HDChannelInline(admin.TabularInline): model = HDChannel extra = 0 template = 'admin/edit_inline/tabular.html' def

Re: Ajax header not sent in all browsers

2010-06-09 Thread Ryan
If you simplify things down to something like the snippets below, does the alert display 'Said it was NOT ajax' for you? It shouldn't (and doesn't for me). Also, do you have the Tamper Data Firefox add-on installed to validate the headers being sent in? That could help narrow things down.

select_related removes broken Foreign Keys, but How?

2010-06-16 Thread ryan
I noticed this first in the Django Admin. If you have 100 rows in Table A, and 5 of those have a foreign key entry pointing to a nonexistent item in Table B, rather than throwing an error, the admin displays 95. This happens if you set list_select_related = True, or if one of the list_display

Proxy model ContentType question

2010-02-17 Thread Ryan
In django/contrib/contenttypes/models.py (get_for_model), I noticed that for a proxy model object, the contenttype being returned is of the base concrete class since it sets opts to the _meta of proxy_for_model . If one uses a generic relation in the admin app, you can set the generic contenttype

Re: Proxy model ContentType question

2010-02-19 Thread Ryan
wrapped the ContentType get_by_natural_key call). I'm wondering what other implications there are if I continue to use the get_by_natural_key as a way to get the proxy content type. On Feb 16, 10:05 pm, Ryan <ryanka...@gmail.com> wrote: > In django/contrib/contenttypes/models.py (get_for_

Negative numbers comparison bug(?)

2007-04-10 Thread Ryan
between syntax or if it's Django? If it helps, the values are floats (decimal 5,2). Could anyone please help me? Thanks in advance, Ryan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&q

Re: Is there any way to custom group models in the admin panel?

2007-07-12 Thread Ryan
I am interested in this as well. I've searched for a way to organize models in the admin panel but I haven't found anything. It seems illogical to create multiple apps simply for the fact to separate them in the admin panel. --~--~-~--~~~---~--~~ You received

migrate command fails with foreign key to user model

2014-04-28 Thread Ryan
I have used django in the past, but not for some time. So the changes surrounding the user models are new to me. I downloaded v1.7b2 and proceeded to start a new development I am planning. However I came across a problem when trying to run migrate after generating the migrations on an app

Re: migrate command fails with foreign key to user model

2014-04-29 Thread Ryan
; > Le lundi 28 avril 2014 04:54:32 UTC-4, Ryan a écrit : >> >> I have used django in the past, but not for some time. So the changes >> surrounding the user models are new to me. I downloaded v1.7b2 and >> proceeded to start a new development I am planning. Howeve

Re: Django processes under Apache

2009-02-22 Thread Ryan Kelly
uot;daemonic" so they're cleaned up automatically when Django exits. Cheers, Ryan -- Ryan Kelly http://www.rfk.id.au | This message is digitally signed. Please visit r...@rfk.id.au| http://www.rfk.id.au/ramblings/gpg/ for details signature.asc Description: This is a digitally signed message part

model inheritance without a new database table

2009-02-22 Thread Ryan Kelly
, but figured there must be a better way :-) So, is there a way to have a model subclass avoid the creation of a new database table,and just take its data straight out of the table for its superclass? Thanks, Ryan -- Ryan Kelly http://www.rfk.id.au | This message is digitally signed. Please

Re: model inheritance without a new database table

2009-02-22 Thread Ryan Kelly
e if I can help out on the ticket at all. Cheers, Ryan -- Ryan Kelly http://www.rfk.id.au | This message is digitally signed. Please visit r...@rfk.id.au| http://www.rfk.id.au/ramblings/gpg/ for details signature.asc Description: This is a digitally signed message part

Re: model inheritance without a new database table

2009-02-24 Thread Ryan Kelly
inheritance by default. In the meantime, I hope some other people might find this trick useful. Cheers, Ryan -- Ryan Kelly http://www.rfk.id.au | This message is digitally signed. Please visit r...@rfk.id.au| http://www.rfk.id.au/ramblings/gpg/ for details signature.as

Re: model inheritance without a new database table

2009-02-24 Thread Ryan Kelly
manually created) database table. My current patch uses "virtual", so I can do the following: def MyUser(auth.models.User): class Meta: virtual = True def an_extra_method(self): print "hooray!" What do you think? I intend to pre

Re: model inheritance without a new database table

2009-02-24 Thread Ryan Kelly
t it and come > up with a name later on, unless a better option appears beforehand. Originally I named it "use_superclass_table" but decided that was just too ugly to deal with. "interface_only"? Glad not to be the one stuck making that decision :-) Thanks for a

Re: model inheritance without a new database table

2009-02-25 Thread Ryan Kelly
Thanks again for your feedback on this Malcolm, I've created the following ticket in Trac: Proxy models: subclass a model without creating a new table http://code.djangoproject.com/ticket/10356 Cheers, Ryan -- Ryan Kelly http://www.rfk.id.au | This message is digitally

Re: Browser Testing - Selenium or Windmill

2009-02-28 Thread Ryan Kelly
Windmill - probably because the latter is a younger project. In the end I went with Windmill because it seemed to fit my development/thinking style better than Selenium - so of course your mileage may vary. Cheers, Ryan -- Ryan Kelly http://www.rfk.id.au | This message is digitally signed. Plea

Distinct rows by a column field?

2007-08-01 Thread Ryan K
distinct method does not accept a column argument (why?)? Is there a cleaner way to do this? Thanks, Ryan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

'dict' object has no attribute 'rindex'

2007-08-16 Thread Ryan K
I am using Django 0.96 and I am getting this error. Any ideas as to why? Thanks, Ryan --~--~-~--~~~---~--~~ 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: 'dict' object has no attribute 'rindex'

2007-08-16 Thread Ryan K
Sorry about that. I figured out what the problem was. It seems like that usually happens AFTER I post to a newsgroup. Anyway, thanks! On Aug 16, 12:19 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 8/16/07, Ryan K <[EMAIL PROTECTED]> wrote: > > > I am

Extra_context for 404 pages?

2007-09-10 Thread Ryan K
Hi. I have certain settings about the locations of static files (like CSS files) that I need to pass to the 404 page so it can render properly. How do I go about doing this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: SOMETIMES mod_python error

2007-09-11 Thread Ryan K
Have you tried restarting the web server? Arnold Chen wrote: > Dear all, > > I am experiencing some situation that is very strange. the development > site is http://alberta.design97.com > > This site is django-powered, it is up sometimes, on some computers, > you can visit this site for a

404 Page Help

2007-09-11 Thread Ryan K
Hi. All URLs in my templates are preceded by variables I added to the settings file so I could easily deploy my site on many different URLs, this includes CSS file URLs. When the custom error 404 page comes up, there is obviously no style because I can't pass the setting to it. Is there a way to

Only Simplified Chinese translation not working?

2007-09-11 Thread Ryan K
')), ('zh-cn', ugettext('Simplified Chinese')), ) And the .po and .mo files are under the zh-cn directory (in locale). The user can set his or her language setting by using the URL http://www.example.com/languages/setlang?language=zh-cn. Is the language code correct? Thanks, Ryan

Ordering of admin form fields when using edit_line?

2007-09-11 Thread Ryan Shaw
Hello, I have an admin form with two edit_inline sections. I would like to be able to specify the order in which they appear. How can I do this? Thanks, Ryan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: 404 Page Help

2007-09-11 Thread Ryan K
(t.render(RequestContext(request, custom_dict))) That code works but it seems ugly. I have a feeling I am managing my static media incorrectly. On Sep 11, 7:17 pm, jake elliott <[EMAIL PROTECTED]> wrote: > hi ryan, > > how about a context processor? > > http://www.djangoproj

Re: 404 Page Help

2007-09-12 Thread Ryan K
Ok...so how do I pass my 'site_context' dictionary (which is just a dict with URL prefixes in it for static media) to the default 404 handler? On Sep 12, 4:24 am, Collin Grady <[EMAIL PROTECTED]> wrote: > You don't need a custom 404 handler in order to use RequestContext - > the default handler

Re: 404 Page Help

2007-09-12 Thread Ryan K
Ok...nevermind. Jake is righttemplate context processors are my friend. Thanks! On Sep 12, 10:06 am, Ryan K <[EMAIL PROTECTED]> wrote: > Ok...so how do I pass my 'site_context' dictionary (which is just a > dict with URL prefixes in it for static media) to the default 4

Re: Only Simplified Chinese translation not working?

2007-09-12 Thread Ryan K
Anyone? I have the site translated and working in Spanish, French, Italian and Russian yet simplified Chinese does not work. Any clues? This is my first attempt at internationalization. On Sep 11, 10:11 pm, Ryan K <[EMAIL PROTECTED]> wrote: > Hi. I have a few languages I've translate

Re: Only Simplified Chinese translation not working?

2007-09-13 Thread Ryan K
Yesafter checking the Django sources I saw that zh_CN is where the .po .mo files should go. On Sep 13, 10:02 am, Nis Jørgensen <[EMAIL PROTECTED]> wrote: > Ryan K skrev:> Hi. I have a few languages I've translated my site into. They > all work > > except Simplifi

Re: Only Simplified Chinese translation not working?

2007-09-13 Thread Ryan K
You are correct Nis...in django.utils.translation.trans_real.to_locale. No idea why the two need be any different... On Sep 13, 10:02 am, Nis Jørgensen <[EMAIL PROTECTED]> wrote: > Ryan K skrev:> Hi. I have a few languages I've translated my site into. They > all work > &

Strange error from get_and_delete_messages?

2007-09-18 Thread Ryan K
rs.py", line 17, in auth return { AttributeError: 'tuple' object has no attribute 'get_and_delete_messages' I have Psyco enableddo you suspect this is what is causing the problem? Thanks, Ryan --~--~-~--~~~---~--~~ You received this message because

View didn't return an HttpResponse object?

2007-09-25 Thread Ryan K
from django.http import HttpResponse, Http404 from django.template import RequestContext from django.shortcuts import render_to_response def verify_sl(request): if request.method == 'GET': if not request.GET.get('avatarkey',''): raise Http404 elif

Re: View didn't return an HttpResponse object?

2007-09-25 Thread Ryan K
Ok thank you! I've taken care of the superfluous code and thought it was something silly I was missing. Thanks! On Sep 25, 11:25 am, Tim Chase <[EMAIL PROTECTED]> wrote: > > if not request.GET.get('avatarkey',''): > > raise Http404 > > elif

Re: Check if user is a member of group in template

2007-10-09 Thread Ryan Kanno
I think you're looking for something like this: http://www.djangosnippets.org/snippets/282/ On Oct 9, 3:22 am, äL <[EMAIL PROTECTED]> wrote: > Inhttp://code.djangoproject.com/wiki/CookBookRequiredGroupLoginI > found how > to show a template only if the user is in a specific group (admin). > >

Help understanding the DB API

2007-10-25 Thread Ryan K
For example, I have to basic models: class User(models.Model): name = models.CharField(max_length=30) class AlterEgo(models.Model): nickname = models.CharField(max_length=30) user = models.ForeignKey(User) I do a lookup for a User named 'Ryan' and one object is found

Help understanding the DB API

2007-10-25 Thread Ryan K
For example, I have to basic models: class User(models.Model): name = models.CharField(max_length=30) class AlterEgo(models.Model): nickname = models.CharField(max_length=30) user = models.ForeignKey(User) I do a lookup for a User named 'Ryan' and one object is found

Re: Help understanding the DB API

2007-10-25 Thread Ryan K
Perfect! Thanks. On Oct 25, 2:20 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > On 10/25/07, Ryan K <[EMAIL PROTECTED]> wrote: > > > Why can't I change the User's name like so: > > > results[0].user.name = 'Brian' > > results[0].user.save(

Server error/Template Context processors

2007-11-06 Thread Ryan K
s. But when a 500 error occurs, the 'static_prefix' (as well as 'link_prefix') settings aren't making it to the template and style sheets are applied. 404 errors are fine. Any reason for this? Thanks, Ryan --~--~-~--~~~---~--~~ You received this message because you are subscribed

Server error/Template Context processors

2007-11-06 Thread Ryan K
s. But when a 500 error occurs, the 'static_prefix' (as well as 'link_prefix') settings aren't making it to the template and style sheets are applied. 404 errors are fine. Any reason for this? Thanks, Ryan --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Syncing two django applications via cURL

2008-11-13 Thread Ryan Nowakowski
. http://www.python.org/doc/2.5.2/lib/httplib-examples.html - Ryan On Thu, Nov 13, 2008 at 10:13:25AM -0800, Kurczak wrote: > > Hello everyone, > I've got this unusual problem - I've got few django sites, and I need > to synchronize Users and profiles between them. (it's a closed

Re: FastCGI and Django as a continuously running server

2008-11-13 Thread Ryan Nowakowski
On Wed, Nov 05, 2008 at 11:21:14AM -0800, russellneufeld wrote: > The one thing left that I'd like to do is set up Django to run > continuously, even when there are no http requests. My application > runs a bunch of periodic background tasks in addition to serving up > web content, and it

Re: How to create a form with dynamic number of fields?

2008-11-16 Thread Ryan Witt
if this is a bit thick and I'll be happy to explain it and perhaps blog a more coherent example. --Ryan --~--~-~--~~~---~--~~ 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: How to create a form with dynamic number of fields?

2008-11-16 Thread Ryan Witt
if this is a bit thick and I'll be happy to explain it and perhaps blog a more coherent example. --Ryan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Error when I run db commands without manage.py

2008-07-10 Thread Ryan Nowakowski
ass, type, or tuple of classes and types Running it using manage.py shell works fine. Doing a... print Card.objects.all() ...works fine either way. I've set my sys.path and DJANGO_SETTINGS_MODULE correctly. Ideas? Thanks, Ryan --~--~-~--~~~---~--~~ You rec

Re: [SOLVED] Error when I run db commands without manage.py

2008-07-10 Thread Ryan Nowakowski
On Thu, Jul 10, 2008 at 04:07:47PM -0500, Ryan Nowakowski wrote: > > Hey Folks, > > I'm using trunk. When I run this using python (without manage.py)... > > card = Card(serial='0749FT266F') > > ...I get this error: > > Traceback (most recent call last): &g

Possible bug with DateTimeFields and admin site

2009-03-18 Thread Ryan Duffield
t;html_name" -- in the case outlined above, both fields have html_name's of "start_date". Is this a bug? Cheers, Ryan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To pos

submit logins over SSL

2009-03-26 Thread Ryan Kelly
and simply ignores them. Does anyone have advice for setting up this little redirect dance? Or is Django trying to steer me towards a better way of securing logins that I'm just not aware of? Thanks, Ryan -- Ryan Kelly http://www.rfk.id.au | This message is digitally signed. Please

Re: Sending large, generated files

2009-04-14 Thread Ryan Kelly
) before processing any of the response body - my understanding is that this should cause the headers to be sent immediately. Have you tried this under mod_wsgi? Cheers, Ryan -- Ryan Kelly http://www.rfk.id.au | This message is digitally signed. Please visit r...@rfk.id.au|

Re: Sending large, generated files

2009-04-14 Thread Ryan Kelly
_response from sending the headers. Nevertheless, I'd be interested to hear if different deployment options affect the behaviour of your examples. Cheers, Ryan -- Ryan Kelly http://www.rfk.id.au | This message is digitally signed. Please visit r...@rfk.id.au| http://www.rfk.id.au/

  1   2   3   4   5   6   >