My personal preference is to just create a new model class with a ForeignKey
field pointing to the User model with unique=True set. That way you can extend
the User object in as many different apps as you want. For instance in a forum
app you could have a model tracking the number of posts a use
On 21 Aug 2011, at 19:37, Shawn Milochik wrote:
> Using a OneToOne field does the same thing as a FK with unique set to true,
> and simplifies queryset syntax.
Good point.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
Mac OS X (soon to switch to Arch Linux).
Vim and numerous plugins.
SQLite for local database testing during development
Virtualenv
Mercurial or Git (depends on whether the project is open source or not)
Navicat
South
Selenium
Firebug
--
You received this message because you are subscribed to the
Does anyone know of a source for previous Djangocon (both US and EU) videos
that allow you to download them in iTunes? So far I've only seen them available
on the schedule page of the EU Djangocon site and on Blip.tv. While I can
certainly watch them there I prefer to have them on my hard drive
On 27 Aug 2011, at 12:26, vikas ruhil wrote:
> A brief Description of system On i need help for memcached size:-
> 1)Cpu :- i7 intel , 16 Gb Ram , Internal SATA Hard-disk :640 Gb , External
> Hardisk :-10 Tb, Os :- Ubuntu-32bit
> 2)Cpu- i2 intel core2duo , 4Gb Ram, Internal SATA Hard-disk: 320
On 27 Aug 2011, at 04:44, Steven Elliott Jr wrote:
>> On Fri, 2011-08-26 at 15:07 +0100, Simon Connah wrote:
>>> Mercurial or Git (depends on whether the project is open source or not)
>
> Kenneth,
>
> I think he means whether or not the repository will be public
On 28 Aug 2011, at 04:41, Sam Walters wrote:
> Debug client-side:
> firebug, yslow, a windows computer with ie7
Rather than using a separate computer with IE 7 I tend to just spin up an
Amazon EC2 instance running Windows Server 2003 or Windows Server 2008 for a
couple of hours. It makes every
On 4 Sep 2011, at 11:25, Ludvig wrote:
> added a print statement after self.request.post == "POST" and it came
> out, so its a post.
You should use:
if request.method == 'POST':
instead. That is the correct method to determine whether a URL was requested
using the POST method.
--
You receiv
When writing a project in Django it is a common occurrence that there are some
small elements that must be shared between all applications in the project but
that do not fit within the context of any of the apps as it would break
encapsulation. I'm thinking about things such as terms and conditi
On 22/09/2011 19:50, DrBloodmoney wrote:
On Thu, Sep 22, 2011 at 12:30 PM, Micky Hulse wrote:
On Thu, Sep 22, 2011 at 8:54 AM, Simon Connah wrote:
So do you just tend to create a new misc app to hold all these little bits and
pieces or is there a convention for such things?
For a few
On 18 May 2011, at 10:14, Vincent den Boer wrote:
> On Monday 16 of May 2011 14:12:45 Alexander Schepanovski wrote:
>> Do you log django's stdout/stderr. You could do that with --outlog and
>> --outerr options of runfcgi command
>
> It's running with those options now. And I'm waiting for it to
On 19 May 2011, at 14:30, Ram wrote:
> hello everyone i am studying python for my college project in which i
> am sending some text and image in URL i want to store it to postgreSQL
> database i know how to read data from URL but not about images how can
> i perform it please help.
Don't.
Save t
On 19 May 2011, at 20:38, ramnivas indani wrote:
> ok thanks, is there any online tutorial for that from where i can learn about
> URI?
This is a good introduction to the subject:
http://en.wikipedia.org/wiki/Uniform_Resource_Identifier
Simon.
--
You received this message because you are su
On 23 May 2011, at 00:28, Evan Ingam wrote:
> I am trying to evaluate whether to go with Django SEO (http://django-
> seo.readthedocs.org/en/latest/contents.html) or to create my own by
> embedding the relevant meta data fields as values in the models. Doing
> a search across the threads, there ar
On 24 May 2011, at 12:34, Stuart MacKay wrote:
>
> The only problem you might come across is when updating source code from a
> repository is that any changes you make will be overwritten. So for example
> to use staticfiles with django 1.3 I had to rename directories in
> django-autocomplete s
On 20 May 2011, at 21:18, Kevin Monceaux wrote:
> On Fri, May 20, 2011 at 07:51:06AM -0400, Brian Bouterse wrote:
>
>> +1 for vim
>
> I'll second that motion. I've tried numerous other editors and keep
> sticking with vim for almost everything. I do use emacs for my e-mail
> editor, with Mutt
On 24 May 2011, at 18:49, AJ wrote:
> Simon,
>
> Can you please give details of plugins that you use for Python/Django in
> MacVim?
>
> Thanks,
> AJ
Sure.
I use this plugin collection:
https://github.com/carlhuda/janus
as well as this extra plugin:
http://www.vim.org/scripts/script.php?sc
On 24 May 2011, at 18:03, Nan wrote:
> I know this question has been asked before, but the most recent thread
> I can find in the archives is from 2007, and presumably the landscape
> has changed since then.
>
> I'm looking for a Webfaction-like host with servers in the UK. It
> needs to allow l
Vim has a "Command-T" plugin that is inspired from the Textmate functionality
and should work in the same manner (to an extent).
http://www.vim.org/scripts/script.php?script_id=3025
(I don't use this plugin myself though as I find NERDtree more than capable and
already has all the files in an e
On 31 May 2011, at 00:20, AJ wrote:
> If I can give my $0.02, the content can live anywhere, but how about at least
> a link to the content within the initial "setting up django environment'
> section?
>
> This way those who are just beginning programming and Django can know what do
> they nee
On 5 Jun 2011, at 16:11, Developr wrote:
> Hi!
>
> I'm currently developing for Django using the following the setup:
>
> Ubuntu 10.10
> PyCharm
> VirtualEnv
> Yolk
> Pip
>
> For testing I generally just use the inbuilt dev server that Django
> provides.
>
> For production I'm currently using
I've got most of Visual Studio Code configured for Django development
(I'm trying it out to see if I can ditch PyCharm and save some money)
and almost everything seems OK.
I set the Python path to be the one in the virtual environment, and if
Visual Studio Code needs to install any modules, they g
I know that the standard way to do this is to create a script tag with
a global JS variable in your Django template before you import your
other JS files but that won't work for my current situation.
I have an article detail view which is a single model instance. But I
also have a list of comment
})
>
> That way you don't need the global variable or the other click handler
>
> Finally, it's a bad idea to have multiple elements with the same ID (all
> comments will have a button with ID "like_comment_button") so it's better to
> add it as a class rath
I'm in the process of building a website in Django and need to make a
specific part of my application dynamic. Because of that I'd like to use
a JavaScript frontend framework to build this portion of the site.
I was wondering if anyone had any recommendations for which JavaScript
framework I s
Hi,
I have a bit of a problem with structuring a Django project. I have a
UserProfile app which stores extra information about users using a
OneToOneField to the Django auth user model.
I have a products app which has two models relating to two types of
products and finally I have a payments
Hi,
I want to make a blogging platform and have a question about organising the
project.
With my blog, I'll have the blog in one Django app and then have something like
a forum in another app, along with additional functions in other apps. Also,
I'd like to have a single-user system that uses
The error message is pretty obvious.
"You're using the staticfiles app without having set the STATIC_ROOT setting to
a filesystem path."
Set the STATIC_ROOT setting in settings.py.
https://docs.djangoproject.com/en/1.11/ref/settings/#static-root
On Saturday, 18 November 2017, 20:12:52 GMT,
Hi everyone,
First of all sorry for the newbie questions it has been a long time since I
used Django and I think I have forgotten just about everything I once knew.
I'm working on a user app for a website. I can't use the built in user model as
I need a little more flexibility and the ability to
ática A3K
wrote:
On Thu, Nov 23, 2017 at 8:49 PM, 'Simon Connah' via Django users
wrote:
Hi everyone,
First of all sorry for the newbie questions it has been a long time since I
used Django and I think I have forgotten just about everything I once knew.
I'm working
I'm just making my first Django app in a very long time, and I have forgotten
most of what I learnt. I'm using the built-in admin panel for ease of use, and
it seems to be working well, with one exception.
I have a BlogPost model with the usual things in it. One of the fields is a FK
to the User
Hi,
First of all apologies for posting two messages to this list in a couple of
days but I've just got back into Django after a rather long break, and it is
taking me a little time to get back in the swing of things.
I'm in the process of making a simple blogging platform which I intend to
relea
ze templates within the Django admin?
This should be pretty easy to do.
All you need is to define some models for your customized templates and then
the user can configure the styling within the Django admin.
HTH,
Etienne
Le 2018-03-18 à 18:21, 'Simon Connah' via Django
logging site the way they want.
You could even define some specific Javascript fields for allowing users to
enable or disable some more advanced functionality...
Anyways, that's all I can think off right now...
Have fun,
Etienne
Le 2018-03-19 à 09:55, 'Simon Connah
Hi,
First of all, I am sorry because I know that this is off-topic but I couldn't
think of a better place to ask the question.
I'm in the process of developing a cross between a blog, a media gallery and
some essential e-commerce features which is designed for end users rather than
other Django
think, it helps you.
On 24 March 2018 at 21:13, 'Simon Connah' via Django users
wrote:
Hi,
First of all, I am sorry because I know that this is off-topic but I couldn't
think of a better place to ask the question.
I'm in the process of developing a cross between a b
ards,
Etienne
Le 2018-03-24 à 15:13, 'Simon Connah' via Django users a écrit :
Hi,
First of all, I am sorry because I know that this is off-topic but I couldn't
think of a better place to ask the question.
I'm in the process of developing a cross between a blog, a
e and anyone who had the original URL will get a 404.
Probably not want you want.
Dylan
On Mon, Mar 26, 2018 at 10:33 AM, 'Simon Connah' via Django users
wrote:
Well, I've opened up the repository if anyone is interested in taking a look.
As I've said elsewhere, it is very
Hi,
Apologies as this is a newbie question.
I have a Model, a CBV CreateView and a ModelForm.
The ModelForm is set to use the model, and the model has a field called author
which is a ForeignKey to default Django auth User model.
I have removed the author field from the ModelForm as if I allow
7:34 UTC+1, Simon Connah wrote:
> Hi,
>
> Apologies as this is a newbie question.
>
> I have a Model, a CBV CreateView and a ModelForm.
>
> The ModelForm is set to use the model, and the model has a field called
> author which is a ForeignKey to default Django auth Us
I want to make sure that the only people who can update and delete an object
are either superusers or the person that originally created them but I'm not
sure how to go about doing it. Can someone point me in the right direction?
I'm not sure which method(s) to override.
Thank you.
--
You rec
efault/#django.contrib.auth.decorators.user_passes_test)
>
> On Sat, Aug 26, 2023, 11:20 'Simon Connah' via Django users
> wrote:
>
> > I want to make sure that the only people who can update and delete an
> > object are either superusers or the person that originally created them but
> > I
Aug 26, 2023, 16:23 'Simon Connah' via Django users
> wrote:
>
> > Thank you! That is very helpful.
> >
> >
> > --- Original Message ---
> > On Saturday, August 26th, 2023 at 14:07, Ruby
> > wrote:
> >
> >
&g
Hi,
I have an app which has a lot of views and URLs and keeping them in just one
file makes it really hard to manage because it is so long. I'd like to make a
views and URLs folder which will allow me to break up views and URLs into
different categories but I'm not sure what the best way to go
s file
>
> On Mon, Sep 18, 2023 at 5:28 PM 'Simon Connah' via Django users
> wrote:
>
> > Hi,
> >
> > I have an app which has a lot of views and URLs and keeping them in just
> > one file makes it really hard to manage because it is so long. I'd l
I can write a unit test which checks say the title on a page and compares it to
a string but that is really prone to breakage. What I want to do instead is to
check that the template that is returned by the URL is the same one that is
expected in the unit test. Is there an easy way to do this?
Sun, 24 Sept 2023 at 22:37, 'Simon Connah' via Django users
> wrote:
>
> > I can write a unit test which checks say the title on a page and compares
> > it to a string but that is really prone to breakage. What I want to do
> > instead is to check that the templat
Hi,
I have a strange issue that affects the latest stable version of Firefox and
the latest Firefox Developer Edition as well. I'm making a custom user and am
just setting all the forms up. I can login with the user and when I go to the
password change form it is displayed correctly in Firefox
I have a register user template with a form which works well but I have a
problem where there is lots of other text next to the form elements such as
password length and what characters need to go in a password. Is their a
reasonable way to hide that text or do I need to do it with JavaScript?
I've been scratching my head over this one.
I have a user registration form but when I submit data on it and it always
returns a 404 (it wants to go to the /users/accounts/ URL) but there are no
URLs there. It initially went to /user/ but I created the view it was looking
for but it just then m
50 matches
Mail list logo