quirement as
subdomain.sponsor.url essentially duplicates the /year/slug/ part of the
path. There are other parts of our site that we could in future want to
associate with other sponsors in a similar manner, so the /year/slug/ must
go!
Thanks for helping me think this through,
--
R.
Richard B
visit
> https://groups.google.com/d/msgid/django-users/1789736.NRtqCP1Ze9%40fritzbook
> <https://groups.google.com/d/msgid/django-users/1789736.NRtqCP1Ze9%40fritzbook?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
quot; based on the http_host in the
request.
I'm wondering if this is a solved problem?
Thanks,
R.
On Mon, Jun 4, 2018 at 6:02 AM Melvyn Sopacua wrote:
> On zondag 3 juni 2018 22:45:31 CEST Richard Brockie wrote:
>
> > Any advice on how I can accomplish this? Any particular thin
Hi,
I’m wondering if it is possible to use a subdomain of a sponsor’s url as an
alias to a particular part of our Django site?
Our Django site has urls of the form: “site.url/year/slug/*” where “*”
represents a large set of child pages for various data reports and update
actions related to a
7;)
> combined = queryset.union(self.many_field2.order_by('some', 'fields'))
>
> Best,
> Simon
>
> [0] https://docs.djangoproject.com/en/1.11/ref/models/querysets/#union
>
> Le samedi 3 juin 2017 20:20:11 UTC-4, Richard Brockie a écrit :
>>
>>
Hi,
I am combining querysets of the same model in the following manner:
class ExampleModel(models.Model):
many_field1 = models.ManyToManyField('Model', related_name='name1')
many_field2 = models.ManyToManyField('Model', related_name='name2')
def combined_many_fields(self):
qs
at 4:49:51 PM UTC-8, Richard Brockie wrote:
>
> Hi,
>
> I have the following many2many relationship between 2 models:
>
> class RaceDay(models.Model):
> date = models.DateField()
> published = models.BooleanField(default=False)
>
> class Series(models.Model):
&
) \
.filter(year=this_year, published=True) \
.order_by('latest_raceday')
The filter here applies to the fields in the Series model.
How would I limit the aggregation to members of the many2many relation that
have RaceDay.published=True?
Thanks,
Richard Brockie
--
You receive
h the
larger than I would like file size.
On Thursday, May 19, 2016 at 8:18:17 AM UTC-7, Richard Brockie wrote:
>
> Hi,
>
> I'm working with pagination of a large formset in my view function. For
> forms outside the range to be viewed, I'm currently doing this:
&
test < range_min:
hidden_before.append("%s:%s" % (place_to_test, race_number))
elif place_to_test > range_max:
hidden_after.append("%s:%s" % (place_to_test, race_number))
I can't find how to remove the non-visible form from the formset
Hi,
I'm doing a lot of this type of looping in my templates (from the docs:
https://docs.djangoproject.com/en/1.9/ref/templates/builtins/#for):
{% for athlete in athlete_list %}
{{ athlete.name }}
{% endfor %}
In this context, I find myself occasionally wanting to refer to data of the
pr
pdateView. Any recommendations for how to proceed?
Thanks,
Richard Brockie
--
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+unsubscr...
Hi Carl,
Thanks for pointing this out - it's right there! I don't know how I missed
it...
Thanks again,
R.
On Mon, Aug 10, 2015 at 11:12 AM, Carl Meyer wrote:
> Hi Richard,
>
> On 08/01/2015 06:27 PM, Richard Brockie wrote:
> > Can someone please explain the implic
onfused with the overlapping
numbering before/after the squash so I would like to streamline things a
little. I'm ok to remove the first set of migrations 0001 to 0052 as they
are correctly captured by the first squash.
What are your recommendations in a case like this?
Thanks!
Richa
Following up - this did the trick. Thanks for the pointer.
R.
On Mon, Jan 19, 2015 at 10:40 AM, Richard Brockie
wrote:
> Thank you - that looks like what I am looking for! I don't know how I
> missed that.
>
> I'm on 1.6 right now - another reason to move to 1.7 :)
>
[3].add_error('field_name', 'error message')
>
>
> https://docs.djangoproject.com/en/dev/ref/forms/api/#django.forms.Form.add_error
>
> Collin
>
> On Saturday, January 17, 2015 at 10:46:27 PM UTC-5, Richard Brockie wrote:
>>
>> Hi everyone,
>>
Hi everyone,
In a formset I can use the .clean() method to validate data across the
formset. The formset.clean() method is run after all the form.clean()
methods - this makes sense. Raising a formset ValidationError alerts the
user to the problem with formset.non_form_errors.
I would like to a
y need to
> store a reference to the original race_number to decide if you need to
> .save() or not.
>
> Collin
>
> On Friday, January 2, 2015 9:42:47 PM UTC-5, Richard Brockie wrote:
>>
>> Hi Collin,
>>
>> Thanks very much for the advice. I'll be get
; .save() or not.
>
> Collin
>
> On Friday, January 2, 2015 9:42:47 PM UTC-5, Richard Brockie wrote:
>>
>> Hi Collin,
>>
>> Thanks very much for the advice. I'll be getting to this part of my
>> development in the next few days and will report back when I h
I'm using webfaction also - though still shared, they (and others) are
much, much better than commodity shared hosting.
Apart from the above, the reasons I chose webfaction:
1. Django support, plus:
2. php/MySQL for my existing codebase
R.
On Tuesday, January 6, 2015 5:44:40 AM UTC-8, B
Hi Jani,
That's a correct diagnosis. I knew Django was doing lazy loading, but
didn't fully understand the implications.
In my case I have a filtered and ordered queryset resulting in ~400
records. Upon processing in the template, each was prompting a database
visit 3 times when outputting inf
Hello again,
I'm to the point in my django development that I am beginning to use
realistic amounts of test data. I'm using postgresql as the database
server, with PyCharm as my IDE, everything in a virtualenv on an SSD on an
Ivy Bridge Core i7 processor with 16 GB of RAM running Windows 7 64-b
number to decide if you need to
> .save() or not.
>
> Collin
>
> On Friday, January 2, 2015 9:42:47 PM UTC-5, Richard Brockie wrote:
>>
>> Hi Collin,
>>
>> Thanks very much for the advice. I'll be getting to this part of my
>> development in the ne
if entry.pk and not entry.race_number:
> entry.delete()
> else:
> forms = [EntryForm(instance=e, prefix=e.category.pk) for e in
> entries]
> return render(request, 'template.html', {'athlete': athlete, 'forms':
>
Hi,
I have the following pseudo model that I will use as the basis of a
modelformset:
class Entry:
athlete = ForeignKey(athlete)
category = ForeignKey(category)
race_number = IntegerField
I have a page that displays each athlete's details so the choice of athlete
has already been m
return decorator1(kwarg2='testing')(view)
@triple_decorator()
def my_view...
Thanks very much!
R.
On Sun, Nov 30, 2014 at 11:48 AM, Arnold Krille
wrote:
> On Sun, 30 Nov 2014 10:30:29 -0800 Richard Brockie
> wrote:
> > I'm running into the situation
ecomes abstracted to something like this:
@my_custom_decorator_with_redirects()
def some_view...
--
R.
Richard Brockie
<http://www.ontheday.net/>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this gro
Hi,
I have a model along the lines below. I want to be able to define some urls
that have a related structure to provide different views of my model. It
would be nice to abstract the link generation using a class as these views
have wider application.
class MyModel(models.Model):
date = m
28 matches
Mail list logo