Mmm maybe creating a tag
https://docs.djangoproject.com/en/1.8/howto/custom-template-tags/#writing-custom-template-tags
In template {% mytag obj prop %}
In tag function
def mytag(obj, prop):
return getattr(obj, prop)
El miércoles, 20 de mayo de 2015, rishi sijariya
You don't need to alter any model, only need to create a form class
(better) or using request.POST.get("username").
If you want to do in right way
See
https://docs.djangoproject.com/en/1.8/topics/forms/
El jueves, 21 de mayo de 2015, dk escribió:
> I am not going to update
It is easy, you only need to put id attribute to form statement like this
{{form.as_p}}
In CSS use cascade starting by #myform.
Other thing I was used form.as_p for printing as , but you could used
form.as_ul or form.as_table too. By default as_table is set when you do
{{form}}
El jueves,
Take a look at this http://kivy.org/docs/api-kivy.network.urlrequest.html
for Kivy
and http://www.django-rest-framework.org/ for django.
You need to do a web service with django I suggest a restfull service and
with kivy urlrequest create a client.
2015-05-13 18:07 GMT-06:00 john
And you need to put inside the form the csrf token .
{% csrf_token %} ...
See: https://docs.djangoproject.com/en/1.8/ref/csrf/
2015-05-20 16:40 GMT-06:00 술욱 :
> Hi,
>
> just make sure you match your input names with what Django expects. For
> example:
>
> If the HTML is
Sorry, James is right, your problem is like James described.
Sorry for the noise I read again and see that I understood bad your problem.
Sorry
El viernes, 8 de mayo de 2015, Luis Zárate <luisz...@gmail.com> escribió:
> Which urls.py you paste here? The project URLs or the
Which urls.py you paste here? The project URLs or the app urls .?
It is because you are using namespace in the url reverse so you need to
named in your project's URLs and put the code paste here in your app urls.
El jueves, 7 de mayo de 2015, James Schneider
escribió:
>
Your server log said this (loading my.wsgi)
Exception occurred processing WSGI script
'/code/projects/my_web/wsgi/my.wsgi'.
But your structure said that wsgi file is called different (idrac.wsgi).
Other thing, call core your app is not a good idea, do it if you understand
well how python import
I don't know if work with many to many is the best approach, because if you
know that only have two emails for user and you check his email a lot then
the cost of join in time and machine resources increase innecessarily So
knowledge of you requirements determine your db scheme.
Using the first
Other thing that I forgot in the last mail is how use function now()
Wrong solution
from datetime import datetime
datetime.now()
Good solution
from django.utils import timezone
timezone.now()
2015-04-08 10:16 GMT-06:00 Luis Zárate <luisz...@gmail.com>:
> Do you have insta
Do you have installed pytz ? Django use it when USE_TZ is True.
2015-04-08 6:54 GMT-06:00 Olalla Galiñanes Feijoo <
olalla.galina...@gmail.com>:
> Time zone support is disabled by default. To enable it, set USE_TZ = True
>
I don't understand what you want to do but I guest it's like verbatim
https://docs.djangoproject.com/en/1.8/ref/templates/builtins/#verbatim
2015-04-07 12:18 GMT-06:00 Hanz :
> Hi everyone,
> i want to show some piece of code on my website. What is the best way to
> do it? (embed
dmin/', include(admin.site.urls)),
> url(r'^', include('myproj.urls', namespace='myproj')),
> ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
>
> On Tue, Apr 7, 2015 at 12:30 PM, Luis Zárate <luisz...@gmail.com> wrote:
>
>> Hi,
>>
>> Django provide
Hi,
Django provide for development MEDIA_URL and MEDIA_ROOT for uploaded file,
for production used static deploy strategy, see the documentation about
static files.
Model file field has an url attribute that return a media url, you use in
template like {{obj.file.url}}
El martes, 7 de abril de
Are you deploy your application ?
https://docs.djangoproject.com/en/1.8/howto/deployment/
It's important *Don't use development environment in production apps!!!*
It's simple to login user in admin site, create a user and check the *is
staff* option and set the user permissions. ( site admin
Sorry I forget to send you a reference link
https://docs.djangoproject.com/en/1.7/topics/auth/default/#django.contrib.auth.login
2015-04-04 17:00 GMT-06:00 Luis Zárate <luisz...@gmail.com>:
> It's because you need to login the user (authenticate don't login only get
> the use
It's because you need to login the user (authenticate don't login only get
the user )
It's something like this:
from django.contrib.auth import authenticate, login
def my_view(request):
username = request.POST['username']
password = request.POST['password']
user =
Are you runing python 2.7.x ? Think in python 3 compatibility and solve
your problem
This code can help you.
from __future__ import unicode_literals
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class MyModel(models.Model):
name =
mmm Maybe you should use form wizard if you have too many forms
https://docs.djangoproject.com/en/1.7/ref/contrib/formtools/form-wizard/
2015-03-31 5:11 GMT-06:00 Bill Blanchard :
> Hi Stephanie,
> Ping me offline, I might be able to help you out.
> On Mar 30, 2015
Are you looking for IDE ?
Look here
https://code.djangoproject.com/wiki/DjangoResources#IntegratedDevelopmentEnvironments
2015-04-03 23:00 GMT-06:00 Sreenivasarao Pallapu :
> To kick start your Python learning go to
> https://www.udacity.com/course/ud036, (or)
> if
What is your machine name? It had a non ASCII character?
Do you use __unicode___ ? In python 3 is __str__
El sábado, 28 de marzo de 2015, Anderson Resende <
andersonresend...@gmail.com> escribió:
> Put this code on first line in your files.py:
>
> # -*- coding: utf-8 -*-
>
>
> Maybe work!
>
>
You maybe need to take a look documentation of using routes.
https://docs.djangoproject.com/en/1.7/topics/db/multi-db/#using-routers
2015-03-16 8:47 GMT-06:00 Domagoj Kovač :
> Hi Raphael,
>
> I also though this are may options, although first option is the easiest i
>
Your python configuration is ok. so I guest you have someone of this
problem.
- Your work path has spaces and python confuse with them.
- Your system mimetype for .py use notepad++ for open it.
I don't know if this solve your issue but I think that check this prevent
you a headache
I test
201 - 223 of 223 matches
Mail list logo