On 22/08/2018 9:05 AM, chanman wrote:
I want to have a page look different for users who are logged in and
those who aren't.
This is the "normal" way to do things
For users that are signed in the page will have a sidebar with account
management options. For users who aren't signed in, this
I want to have a page look different for users who are logged in and those
who aren't. For users that are signed in the page will have a sidebar with
account management options. For users who aren't signed in, this sidebar
shouldn't show up. The most obvious way to do this would be to have a
try this but it does not work, keep ordering by year, and not by day
ascending
cardio = Alumno.objects.filter ( fechanacimiento __month =
now.month).order_by(‘fechanacimiento’)
- *2 Ago. 1943*
* - 15 Ago. 1948- 28 Ago. 1948- 13 Ago. 1959- 21 Ago. 1962- 7 Ago. 1967- 5
Ago. 1970-
try this but it did not work
Alumno.objects.filter().order_by('fechanacimiento__month') if you
want to filter descending so with the "-" before the
"fechanacimiento__month" by example:
Alumno.objects.filter().order_by('-fechanacimiento__month') #
descending
Saludos, los views lo creas en una aplicación, con el comando ( ver abajo )
creas la aplicación donde defines tus modelos, tus vistas, tus
funcionalidades y es donde creas lo que va en la base de datos:
$ python manage.py startapp nombre_aplicacion
I got it , it works as it is described, my fault.
Am Sonntag, 19. August 2018 17:57:15 UTC+2 schrieb Christian:
>
> Hi,
>
> I'm trying to use a customized version of index as describe here-
>
> https://django-rest-swagger.readthedocs.io/en/latest/customization/#customization
>
> I tried different
https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html
--
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 email
to
Ahora mismo me uniré te agradezco mucho la ayuda amigo
El martes, 21 de agosto de 2018, 13:05:39 (UTC-4), sacrac escribió:
>
> Hola Dario tenemos un grupo en español djan...@googlegroups.com
> donde podes hacer las preguntas en español
> pero para contestarte pues bien por seguridad cuando
Mil gracias enserio!! me sirvio la respuesta ahora ya consegui trabajar
sobre el me salio el erro 500 creo que ya ahi debo de configurar y crear
mis directorios y mis views si no me equivoco?, una vez mas mil gracias
El martes, 21 de agosto de 2018, 13:46:17 (UTC-4), Franklin Sarmiento
There is some discussion on the topic here:
https://www.reddit.com/r/django/comments/8xcbtq/book_announcement_building_multi_tenant/
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails
Try this:
Alumno.objects.filter().order_by('fechanacimiento__month',
'fechanacimiento__day')
Alumno.objects.filter().order_by('fechanacimiento__month,
fechanacimiento__day')
Alumno.objects.filter().order_by('fechanacimiento__month').order_by('fechanacimiento__day')
The best solution is:
Alumno.objects.filter().order_by('fechanacimiento__month') if you
want to filter descending so with the "-" before the
"fechanacimiento__month" by example:
Alumno.objects.filter().order_by('-fechanacimiento__month') #
descending
I have problems ordering the date per day in ascending order.
thanks to your answer I have managed to filter the list for the current
month, but unfortunately it is sorted by year and not by day in ascending
order
def cardio(request):
now = timezone.now()
cardio =
Aparte de eso necesitas agregar otras cosas por ejemplo el comando para
correr en la consola deberia ser asi:
$ python manage.py runserver 192.168.0.1
y en tu navegador cargarlo por ejemplo: http://192.168.0.1:8000
Ya con eso trabajarias con el DEBUG en False.
Saludos, el DEBUG = True es para separar las configuraciones de lo que
sería un despliegue a producción y un ambiente local, el ALLOWED_HOST es un
settings para definir los dominios permitidos cuando estará en modo
producción, ( DEBUG = False practicamente es para ya funcionar en
producción ) si
Hola Dario tenemos un grupo en español django...@googlegroups.com donde
podes hacer las preguntas en español
pero para contestarte pues bien por seguridad cuando vayas a poner en
produccion tu sitio desactiva el debug con falso y en el
alloed_host debes colocar o la ip de tu servidor o mejor el tu
Hola soy principiante en django y python y yo de Paraguay un país del que
solo hablamos español y me disculpo por mi ortografía, entonces mi pregunta
es sobre el MODO DEBUG = VERDADERO porque leí la documentación y entiendo
que cuando el modo de depuración es cierto es muy importante
Changing all modelformset factories to inlineformsets and then specifying
an instance on both the post and get methods resolved this issue.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving
Hi
I don't know if this is a common question, but I couldn't find anything
resembling my problem.
I have a page called "Case". On this page some basic information is added
along with the creation of 1 or 2 clients (fixed) Client's are FK to the
Case model. These are added using inlineformset
Please show your code for models and provide more details about changes
that wasn't reflected
Did you have any errors or warnings? What version of Django are you using?
>
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from
Please show your code for models and provide more details about changes
that wasn't reflected
Did you have any errors or warnings? What version of Django are you using?
On Tue, Aug 21, 2018 at 4:42 PM Roshan Jha wrote:
> Hi All,
>
> I had created a class based model with attributes.
>
> The
Hi All,
I had created a class based model with attributes.
The first migration went well and I could see the table in database
(postgres).
However, when I modified the model, the migration is unable to pick the
changes.
Any inputs would be highly appreciated.
Thanks,
Roshan |
You can chain the methods.
cardio = Alumno.objects.filter ( fechanacimiento __month =
now.month).order_by(‘fechanacimiento’)
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Osvaldo Ruso Olea
Sent: Monday, August 20, 2018 9:49 PM
To:
That shouldn't be necessary, as the tutorial has you put the CSS file into
the static directory in your polls app, not your project. Static files in
your polls app should be found with the default settings:
Django’s STATICFILES_FINDERS
>
If you think about it, you might see why you could do this, but you'd lose
everything related to referential integrity. Nothing stopping you from
making a router that behind the scenes uses multiple dbs seamlessly, but
how would you handle changes from the other db in your own if you can't get
I'm doing the Django tutorial and got stuck on the static files
section:
https://docs.djangoproject.com/en/2.1/intro/tutorial06/#customize-your-app-s-look-and-feel
Could not get the style.css file to work despite triple-checking
everything.
After much research, I got it to work by adding
Hello,
In my Django application, I want to use a foreign key from one db to
another. Is it possible? as I'm able to see the listing in /add endpoint
but when I try to save It says that the table doesn't exist.
Thanks
--
Regards,
Akshay Jain
--
You received this message because you are
Guys I need quick help.
There are two models and I would like to store a column field from one
model to another model.
models.py:
class Company(models.Model):
name = ...
def __str__(self):
return self.name
class Rate(models.Model):
company = models.ForeignKey(Company)
Hi.
Admin is designed to be datacentric view to your models, namely providing
simple CRUD ops to your data.
If you want something else which involves your business requirements and
logic, generic class based views do help there. But in any case, you should
build your own management console for
29 matches
Mail list logo