It seems you don't have a "main" page.
The page you saw was a placeholder starting page if there are no other
urls defined.
If you want to deliver something at / you have to add it to urls.py
PS: pasting screenshots of code is a very bad habit.
On 26/05/18 14:46, Dmitry Sobolev wrote:
Hi,
On 19/01/18 11:50, tango ward wrote:
> # Check who the winner of the match
> if data['radiant_win'] == 'False':
You are comparing a boolean with the *string* 'False', remove the ' and
try again.
> j_data['Winner'] = data['dire_name']
> else
On 03/05/17 15:53, cjdcordeiro wrote:
> Probably the best would be overriding the app's default class based
> view, but when I look at it
> (https://github.com/django-notifications/django-notifications/blob/master/notifications/views.py#L29)
> it doesn't have a get_context method or anything I can
On 09/02/17 14:01, Gerald Brown wrote:
> Because of this problem I am NOT able to proceed with my project so any
> and all help will be appreciated.
Maybe somebody could help you if you provide more information about what
you are doing.
Following information could give some starting points for in
On 24/05/16 08:46, meInvent bbird wrote:
> onClick="window.location.href='{% url 'reg/{{post.pk}}' %}'">Save
You cannot access a variable like this in a template.
There is also no point in trying to access an url using url providing an
url. Your url pattern is called 'post_detail'.
Try somethin
On 12/05/16 18:36, Sean McKinley wrote:
> I haven't taken the course, but the differences between basic Django 1.8
> and 1.9 are not all that significant and you can find out if you are
> being taught something odd by reviewing 1.9 release notes. Big caveat,
> syncdb is gone in 1.9 so you have to l
On 10/03/16 08:03, Vayuj Rajan wrote:
> I configured SAMBA and I can access it directly at my computer. But what
> I saw there that he was accessing it by using a website . So basically
> he was accessing it from local web server with a storage attached.
You basically want something like owncloud
On 28/02/16 20:14, Simon Gunacker wrote:
> |
> def detail(request, pk):
> recipe = Recipe.objects.get(id=pk)
> recipe['steps'] = Steps.objects.filter(recipe_id=pk)
> template = loader.get_template('recipe/recipe_detail.html')
> context = {
> 'recipe': recipe,
> }
> r
On 19/01/16 16:35, Xristos Xristoou wrote:
> url(r'^view/(?P[^\.]+)/$', views.view_post, name='view_post'),
> url(r'^(?P[0−9]+)/$', views.like_post, name='like_post'),
this defines urls like /1/
> The current URL, |like/1/|, didn't match any of these.
of course it doesn't, you didn't define a li
On 07/11/15 06:03, Becka R. wrote:
> How can I display the data in the template so the shifts are sorted by
> day, and then by meal?
Try saving the weekday as integer (0-6), sorting using integer is much
easier than sorting using strings in non-alphabetic order :)
You can than e.g. define a defaul
On 29/09/15 18:47, Rolston Jeremiah wrote:
> class Genus(models.Model):
> genus_id = models.AutoField(primary_key=True),
> scientific_genus = models.CharField(max_length=32),
> common_name = models.CharField(max_length=32),
> common_examples = models.TextField(),
It's probably because of the ',' a
On 01/09/15 16:34, Yann Salaün wrote:
> In summary : is there a way to put something like `return
> serve_this_static_directory()` in the view? or is there any workaround
> there?
Not sure if I get you right, you want to serve static files with django?
Is there any reason why it's not possible to
On 25/08/15 01:25, Sait Maraşlıoğlu wrote:
> default = timezone.now()
Beware, timezone.now() will be evaluated once when the module is loaded,
not on save if you might think.
Use default = timezone.now without calling it to get the current value
on save.
--
You received this message because you
On 31/08/15 12:10, Remaze Vs wrote:
> def save(self,request,*args,**kwargs):
You defined save to take a second positional argument, so it's no wonder
it crashes if you call .save()
If you need the request in the save method you have to pass it,
otherwise remove the request parameter.
See docs for
On 26/08/15 11:59, khoobks wrote:
> I just discovered some interesting behaviour in Django 1.8.4 and was
> wondering if this was an unexpected side effect or specifically designed
> behaviour.
That behaviour is intended and documented[0].
blank and null working on completely different levels.
bla
On 19/08/15 13:25, Remaze Vs wrote:
> username=self.request.user.username
What do you want to accomplish with this line?
This cannot work.
Where should self and self.request come from?
You probably want to us a ForeignKey to the User model.
(user = models.ForeignKey(User))
Afterwards you have to
On 06/07/15 14:04, Chris Strasser wrote:
> my problem is with reverse lookups (i think it is called) the docs say that i
> can access entries through blog.entry,(by lowercaseing the class)
> it appears to me that i have the same setup with contact and location but i
> am getting errors ??
I thin
Hi,
I'm working on an django-cms 3.0.13/py2.7 page atm and came across an
weird behaviour using haystack with whoosh.
When using rebuild_index everything works fine.
But using update_index afterwards leads to an UnicodeDecodeError when
searching for a page with umlauts.
Error thrown in "whoosh/re
On 21/04/15 23:49, egon.frer...@gmx.de wrote:
> settings.py contains ALLOWED_HOSTS with the host in the form
> ".example.com". With DEBUG = True I get the complete page. But if I set
> DEBUG = False the static files are not found so I get only the content.
Django does not serve static files if DEB
On 12/01/15 19:16, dennis breland wrote:
> I ran these after making the changes:
> python manage.py sqlall recipe
manage.py sqlall just prints the sql statements for your models
> python manage.py syncdb
Do you use migrations?
If so did you run migrate?
What was the output of syncdb?
-
On 2015-01-06 12:55, Andreas Kuhne wrote:
The difference is the age of the django project you are looking at. {%
load staticfiles %} the {% static %} is the current way to load and
use static files. It also has the option to do other things (like MD5
hashes for versions) automatically and should
On 14/12/14 00:55, Muhammed Tüfekyapan wrote:
> I try many things to serve .css files but I can't do that. How can i
> serve .css and .js files in Django 1.7?
>
>
> I typed django manage.py collectstatic but still my admin panel don't
> load css.
>
> What can i do?
did you follow the howto in t
On 2014-12-07 11:48, Hossein Rashnoo wrote:
Please help me.
this is quite unrelated to django, maybe it would be better asking this
question on the python mailinglist[1]
-- Florian
[1] https://www.python.org/community/lists/
--
You received this message because you are subscribed to the Go
On 04/12/14 18:58, jogaserbia wrote:
> This is what I get from chrome when I click on the button in the
> index.html, but nothing else happens. I bolded what I believe should
> redirect to the testing UR with the lng and lat data.
does it work with hardcoded url?
is the testing url in the rende
On 03/12/14 16:36, Shashwat singh wrote:
> Django is properly installed but when i try to create a new project ---
> " django-admin.py startproject abc " it returns ^^ that error.
> Any help will be highly appreciated.
starting new project with name abc throws the my_project.settings not
found? T
On 2014-12-01 20:07, check.dja...@gmail.com wrote:
* I load the temple : template = loader.get_template(>.html>)
* i use context : context = RequestContext(request,{
'tableC_QuerySet': tableC_QuerySet,})
* return HttpResponse(template.render(context))
you may also have a
On 2014-12-02 10:59, Shashwat singh wrote:
ImportError: Could not import settings 'my_project.settings' (Is it on
sys.path? Is there an import error in the settings file?): No module
named my_project.settings
PLEASE HELP WITH THIS
there is not enough information to see the cause of the problem
2009/10/12 Sergio A.
>
> I've three views each with different URL. They are visible to logged
> in users.
> If a non-logged user tries to access a URL requiring login, I'm able
> to redirect it to the login page.
>
> What I'm missing is how to go back to the initial page, once the user
> log in t
Hi,
I'm writing an own auth backend at the moment, but I need access to the
request object.
I found a possible solution with adding settings.request = request into a
middleware, but that's seems not beautilful to me.
My backend is something like this at the moment, to check the hash I need
the cl
; On Sep 24, 10:14 am, Florian Schweikert
> wrote:
> > Hello,
> >
> > {% trans Pagetitle %} produces TemplateSyntaxError when there is no
> > Pagetitle given, without translation django ignores it.
> > Why i18n can't translate/ignore NoneType? I don't
Hello,
{% trans Pagetitle %} produces TemplateSyntaxError when there is no
Pagetitle given, without translation django ignores it.
Why i18n can't translate/ignore NoneType? I don't want to use if around all
this varibles. Is there any more confortable way?
greetings,
Florian
--~--~-~--~-
2009/9/23
> Hi,
>
> I've a project with 2 apps, I'm using the meta class for defining
> verbose_name(_plural), register in admin.py.
> For The first app it works good, in the second django shows often the
> (buggy) generic name, for example:
>
> "Lv a_types"(the space is on the wrong place I thin
Maybe it's that old bug:
http://blog.umlungu.co.uk/blog/2007/may/20/cookie-problem-django-admin/
Server Upgrade to Lenny is planned in the near future, I hope the problem
solves itself with the dist-upgrade.
greetz,
Florian
--~--~-~--~~~---~--~~
You received this m
Now I'm able to login etc, but only with django-server, with apache also the
admin interface informs me that my browser doesn't allow cookies. So there's
a problem with apache and/or mod_python. :-/
I'll test this after the planned upgrade to lenny again.
--~--~-~--~~~-
1 Russell Keith-Magee
>
> On Fri, Aug 21, 2009 at 9:10 PM, Florian
> Schweikert wrote:
>
> > In summary:
> > * On the server (etch) session flushes by request.user.is_authenticated()
> > (e.g session.user switched to anonymous without any findable reason)
> after
Tried to use sqlite, to test if it's a db problem, but django aren't able to
open a sqlite databasefile which has the right permissions. Trying postgres
next.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django us
I tried it on my notebook with the django server, the cookie wasn't touched,
but request.session.session_key changes every request.
Using the db session backend avoid login, cached_db and cache works
temporally.
In summary:
* On the server (etch) session flushes by request.user.is_authenticated()
I wrote a tiny page which just shows the session_key.
I can refresh this site and the key is the same, but if I open one of the
other pages the request.user.is_authenticated() method opens a new session.
:(
Nevertheless thanks for your ideas.
greets,
florian
--~--~-~--~~~
2009/8/21 Russell Keith-Magee
>
> On Fri, Aug 21, 2009 at 12:17 AM, Kelvan
> wrote:
> >
> > I've a big problem with user authentification, my application get an
> > username and a hashkey to verify if the user is logged in. I wrote a
> > function that check this, it worked fine to log in the user
39 matches
Mail list logo