Weird issue with a form

2024-03-19 Thread 'Simon Connah' via Django users
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

Registration form in template

2024-03-17 Thread 'Simon Connah' via Django users
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?

Strange bug with Firefox

2023-10-14 Thread 'Simon Connah' via Django users
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

Re: Unit test to make sure correct template is returned from a specific URL?

2023-09-25 Thread 'Simon Connah' via Django users
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

Unit test to make sure correct template is returned from a specific URL?

2023-09-24 Thread 'Simon Connah' via Django users
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?

Re: Splitting views.py and urls.py into a directory rather than single files

2023-09-18 Thread 'Simon Connah' via Django users
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

Splitting views.py and urls.py into a directory rather than single files

2023-09-18 Thread 'Simon Connah' via Django users
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

Re: UpdateView and DeleteView

2023-08-27 Thread 'Simon Connah' via Django users
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

Re: UpdateView and DeleteView

2023-08-26 Thread 'Simon Connah' via Django users
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&#x

UpdateView and DeleteView

2023-08-26 Thread 'Simon Connah' via Django users
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

Building a modular app?

2023-04-02 Thread 'Simon Connah' via Django users
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

Re: Creating a model instance using currently logged in user

2018-04-04 Thread 'Simon Connah' via Django users
Hi, Sorry. When I wrote that message I wasn't thinking properly. After a sleep and a bit of Googling, I sorted the issue out. In the future, I'll be much more explicit about my problems. Just goes to show how important sleep is when programming :). Thank you for your response though. At least

Creating a model instance using currently logged in user

2018-04-03 Thread 'Simon Connah' via Django users
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

Re: Advertising a new Django open source project?

2018-03-26 Thread 'Simon Connah' via Django users
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

Re: Advertising a new Django open source project?

2018-03-26 Thread 'Simon Connah' via Django users
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

Re: Advertising a new Django open source project?

2018-03-24 Thread 'Simon Connah' via Django users
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

Advertising a new Django open source project?

2018-03-24 Thread 'Simon Connah' via Django users
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

Re: Dealing with templates in an open source Django project?

2018-03-20 Thread 'Simon Connah' via Django users
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

Re: Dealing with templates in an open source Django project?

2018-03-19 Thread 'Simon Connah' via Django users
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

Dealing with templates in an open source Django project?

2018-03-18 Thread 'Simon Connah' via Django users
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

Showing only current user in Django admin

2018-03-17 Thread 'Simon Connah' via Django users
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

Re: Some newbie questions on CBVs and FBVs

2017-11-24 Thread 'Simon Connah' via Django users
á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

Some newbie questions on CBVs and FBVs

2017-11-23 Thread 'Simon Connah' via Django users
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

Re: Django field model for HTML parser?

2017-11-18 Thread 'Simon Connah' via Django users
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,