I think I solved a similar problem with Formsets and Model Formsets?
cheers
L.
On 26 August 2013 10:48, Brian Millham wrote:
> I have the this simple form:
>
> class MistagForm(forms.Form):
> artist = forms.CharField()
>
> And I want to display it on a page more than once. The page is a list
Harjot,
In your code, inside the is_valid() loop, you have a line that states:
return render_to_response('tcc/trans.html', dict(data.\
items()+tmp.items()),context_instance=RequestContext(request))
This needs to be a re-direct. You are currently resending it to the form.
If you look at the exam
Hola All,
I can't seem to install the Django dev code?
Following the instructions here:
https://docs.djangoproject.com/en/1.5/topics/install/#installing-development-version
details:
OS: Ubuntu 12.04.3,
pip 1.4.1,
virtualenv 1.10.1,
Django 1.5.3 is installed
1. git cloned
2. workon djangoenv
3.
Ok, so since I actually wanted 1.6b3, I checked out the correct tag
and ran pip install -e again, but with the same results. Except for
the version # obv - that is correctly showing 1.6b3 instead of
1.7.dev20130911220310
cheers
L.
On 12 September 2013 12:01, Lachlan Musicman wrote:
> Hola
Hola,
I'm pretty sure I get this, but I thought I'd ask.
With an inventory model like:
class Movement(models.Model):
item = models.ForeignKey(Carrier)
date = models.DateField(default=timezone.now())
user = models.ForeignKey(User)
qty = models.IntegerField()
There are three things
Harjot,
The answer to your question requires more information.
We would need to see your model structure at the least.
cheers
L.
On 19 September 2013 03:38, Harjot Mann wrote:
> Here is the scrrenshot of my output, please tell me how can boht the
> marks of physics of same roll number of diffe
student_detail in student_details:
Does that make sense? This would work in the shell, but for a
template, you would need a view for the first bit, and the second in
the template.
cheers
L.
On 19 September 2013 12:22, Harjot Mann wrote:
> On Thu, Sep 19, 2013 at 7:39 AM, Lachlan Musicman wr
Hola,
I'm using a standard view function to retrieve all details about an object:
header =[]
headers = object._meta.get_all_field_names()
row = []
for field in headers:
value = getattr(object, field)
row.append(value)
to collect info on a particular object passed to a
succinct.
L.
>
>
>
>
>
> On Mon, Sep 23, 2013 at 2:56 AM, Lachlan Musicman wrote:
>>
>> Hola,
>>
>> I'm using a standard view function to retrieve all details about an
>> object:
>>
>> header =[]
>> headers = object._meta.get_all_fi
Ok, so here's the challenging part - how would you get the
get_FOO_display value for some but not all of those values?
cheers
L.
On 23 September 2013 23:29, Valder Gallo wrote:
> :D
>
>
>
> On Mon, Sep 23, 2013 at 10:12 AM, Lachlan Musicman
> wrote:
>>
>>
You probably need to give some indication of the things you have
tried, and versions.
For instance - are you using the latest bootstrap (3.0)?
If so, did you try this?
http://django-crispy-forms.readthedocs.org/en/latest/crispy_tag_forms.html#bootstrap3-inline-forms
cheers
L.
On 26 September 2
this is probably the answer you want:
http://stackoverflow.com/a/11795186
L.
On 27 September 2013 09:23, Sam Lai wrote:
> Yep. django-bootstrap-* and django-crispy-forms only provide helpers
> for outputting HTML with bootstrap CSS classes. Neither are really
> necessary to use Bootstrap (just
Hola,
I have a inventory system with Parts and Part types. Part Types are
Archetypes, parts are instances of Part Types with details (unit cost,
serial number, date of purchase, etc).
A big issue is that not all Parts have serial numbers (box of 1000
screws for instance). But when we get a large
I'm pretty sure there are some django installs at Ushahidi as well? (I
could be wrong)
http://www.ushahidi.com
L.
On 5 October 2013 05:09, Alioune Dia wrote:
> We are a community (http://blog.dakarlug.org/) based in Senegal since
> 2008 and we operate in Free Software (OS and Software) and Pyth
You are incorrect when you say "the security related items on the
release notes from 1.5.2 up to 1.5.4 did not
seem critically urgent".
Francois get's it right - they may be non critically urgent for *your*
installation - but for a live, web facing system they are important.
And that's the factor
Thanks for all the hard work devs!
L.
On 7 November 2013 02:09, James Bennett wrote:
> Django 1.6 and Django 1.4.10 are out today; the latter is a bugfix release
> to restore Python 2.5 compatibility in the 1.4 series.
>
> Full details are in the blog post:
>
> https://www.djangoproject.com/webl
Hola,
I've set up a CalendarWidget as per the docs
https://docs.djangoproject.com/en/1.6/topics/forms/media/ and can see
correct results in the shell:
forms.py
-
class CalendarWidget(forms.TextInput):
class Media:
css = {
'all': (settings.STATIC_URL + 'css/datepi
Nothing, unfortunately.
On 14 November 2013 07:37, Jason Arnst-Goodrich wrote:
> Try:
>
> expiry_date = forms.DateField(widget=CalendarWidget())
>
>
> On Tuesday, November 12, 2013 5:41:27 PM UTC-8, Lachlan Musicman wrote:
>>
>> Hola,
>>
>> I've s
On Wed, Apr 27, 2011 at 04:34, byront wrote:
> Hello,
>
> I went through the beginners tutorial and am interested in Django. I
> new to web development altogether and am having trouble finding
> resources to help me make a very basic but professional looking page.
> Something similar to this yacht
On Sat, Apr 30, 2011 at 12:57, jsierra wrote:
> I installed django 1.3 manually on my laptop, since ubuntu 11.04 does not
> ship with 1.3 and I want to be able to run django-admin without having to
> sudo the command when creating projects and subsequently having to use sudo
> with manage.py. I wa
On Tue, May 3, 2011 at 19:19, Uri Goldstein wrote:
> Hello,
>
> Being new to Django, I was told by a friend that it only supports i18n for a
> limited set of languages - these being only languages that have had Django
> itself translated to.
>
> Is this true? Doesn't make much sense to me :) Is th
On Wed, Jul 27, 2011 at 16:53, kenneth gonsalves wrote:
> On Tue, 2011-07-26 at 15:09 +0100, Tom Evans wrote:
>> I strongly disagree, i18n and l10n have explicit and well known
>> technical meanings, dating from the late 80s. It is right and proper
>> to use those names in django, as they are used
On Wed, Dec 15, 2010 at 02:50, cocolombo wrote:
> Thanks so much Mike, Christophe, Venkatraman, and whoever joins in,
> for your answers.
>
> To Venkatraman S:
>
> Yes quite a lot of the applications is written an are functioning
> independently.
>
> As I described it's the "big picture" I have di
On Wed, Dec 22, 2010 at 04:31, Tom Evans wrote:
> If you prefer to edit pofiles offline, then I would also recommend
> poedit[1], which has builds for most operating systems.
Or, if you are a KDE user, Lokalize is very good, although notepad
will also suffice.
> Cheers
>
> Tom
>
> [1] http://ww
On Sat, Jan 1, 2011 at 00:17, wrote:
> Hi all,
>
> I recently started working on a project which is based on django. I've had
> reasons to work through the documentation several times to get things done.
> However, each time I check the documentation, I find out there is more to
> learn hence,
On Fri, Jan 7, 2011 at 09:13, Fel wrote:
> I'm a beginner Django person and I've written my first app...It's a
> products App that has 4 attributes: Name, Slug URL, Description and
> Image.
>
> I built my model, I have an ADMIN for it so I can add products via
> the /admin and now I want to create
On Sun, Jan 16, 2011 at 04:23, David Walker wrote:
> Despite reading round and round in circles in the documentation, I am
> completely baffled about localisation and how it works. I am not
> trying to do any translation yet, but want to code money and date
> formats right so that I don't have to
On Wed, Jan 19, 2011 at 01:40, David Walker wrote:
> There seem to be two main places where date formats originate. They
> are set in settings.py and in the locale's formats.py
> (django.conf.locale..formats).
>
> formats.py sets (amongst others) DATE_FORMAT and SHORT_DATE_FORMAT for
> the local
On Sun, Jan 23, 2011 at 20:40, Kevin Xiao wrote:
> Hi,
>
> I am stuck while look into source code of Django's lazy decorator. At
> line 205 of functinal.py, there is:
>
> def __unicode_cast(self):
> return self.__func(*self.__args, **self.__kw)
>
> def __str_cast(self):
> r
On Sat, Feb 5, 2011 at 22:38, Simon W wrote:
> Hey,
> I have a datetime field in my models. When I format the date into letters it
> appears in english and I'd like it in another langue. How to?
Have you turned on i18n/L10n in your settings?
http://docs.djangoproject.com/en/dev/topics/i18n/deploy
On Thu, Feb 24, 2011 at 20:41, Mike Ramirez wrote:
> On Thursday, February 24, 2011 01:32:11 am Tom Evans wrote:
> But that doesn't explain the tuple form, (u'', ) of the return value.
That's how unicode strings are marked in django
cheers
L.
--
Crunchiness is the gustatory sensation of muffle
On Wed, Mar 30, 2011 at 07:05, Andreas Neustifter
wrote:
>
> Using this as starting point for new users of the tutorial? Is there
> any downside to having this in a repository?
Well, it's not *evil* if that's what you are asking. Personally, I
found hand typing all the code from the tutorial to b
Is that related to this bug?
https://code.djangoproject.com/ticket/8892
https://code.djangoproject.com/ticket/10811
In short - if FK fields aren't saved as objects themselves first, then
they aren't correctly added to the new objects?
I had trouble with this once. Maybe put in a save after the g
Of course, although it depends on what your definition of "earliest"
is (most likely you mean from a data entry perspective), and what
fields and field types you have. You could sort by date, if you have a
creation date field, you could sort by ID/PK if you haven't changed
that field on the table..
My initial suggestion would be to utilise the "order by" option, and
order by date.
Then, on each model have a find_next function and a until_next function.
The first would work out which was the next event, the other the time.
They could be coupled, but keeping them separate means you can utilis
Yip, EDX looks complex - can you search for the settings file and report back?
AuthLDAP is annoying, but it does work - I've used it successfully
against an AD backend. The error messages are important to read.
But first, find your settings file.
You will need to provide us with more info too. W
ttings.py
> ./edx/app/edxapp/venvs/edxapp/src/lettuce/tests/integration/lib/Django-1.3/django/conf/project_template/settings.py
> ./edx/app/edxapp/venvs/edxapp/src/lettuce/tests/integration/lib/Django-1.2.5/django/conf/project_template/settings.py
> ./usr/local/lib/python2.7/dist-package
Long time on and off list member. I went to the first round of classes
and would recommend. Very comfortable space, training leaders knew
their Django v well.
L.
--
"This is a profound psychological violence here. How can one even
begin to speak of dignity in labor when one secretly feels one'
Carl is right - this is a hard problem. I'm a mid level django
developer and I spent at least a week trying a number of solutions
(and doing the other, non Django, parts of my job).
The one that ended up working for me was the django-dynamic-formset
javascript library.
https://github.com/elo80ka/
I think here:
{% for form in formset.forms %}
you need to move the id
{% for form in formset.forms %}
cheers
L.
--
It is through this shadowy emptiness (of negative space) that we
walk, talk, see, and live; negative space is the impossible cellop
Just checking you have
{% load staticfiles %} in your templates - you will need in both iirc?
--
It is through this shadowy emptiness (of negative space) that we
walk, talk, see, and live; negative space is the impossible cellophane
layer that drapes the known world and is invisible to all bu
data is missing or has been
>> tampered with']) but I think I can hopefully fix that one!
>>
>> Thank you SOOO much!!
>>
>> On Mon, Mar 30, 2015 at 10:29 PM, Lachlan Musicman
>> wrote:
>>>
>>> Just checking you have
>>>
>&g
Yes, I cannot recommend the django tutorials (in the docs, front page)
highly enough.
--
I'm treading carefully
but it's the time of night
the snowy light
the subway roar
and the whispered fights
exciting sights
but it's not enough
I thought it was
I wish it was
I thought it was
-
You name
Oh my aching head and static files.
STATIC_URL points to the namespace that the files will be served from:
eg mydomain.com/static
To set this up, in nginx/apache you need a stanza that looks like:
location /static {
alias /var/www/trees/opentrees/static;
}
STATIC_ROOT is where those
Hi,
Using Django 1.8, django-extensions 1.5.2, ipython 3.1.0 in a virtualenv
I can't get access to my models at all?
All of the following fail:
d = Document()
from models import *
from app.models import *
from proj.app.models import *
i am loading from within venv with
$ ./manage.py shell_pl
Running
$ ./manage.py shell_plus --ipython
works fine - all models are imported
L.
--
let's build quiet armies friends, let's march on their glass towers...let's
build fallen cathedrals and make impractical plans
- GYBE
On 29 April 2015 at 11:15, Lachlan Musicman wrote:
ss towers...let's
build fallen cathedrals and make impractical plans
- GYBE
On 29 April 2015 at 11:21, Lachlan Musicman wrote:
> Running
>
> $ ./manage.py shell_plus --ipython
>
> works fine - all models are imported
>
> L.
>
> --
> let's build quiet ar
Hola,
Django shell gives right results, template doesn't: code here
http://dpaste.com/1NJEKD8
What am I doing wrong?
L.
--
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
n attendees_per_org.items() %}
>
> {{ org }}
> {{ num }}
>
> {% endfor %}
>
> Since your dataset is a dictionary, u need to use key,value to get
> elements in both side. Also items() is also required.
> On May 1, 2015 8:22 AM, "Lachlan Musicman&q
To my mind it means something along the lines of:
if someone says something sexist, instead of jumping on them and
eviscerating them publicly, we take them aside and explain that that type
of language is against the CoC, is inappropriate, and ask them to not do it
again. Even so far as to offer su
0. Yep, just delete your secret key and get a new one - wont affect
anything negatively.
2. I put things like menus into the base.html template. It means a little
bit of hand coding once, but only once.
How to do it depends on your design. I personally am terrible at design, so
using bootstrap make
Hola,
I was planning on using Django taggit for tagging models.
http://django-taggit.readthedocs.org
https://github.com/alex/django-taggit
I am trying to get some sort of CBV (eg lListView of model's with tag x)
happening but it doesn't seem able to do this.
The app's views.py
https://github.co
Over ride the save() method on teh Actions:
class Actions(models.Model):
date_start_preview = models.DateField('Data Prevista Inicial',
blank=True)
date_end_preview = models.DateField('Data Prevista Final', blank=True)
date_start = models.DateField('Data Real Inicial', blank=True)
DHaval,
Attachments wont cut it.
Please paste the code into your email or into http://dpaste.com/
Also, a pyc file isn't a file that is readable by humans - you will need to
send the code from the py file.
You will need to also send the exact error.
Cheers
L.
--
let's build quiet armies f
Most likely the info will be stored in a DB behind Django - MySQL for instance.
If you look in /setting.py you should see the relevant
section "Databases"
You can then access the data in the database using that user/password.
If it's mysql, you can try phpmyadmin if you can't get the Django work
For Range of dates:
https://docs.djangoproject.com/en/dev/ref/models/querysets/#range
for "greater than" or "less than" dates (and what that means), look at
the filter docs:
On 7 July 2014 22:12, <9devm...@gmail.com> wrote:
> Thanks for pointing it out.
>
> However, my question is about a diff
Gah, sorry. Fat thumbed the send button
https://docs.djangoproject.com/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.filter
On 7 July 2014 22:21, Lachlan Musicman wrote:
> For Range of dates:
>
> https://docs.djangoproject.com/en/dev/ref/models/querysets/#range
>
&g
If they aren't in settings, then the software would never have worked
(if it needed a DB) :)
You can just open settings.py with a text editor - notepad, wordpad,
gedit, emacs/vim, even word if you want. It's just a text file.
Cheers
L.
On 8 July 2014 14:05, Janelle O'Dea wrote:
> Again, super h
On 9 July 2014 06:24, Janelle wrote:
> I've never worked in Ubuntu before, but from what I understand, there is no
> text editor or Word or anything like that; everything is done through the
> command line and there is no "desktop."
>
> So, how would I open settings.py with Ubuntu?
>
GEdit is a t
ng a
>> number of them.
>>
>> Ilya is correct but you might make faster progress if you set out the
>> problem(s) and ask for a local contractor to get in touch.
>>
>>>
>>>
>>> On Tue, Jul 8, 2014 at 12:47 AM, Lachlan Musicman >> <mailto:data...@
There is no class Article in any of those blocks. That's why.
Try adding this to models.py this:
class Article(models.Model):
name = models.CharField(max_length=25)
body = models.TextField()
author = models.ForeignKey(Author)
That should help.
cheers
L.
On 9 July 2014 11:31, Don Fox wro
Or something like this:
https://docs.djangoproject.com/en/1.6/intro/overview/
L.
On 9 July 2014 12:29, Lachlan Musicman wrote:
> There is no class Article in any of those blocks. That's why.
>
> Try adding this to models.py this:
>
> class Article(models.Model):
>
On 9 July 2014 13:19, Don Fox wrote:
>
>
> I should have mentioned that I already had this method in the models.py:
>
> class Article (models.Model):
> pub_date = models.DateField()
> headline = models.CharField(max_length = 30)
> content = models.CharField(max_length=500)
> repor
Have you tried pycclean?
http://stackoverflow.com/questions/785519/how-do-i-remove-all-pyc-files-from-a-project
ie: find . -name "*.pyc" -exec rm -rf {} \;
then restart gnuicorn/nginx.
cheers
L.
On 9 July 2014 22:20, Amar Kamthe wrote:
> Me too having the same issue.
> I tried all the above t
Hola,
So I need a contact app. I could write one myself, but there are a
gazillion forks of something that seems quite comprehensive,
django-contacts.
This is the first time I've used a third party app that adds models to
my project.
I did (in a dev virtualenv) pip install django-contacts, added
https://docs.djangoproject.com/en/1.6/intro/tutorial01/
cheers
L.
On 10 July 2014 18:16, ngangsia akumbo wrote:
> can u post the link again cos i have completed some tutorials on articles
> from django docs
>
> --
> You received this message because you are subscribed to the Google Groups
> "Dja
z.
>
> El 10/07/2014 06:44, "Lachlan Musicman" escribió:
>>
>> Hola,
>>
>> So I need a contact app. I could write one myself, but there are a
>> gazillion forks of something that seems quite comprehensive,
>> django-contacts.
>>
>>
show slug on the model? how is it defined?
On 12 July 2014 18:01, ngangsia akumbo wrote:
> i have a problem with my urls it keeps breaking
>
> here is my url
> from django.conf.urls import patterns, include, url
> from django.contrib import admin
> admin.autodiscover()
> #from blogs import views
You can copy the files on top of the old files and then restart the
web server, which will bump the wsgi or fastcgi, which should be
sufficient.
cheers
L.
On 1 August 2014 15:06, Zoltán Turcsányi wrote:
> Hi Everyone,
>
>
> I have a website written in python+django and I deployed it to
> pythona
Hi all,
I have a thermal line printer (a Zebra LP2824 fwiw) and I've
discovered/worked out that I can print with it by just sending a text,
a la:
cat filename | nc
I tried this in my view:
return redirect("", "string")
but it's printing out the HttpResponse object.
How would I send a string
Thanks Collin, I'll test on Monday
L.
On 1 August 2014 22:47, Collin Anderson wrote:
> redirect is a django shortcut for an http redirect response, not a file/pipe
> redirect. You need to use a python socket to connect to the ip address.
>
> http://stackoverflow.com/questions/68774/best-way-to-op
Not really, it's a Nix thing (ie, OSX and BSD as well as linux).
Basically, if you set the file to be executable (chmod +x) then
./filename is a way of executing using the default file association
(.py is python usually).
The ./ bit indicates "look in the folder we are in" - if the file is
not in
Collin, worked a charm - thankyou!
L.
On 1 August 2014 22:51, Lachlan Musicman wrote:
> Thanks Collin, I'll test on Monday
> L.
>
> On 1 August 2014 22:47, Collin Anderson wrote:
>> redirect is a django shortcut for an http redirect response, not a file/pipe
>>
Make sure the blog_app is in your settings.py?
On 6 August 2014 09:00, Joel Goldstick wrote:
> I have this:
>
> from django.conf.urls import patterns, include, url
>
> from django.contrib import admin, admindocs
> import blog_app
>
> admin.autodiscover()
>
> patterns = patterns('',
> url(r'^a
Bugger - I find that error when left out of the settings or the wsgi
points to the wrong settings file. Usually when I'm swapping between
envs "settings.dev" "settings.prod"
L.
On 6 August 2014 09:44, Joel Goldstick wrote:
> On Tue, Aug 5, 2014 at 7:15 PM, Lachlan M
Daniel,
The template in the View is the end page you want created for eg testview.html.
testview.html:
{% extends "base.html" %}
{% block content %}TEST VIEW WITH OBJECT{% endblock %}
base.html:
{% block side_hdr %}here is the side menu for all pages{% endblock%}
{% block content %}Base{% en
You don't set the block tags in the view. You set the variables in the
view - in this example you set var_1_from_view (a single object) and
var_2_from_view (a collection/list of sorts)
{% block side_hdr %}{% endblock%}
{% block content %}
{{ var_1_from_view }}
{% for item in var_2_from_view
Hi Ram
Yep, South supports MySQL - it's that MySQL doesn't support
schema-altering statements in transactions.
The problem is clearly stated - you are trying to make a field unique
despite the data in that field *not* being unique.
In particular, it looks like you have two entries with value '12
Did you run
python manage.py collectstatic
?
cheers
L.
On 12 September 2014 11:11, Michael A. Martin wrote:
> It seems like when I take all the CSS and JS the html renders with images.
> But this site rendered with a previous version. I pretty much ruined this
> dev project today trying to fig
Hi
I have a super class Job that will never be instantiated on it's own,
although is not Meta.
There are two other models, WorkshopJob and EngineeringJob, which have
o2o links to a Job.
On creation of either WorkshopJob and EngineeringJob, a new Job is made.
The problem arises because any parti
I get the same error across CBV and FBV when trying to create the
second o2o relationship to the super/concrete model Job
[2014-09-17 11:49:26] null value in column "date_opened" violates
not-null constraint
"date_opened" is a var on the Job model. I don't understand why it's
trying to create a
When using the CBVs, the error actually made me consider that I should
be using UpdateView rather than CreateView, but that doesn't work - I
don't want to change the underlying Job, I just want to add another,
as yet non existent, o2o to it.
Cheers
L.
On 18 September 2014 09:48, Lachla
Show us the URLs - the update url requires either a slug OR a pk - one is
sufficient, so you don't need to set up a slug. But the update cbv can only
be called from an object's url (the one that you would like to update) - it
can't be called from just anywhere.
cheers
L.
On 18 September 2014 02:5
Ah! OK, it's not just me then. Good.
It's a usual inheritance problem? I've never seen it with o2m or m2m
relations? I think I'll just change them to o2m and check to make sure
there's only one in the save method - seems clearer -easier to read
for !me, and less scary.
Thanks for your help
L.
O
Kamal,
That should work fine, although you will still need to install Python
if you are on a Windows platform.
cheers
L.
On 23 September 2014 11:22, Kamal Kaur wrote:
> On Tue, Sep 23, 2014 at 5:39 AM, Paraskevi vogot wrote:
>> I find it a little bit hard to install a web server (Appache)
>
>
When you say "running properly" do you mean "we can log in to the
regular site, but not the admin site"? Or do you mean "runserver
starts without error"?
Cheers
L.
On 25 September 2014 17:03, RDN wrote:
> This is my settings.py file. I am trying to create an application where the
> user will be
Muhammad,
Yes 1.7 is considered stable and is the best place to start.
Cheers
L.
On 30 September 2014 16:21, Muhammad Ahmed wrote:
> Hi,
>
> I am learning Django by using version 1.4 and I have completed first 4
> introductory lessons.
>
> However, I see that newest Django version is 1.7 and I
As to Python, it depends on what is available to you and you feel
comfortable with.
Either python 2.7.x or 3.3 (or 3.4, which ever is newest) should be fine.
cheers
L.
On 30 September 2014 16:26, Lachlan Musicman wrote:
> Muhammad,
>
> Yes 1.7 is considered stable and is the best
use list_display:
https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_display
Cheers
L.
On 1 October 2014 13:11, Sachin Tiwari wrote:
> Ok sorry for incomplete description, I added a field phone number in user
> profile for eg when we click on add us
What's in your tango urls.py?
Cheers
L.
On 3 October 2014 08:32, ashley kenney wrote:
> hello sweets!!!
>
> I'm trying to display about page under rango app in my tango project. I'm
> getting error below when I go to http://127.0.0.1:8000/rango/about. Not
> sure what is wrong with (r'^abou
Yep that. The $ sign indicates "this is the end of the url".
(actually, it's a generic regex that means "this is the end of the
search string" in the same way that ^ indicates "this is the start of
the search string".)
Cheers
L.
On 3 October 2014 12:50, Collin Anderson wrote:
> (r'^rango/$', i
I can't recommend the Two Scoops of Django method enough, if only
because it's made by people that deploy a lot and from sensible
suggestions.
1. Just a single code base, but with different branches if needed
(hence using DVCS). Then you commit once, and have no synchronisation
problems. Any issue
I'm struggling with CreateView get_initial() in django1.7
I have a modelA detail page with an "add ModelB" (modelB has FK to ModelA)
button.
When I hit that button, I want the new ModelB obj to have the modelA FK set. So
in the ModelB CreateView I have a get_initial that uses the slug to set the
lForm
and the template?
Cheers
L.
On 9 October 2014 15:33, Lachlan Musicman wrote:
> I'm struggling with CreateView get_initial() in django1.7
>
> I have a modelA detail page with an "add ModelB" (modelB has FK to ModelA)
> button.
>
> When I hit that button, I want
The way I always describe APIs (in a broad, general sense) is:
Image internet service "Twotter" had posts, and each post had a date.
If they had a date API you might be able to get all of the posts for a
month like:
for month in months:
return "https://twotter.org/%s"; %month
and then you cou
When using GET to retrieve data, how do I populate the JSON with
get_FOO_display rather than FOO?
cheers
L.
--
You have to be really clever to come up with a genuinely dangerous
thought. I am disheartened that people can be clever enough to do that
and not clever enough to do the obvious thing a
Done.
long_type = serializers.CharField(source='get_FOO_display')
On 26 October 2014 14:38, Lachlan Musicman wrote:
> When using GET to retrieve data, how do I populate the JSON with
> get_FOO_display rather than FOO?
>
> cheers
> L.
>
> --
> You have to
You don't really need it native in Django because the User Model is
easily extensible - giving you or others the opportunity to extend it
as you see fit and to release it the world as fle has.
See here:
https://docs.djangoproject.com/en/1.7/topics/auth/customizing/#extending-the-existing-user-mod
ave in having this capability available. To me it is a very standard
> use case, and again to me off the top of my head my opinion is that
> something that solves this use case could be a standard feature that is
> shipped, that's really all this is about.
>
> For the time being
All good - that's how I build too. The slug/get_absolute_url will blow
your mind. Makes everything easier.
L.
On 2 December 2014 at 15:10, JJ Zolper wrote:
> Lachlan,
>
> Oh I absolutely understand. Don't get me wrong I prefer Django to be as
> lightweight as possible, and leave out things that
201 - 300 of 420 matches
Mail list logo