mes Bennett <ubern...@gmail.com
> > wrote:
>
>> The auth context processor provides it, but not as a variable named
>> 'user'; instead it's attached to the 'request' variable, so what you want
>> is '{% if request.user.is_authenticated }}'.
>>
>> On Fr
Hi
Using Django 1.10
In my templates there is no user object to provide user.is_authenticated
Is there something I have to do to turn this on?
My settings has this
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
Erk!
My own fault unfortunately, apologies for the noise
Some files had gotten left in a migration folder in an app; causing all
sorts of confusion evidently
All well now...
On Fri, 17 Apr 2015 13:51:08 +0100
Drew Ferguson <d...@afccommercial.co.uk> wrote:
> Hi
>
> Trying
ngo running fine but it always wanted an
"id" field to exist in tables even though there was another field had
"primary_key=True" set
Is there some trick I am missing or maybe I should not be using 1.8 just
yet
--
Drew Ferguson
--
You received this message because you
Hi Avraham
Thanks for the heads-up
On Wed, 13 Aug 2014 11:25:09 +0300
Avraham Serour <tovm...@gmail.com> wrote:
> just remember to change the headers of the response to reflect that you
> are serving a css file and not html
>
>
> On Wed, Aug 13, 2014 at 3:37
where file_path is path to the file
>
> both
> requestGET["file_path"] and
> request.get_full_path()
>
> ignore #1/test.txt part, how can i fix this? Is there some other way to
> get full url?
>
--
Drew Ferguson
--
You received this message because you
;bleedin' obvious" is hard to see
Thanks
> ATOM, XML and JSON in templates). Or you could have multiple CSS files
> and just pick the one you want to use when you render the link to the
> CSS in your HTML pages.
>
> François
>
> On Aug 12, 2014, at 7:37 PM, Drew
Hi
Is there any documentation describing possible ways of having dynamic CSS
in a site?
For example, having a CSS colour scheme set from a database query or
setting a site logo URL from a database query
Ta
--
Drew Ferguson
--
You received this message because you are subscribed to the Google
the amount of memory required,
> but I'm pretty sure this script isn't consuming much memory. Even when
> it's not running ls, it's just doing a subprocess call to gpg to sign
> and encrypt a file. It takes well under one second.
>
> Thanks for looking at it.
> Shawn
>
--
Hi
This seems a very complicated solution to a fairly basic problem unless I
am missing something
> On Feb 7, 2014 2:24 AM, "fborell" wrote:
>
> > I need to create a second application in the admin section that ports
> > to the first applications model. The second
t; mysql> SHOW DATABASES;
>
> ++
>
> | Database |
>
> ++
>
> | information_schema |
>
> | django_1 |
>
> | mysql |
>
> | performance_schema |
>
> | test |
>
> +
--
> > 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...@googlegroups.com.
> > To post to this group
Hi
Django 1.5
I have a model which includes a ForeignKey field defined likes this
class Document(models.Model):
name = models.CharField(max_length=25, unique=True,
null=False,blank=False)
target = models.CharField(max_length=12,
choices=TARGETS,default='report')
content
r id)
> /mylibrary/book/32/addnewbook
>
> 2) how do I extract the slug within my BookNew (derived from CreateNew)?
> url(r'^book/(?P\d+)/addnewbook, BookNew.as_view()),
>
> seems not avaliable as in the context/template: {{ slug }}
>
> Cheers,
> Giulio.
>
reprocessors:
> https://docs.djangoproject.com/en/1.5/ref/settings/#template-context-processors
>
> On 12/2/13, Drew Ferguson <d...@afccommercial.co.uk> wrote:
> > Hi
> >
> > I am not really sure how to ask the Django docs what I want to do for
> > this Could s
lumn but independent of view classes
Do I have to add a function call to all CBV contexts to tabulate the data
I want to list or is there a better way?
Thanks
--
Drew Ferguson
AFC Commercial
http://www.afccommercial.co.uk
signature.asc
Description: PGP signature
of 30 items you needed.
This way the ORM & Django SQL access is reduced to a single query on the
view. The heavy lifting is all done server-side as comments/articles are
saved
Could this work?
--
Drew Ferguson
--
You received this message because you are subscribed to the Google Groups
&quo
ub.com/django/django/blob/1.6b2/django/views/generic/edit.py#L22
> )
>
>
> `get_initial` should return a dict, and you should use:
>
> {
> 'name_of_the_model_field': self.kwargs["iid"]
> }
>
>
> On Sun, Sep 1, 2013 at 6:37 PM, Drew Ferguson
>
Hi
I have gotten myself badly confused today trying to figure this out.
If I have these elements
# urls.py
url(r'^banker/(?P\d+)/iac$', view = IacCreateView.as_view())
# views.py
class IacCreateView(LoginRequiredMixin, CreateView):
template_name = 'iaccount_form.html'
model = Iaccount
Phew!
Thanks for clearing that up
On Wed, 14 Aug 2013 17:29:59 -0400
Bill Freeman <ke1g...@gmail.com> wrote:
> I believe that GENERIC views that ARE NOT CBVs are deprecated (or maybe
> even gone in the latest).
>
>
> On Wed, Aug 14, 2013 at 5:23 PM, Drew Ferguson
> &
Hi
Did someone here recently say CBVs are now or will be deprecated?
Or did I imagine that because I was on holiday?
--
Drew Ferguson
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiv
n
> that invokes the tests:
>
> export DISPLAY=:0.0
> xhost +
>
> But that seems to have had no effect at all. This question seems to
> have been asked a lot, but none of the answers I saw on SO or other
> sites worked for me (none of them were using django).
>
>
e table instead? Then
you can reset the sequence with this...
TRUNCATE mytable RESTART IDENTITY
http://www.postgresql.org/docs/9.1/interactive/sql-truncate.html
--
Drew Ferguson
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from t
On Mon, 5 Aug 2013 03:41:49 -0700 (PDT)
cui ye <darwi...@gmail.com> wrote:
> As title.
>
http://stackoverflow.com/questions/433162/can-i-access-constants-in-settings-py-from-templates-in-django
Gives has an extensive answer with several alternatives
--
Drew Ferguson
--
give custom names to the columns in the
> table So, as to not get the Missing column error in Java.
>
> Any help would be really appreciated.
>
--
Drew Ferguson
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsu
s
> to be the best of the options.
>
> Django core doesn't deal with teh cbv/formset problem very well (yet)
> - there are ways they can be mangled, but it's code heavy.
> django-extra-views is relatively simple by comparison.
>
> cheers
> L.
>
> On 2 August 2013 22:28, Drew F
Hi
I am having trouble locating documentation illustrating use of formsets
with CBVs. Can someone point me at a page please?
Issue #17700 in the tracker has been closed suggesting there is something
somewhere
--
Drew Ferguson
--
You received this message because you are subscribed
On Mon, 8 Jul 2013 14:46:25 -0700 (PDT)
"Yves S. Garret" <yoursurrogate...@gmail.com> wrote:
> On Monday, July 8, 2013 5:18:21 PM UTC-4, Drew Ferguson wrote:
> >
> > Yo
> >
> > You have 2 versions of python installed:
> >
> > * python 2.
entire django install steps and when I fired up
> > my Python shell
> > (python 2.7.5, to be exact) and did import django, this is what I got:
> >
> > >>> import django
> > Traceback (most recent call last):
> > File "", line 1, in
> > Im
)
> > DATE_INPUT_FORMAT = ['%d/%m/%Y','%m/%d/%Y']
> > class ReportDateTimeForm(forms.ModelForm):
> > manual_date = forms.DateField(input_formats = DATE_INPUT_FORMAT,
> > widget=forms.DateInput(format = '%d/%m/%Y'))
> > class SettingsForm(forms.M
So either
your script needs to run in response to a request on django when the
domain can be retained; this could be achieved through some configuration
page that saves the url in the database which your script can then
reference
or
you provide the script with the url from a configuration file or
someth
IDDLEWARE_CLASSES[index+1:])
> >>
> >> EXTERNAL_AUTH is used at different locations in my application, for
> >> example I use it to decide whether or not
> >> I display the "change password" link.
> >>
> >> When I start testing, toggling EX
ctionary out of that.
>
> Should I be approaching this from a different angle? Is there a nice
> Django way of making these comparisons and counts?
>
> Thank you,
>
> -Matt
>
--
Drew Ferguson
signature.asc
Description: PGP signature
here is a syntax error probably very
close to line 104
Possibly the closing bracket ")" of the previous tuple has been removed
accidentally or something similar
--
Drew Ferguson
--
You received this message because you are subscribed to the Google Groups
"Django users"
edpremises = [] %}
> {% for premises in object_list %}
> {% if premises.in_use %}
> {{ premises.name }} Update
>
> {% else unusedpremises.add(premises) %}
> {% endif %}
> {% endfor %}
>
> Unused Premises
>
> {% for premises in unusedpremises %}
> {{ premises.nam
1.5/ref/models/options/#table-names
>
>
> On Sun, May 26, 2013 at 5:51 AM, Drew Ferguson
> <d...@afccommercial.co.uk>wrote:
>
> > On Sun, 26 May 2013 05:23:08 +0530
> > Kakar Arunachal Service <kakararunachalserv...@gmail.com> wrote:
> >
> > &
Is this what you are looking for?
http://stackoverflow.com/questions/835069/which-sqlite-administration-console-do-you-recommend
On my Linux system, sqliteman gets the billing
"The best developer's and/or admin's GUI tool for Sqlite3 in the world"
someone thinks it is good. I wouldn't kno
se with some pre-data.
>
> So how I should proceed with unit testing with database like that, since
> some operations rely heavily that there really exists all that
> trigger-function mess in the database? So that I don't need everytime to
> start from the scratch but from some known stat
wrote:
> On Thu, Apr 11, 2013 at 1:50 PM, Drew Ferguson
> <d...@afccommercial.co.uk> wrote:
> > On Thu, 11 Apr 2013 14:54:50 +0300
> > Avraham Serour <tovm...@gmail.com> wrote:
> >
> >> you can create a subdomain (static.yourdomain.com) and serve static
>
in
templates, etc AND life gets very complicated when trying to develop the
same site on a development system.
Is the recommendation really addressing a performance issue for high
traffic sites where Apache WSGI gets overloaded and becomes a bottleneck?
>
>
> On Thu, Apr 11, 2013 at 2
Hi
The docs recommend serving static data from a second web server rather
than the one serving via WSGI
How do folks implement this? I can't figure how to serve data for the
same domain using 2 web servers. Am I missing something?
--
Drew
signature.asc
Description: PGP signature
On Sun, 7 Apr 2013 18:15:32 -0700 (PDT)
frocco <faro...@gmail.com> wrote:
> Thanks Drew,
>
> I am trying your second suggestion.
>
> But it is complaining not found for UserProfile
>
> On Sunday, April 7, 2013 8:41:46 PM UTC-4, Drew Ferguson wrote:
> >
>
On Sun, 7 Apr 2013 17:01:52 -0700 (PDT)
frocco wrote:
> I have a model that references User and on the admin page, it shows the
> user name.
> I have the User tied to a UserProfile model that has a field called
> company.
>
> I want the drop down on my Pricing Model to show
On Wed, 13 Mar 2013 07:01:45 -0700 (PDT)
Ken wrote:
> I would like to write a tex/latex file with django tags in it. Load it
> with the template loader and render it with a context. The problem is
> that my tex/latex file has quite a few '{%' in them. They are
> conventional
44 matches
Mail list logo