Re: Django Development environment

2011-08-26 Thread Simon Connah
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

Historical Djangocon videos available for download in iTunes?

2011-08-27 Thread Simon Connah
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

Re: what should be memory size memcached for Django on Ubuntu Os?

2011-08-27 Thread Simon Connah
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

Re: Django Development environment

2011-08-27 Thread Simon Connah
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

Re: Django Development environment

2011-08-28 Thread Simon Connah
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

Re: Problem with file upload!

2011-09-04 Thread Simon Connah
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

Dealing with misc parts of a project

2011-09-22 Thread Simon Connah
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

Re: Dealing with misc parts of a project

2011-09-22 Thread Simon Connah
On 22/09/2011 19:50, DrBloodmoney wrote: On Thu, Sep 22, 2011 at 12:30 PM, Micky Hulse<rgmi...@gmail.com> wrote: On Thu, Sep 22, 2011 at 8:54 AM, Simon Connah<simon.connah...@gmail.com> wrote: So do you just tend to create a new misc app to hold all these little bits

Re: Django FCGI process randomly dying

2011-05-18 Thread Simon Connah
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

Re: how to save image in postgreSQL database

2011-05-19 Thread Simon Connah
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

Re: how to save image in postgreSQL database

2011-05-19 Thread Simon Connah
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

Re: Django SEO - feedback

2011-05-22 Thread Simon Connah
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

Re: Experiences with virtualenv + Django?

2011-05-24 Thread Simon Connah
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

Re: Is there an HTML editor that's Django-aware

2011-05-24 Thread Simon Connah
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

Re: Is there an HTML editor that's Django-aware

2011-05-24 Thread Simon Connah
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:

Re: UK-based Django Host?

2011-05-25 Thread Simon Connah
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

Re: Is there an HTML editor that's Django-aware

2011-05-26 Thread Simon Connah
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

Re: Is there an HTML editor that's Django-aware

2011-05-31 Thread Simon Connah
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

Re: Django Development Environments

2011-06-05 Thread Simon Connah
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

Re: extending the User profile - which way to go?

2011-08-21 Thread Simon Connah
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

Re: extending the User profile - which way to go?

2011-08-21 Thread Simon Connah
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

Passing Django Template Vars to JS

2018-06-10 Thread Simon Connah
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

Re: Passing Django Template Vars to JS

2018-06-11 Thread Simon Connah
u 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 rather than an id. > > Regards > &g

Django and Visual Studio Code

2018-04-30 Thread Simon Connah
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

Best way to structure this Django project

2018-12-02 Thread Simon Connah
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

Easiest front end JavaScript framework to integrate with a Django backend?

2018-11-27 Thread Simon Connah
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

Re: Some newbie questions on CBVs and FBVs

2017-11-24 Thread 'Simon Connah' via Django users
A3K <matematica@gmail.com> wrote: On Thu, Nov 23, 2017 at 8:49 PM, 'Simon Connah' via Django users <django-users@googlegroups.com> 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 forgotte

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,

Re: Creating a model instance using currently logged in user

2018-04-04 Thread 'Simon Connah' via Django users
day, 3 April 2018 22:17: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

Re: Advertising a new Django open source project?

2018-03-26 Thread 'Simon Connah' via Django users
hanged the URL will change 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 <django-users@googlegroups.com> wrote: Well, I've opened up the repository if anyone is interested in taking a lo

Re: Advertising a new Django open source project?

2018-03-26 Thread 'Simon Connah' via Django users
roject. Regards, 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 media g

Re: Advertising a new Django open source project?

2018-03-24 Thread 'Simon Connah' via Django users
https://news.ycombinator.com/show I think, it helps you. On 24 March 2018 at 21:13, 'Simon Connah' via Django users <django-users@googlegroups.com> 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 o

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

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

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

2018-03-19 Thread 'Simon Connah' via Django users
plates 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 users a écrit :

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

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

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

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

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 like to > &g

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: 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 template that is

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: 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'm not sure h

Re: UpdateView and DeleteView

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

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

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

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?

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