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 in TeX for writi
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 company, not user.
>
On Sun, 7 Apr 2013 18:15:32 -0700 (PDT)
frocco 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
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
e 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:01 PM, Drew Ferguson
>
PM, Drew Ferguson
> wrote:
> > On Thu, 11 Apr 2013 14:54:50 +0300
> > Avraham Serour wrote:
> >
> >> you can create a subdomain (static.yourdomain.com) and serve static
> >> using that, configure the second webserver to serve this subdomain
> >
> &g
>
> 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 state of the db?
>
ooking 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 know
--
Drew Fergu
t;
>
> On Sun, May 26, 2013 at 5:51 AM, Drew Ferguson
> wrote:
>
> > On Sun, 26 May 2013 05:23:08 +0530
> > Kakar Arunachal Service wrote:
> >
> > > Hi, how to view the tables in pg admin for postgresql database, or in
> > > workbench for m
> {% 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.name }} Update
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" group.
To unsubsc
s were created where the cable_sets are
> all the same and their parent Bundle's length is the same. I figured I
> should attempt the simpler query first without the length, and add
> length later by iterating through the repeated_sets dictionary and
> querying for each cable_set'
x27;my.backends.LDAPUserMiddleware', ) +
> >> settings.MIDDLEWARE_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 passwor
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
something similar
But there is nothing in django that can be queried
> > context_instance=RequestContext(request))
> >
> > forms.py
> >
> > DATE_FORMAT = (
> > ('0', ' dd / mm / yyyy'),
> > ('1', 'mm / dd / '),)
> > DATE_INPUT_
on 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
> > ImportError: No module named django
> >
> > sudo py
On Mon, 8 Jul 2013 14:46:25 -0700 (PDT)
"Yves S. Garret" 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.6 installed probably in /usr/bin a
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 to 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 Fer
ames 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 unsubscribe from
On Mon, 5 Aug 2013 03:41:49 -0700 (PDT)
cui ye 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
--
You received this message because y
nce 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 this group and stop receiving ema
at 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).
>
> Anyone here run
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
Phew!
Thanks for clearing that up
On Wed, 14 Aug 2013 17:29:59 -0400
Bill Freeman 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
> wrote:
>
> >
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
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
> wrote:
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
"Django users"
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
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 wrote:
> Hi
>
> Trying to use a legacy database with Dja
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
s 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 Ferguson
> wrote:
>
>
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 are subscribed to the Google Groups
Hi Avraham
Thanks for the heads-up
On Wed, 13 Aug 2014 11:25:09 +0300
Avraham Serour 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 AM, Drew Ferguson
> wrote:
>
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
.djangoproject.com/en/1.5/ref/settings/#template-context-processors
>
> On 12/2/13, Drew Ferguson wrote:
> > Hi
> >
> > I am not really sure how to ask the Django docs what I want to do for
> > this Could someone point me at the docs please
> >
> > I h
rom the client browser.
>
> Now the questions are:
>
> 1) would you oranize the url in a way like this? (notice that 32 is
> the author id)
> /mylibrary/book/32/addnewbook
>
> 2) how do I extract the slug within my BookNew (derived from CreateNew)?
> url(r
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 =
> Thanks
> > Jim
> >
> > --
> > 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+uns
EATE DATABASE django_1;
>
> Query OK, 1 row affected (0.24 sec)
>
> mysql> SHOW DATABASES;
>
> ++
>
> | Database |
>
> ++
>
> | information_schema |
>
> | django_1 |
>
> | mysql
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 application's admin.py
> > wou
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
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': [],
'APP_DIRS':
Nov 25, 2016 at 3:23 PM, James Bennett > 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 }}
44 matches
Mail list logo