I am final year student of software engineering.My final year project is
about fee management system where student submit fee online and
administrator use this system for managing fee and scholarship of student
and notifying them about their any issue.So can i make web based
application or des
saludos. soy nuevo en el increible mundo de la programacion, primero
comence leyendo mucho y me gusto python., asi que lo instale ( la version
3.6.5.)
y me gusta mucho dibujar asi que me incline para hacer diseño de paginas
con django. si no es mucha molestia me podrian ayudar a instalar el mism
Hello django-users,
I have been encountering a strange behaviour when trying to run SQL
directly with a cursor. I am using Django 1.11 with porstgres 9.5.The query
normally returns 7 rows with 2 columns.
Symptoms:
- When reading the queryset of a query I get wrong results -> I still have
7 row
I forgot to leave, as I render the input
{% elif field.field.widget.input_type in "file" %}
{{ field.errors }}
{{ field.label }}
I want to modify or format the html generators by the input type="file".
I want to give it its own style, with the same structure as the html of the
input type="file", of the admin
but:
I'm rendering the form, manually, to add materializecss styles
https://docs.djangoproject.com/en/2.1/topi
Hi,
First of all - the examples you are giving can't be correct.
z = Model.objects.get(name=x)
will only return 1 object - and will raise an exception if you get more
than one result. So in this case z should be an instance of the model Model.
z =
and cannot be [, ]
When querying the second q
[, ]
and
[[, ]]
1st came from z = Model.objects.get(name=x)
This returns the object name
2nd came from z = Model.objects.filter(name=x)
The 2nd method when you look for the id
for x in z:
print(x.id)
fails with
'QuerySet' object has no attribute 'id'
also tried
zz = Model.objects.
Yes but it is completely OK to have a directory called models to store your
models in. That's the way we do it for our project. However you can't have
both a directory AND a models.py file.
If you choose to go with the models module (a directory called models), you
need to have the __init__.py fil
Ok ... Shame ... i found, One day I created a "models" directory to store
my models ... So because of this, it didn't make any migrations ...
Sorry for the inconvenience, but now I know I have to take care about my
folder naming convention ...
Kind regards
Benjamin.
--
You received this mess
The annotate(seats_remaining=...) will add a `seats_remaining` attribute to
Event
instances returned from the queryset so you should be able to use
{{i.seats_remaining }}
Cheers,
Le vendredi 7 septembre 2018 04:38:05 UTC-4, mab.mo...@gmail.com a écrit :
>
> Thank you Simon.
>
> I will take a lo
Ok - I think you need first of all to decide if you want to use the models
module or a models.py file. You are now using both - which won't work. The
import that you have written in the __init__.py file shouldn't work either
because you are using a relative import to get an absolute file.
First tr
I agree it should, but it doesn't, better, it does not find my model:
[image: project_structure.png]
[image: issue__init__.png]
--
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
So the models directory should look like this:
__init__.py
model1.py
In the __init__.py file you should have the following:
from .model1 import Model1
Then it should "just work".
Regards
Andréas
Den fre 7 sep. 2018 kl 16:35 skrev Benjamin SOULAS <
benjamin.soula...@gmail.com>:
> Ok, so I thi
Ok, so I think I really have a much deeper problem, __init__.py file are
there, nothing still happen
Le vendredi 7 septembre 2018 16:31:01 UTC+2, Andréas Kühne a écrit :
>
> If you follow the way Mike suggests - migrations will work (this is the
> way we do it in our plattform). The important t
If you follow the way Mike suggests - migrations will work (this is the way
we do it in our plattform). The important thing is that you MUST have a
models.py file OR a models module (a directory with the name models and a
__init__.py file with the imports from the individual files).
Regards,
Andr
Hi Mike (again !),
Okay, but it seems I have a much deeper problem, nothing happens during
make migration command, I am thinking on deleting my db and restart from
scratch ...
Thanks !
Le vendredi 7 septembre 2018 16:25:21 UTC+2, Mike Dewhirst a écrit :
>
> Easy
>
> Create a models directory.
Easy
Create a models directory. In there make __init__.py file and in there ...
from .whatever import Whatever
... 100 classes
Then in ./models create 100 files with one model class in each file
Anywhere in the project you can say ...
from app.models import Whatever
Connected by Motorola
B
Ok, but importing external scripts (but still in the project) should work?
Even adding my model code inside models.py, no migration happens.
Le vendredi 7 septembre 2018 16:18:47 UTC+2, Gerald Brown a écrit :
>
> There should be a models.py file under each of your applications.
>
> On Friday, 07
There should be a models.py file under each of your applications.
On Friday, 07 September, 2018 10:06 PM, Benjamin SOULAS wrote:
Hi everyone,
Quick question I do not find the answer: does models have to located
into *models.py* script? It believe not, If I got a project composed
of 100 table
Hi everyone,
Quick question I do not find the answer: does models have to located into
*models.py* script? It believe not, If I got a project composed of 100
tables, it's weird to me that all models should be located here ...
I tried, in this file, to import a model located somewhere else, but
Here is an example. I've cut out some of the code, but I this will give you
the general idea. Note, I move the data from the Day form in to the Classes
table. But you could just save both sets of data to their respective tables
if desired.
in views.py
class ClassesAddView(LoginRequiredMixin,Vi
I think it would be easier to write out a custom form (without using your
model classes, just the fields that you will need for all the models) and
then in the save method for that form's view, you create model objects
using the fields in the POST request.
On Friday, September 7, 2018 at 5:43:1
I am a newbie to Django. I was trying in to make an employee management
system.
So I need an advice on how to create a master-detail type layout
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving e
Do you have something to save multiform using by one view?/
On Fri, Sep 7, 2018 at 5:33 PM Elphas Rop wrote:
> you make the 3 forms then make a view for saving each form then url for
> each them then in each form action add a url to the view responsible for
> saving it
>
> On Fri, Sep 7, 2018,
you make the 3 forms then make a view for saving each form then url for
each them then in each form action add a url to the view responsible for
saving it
On Fri, Sep 7, 2018, 14:27 Elphas Rop wrote:
> >>
>>> tax_rate = forms.FloatField(required=True, label="tax rate")
>>>
>>>
>>>
following are my models they are not related to each other.
class StUserTaxDetails(models.Model):
user = models.ForeignKey(UserModel, on_delete=models.DO_NOTHING, null=False,
default=None)
tax_name = models.CharField(max_length=50)
tax_rate = models.FloatField()
def __str__(self):
return se
Show your models.py.
On Fri, Sep 7, 2018 at 4:13 PM Django Lover wrote:
>
> I have one page, which I have to show three model form and three
> different submit button for each.
>
> My question is how I can save these three form individually?
>
> FOLLOWING IS CODE:-
>
> **form.py**
>
>
> class Us
Hi.
Django is really frontend agnostic and there isn't definite answer what is
the best framework.
So pick one that you're happy with.
pe 7. syysk. 2018 klo 8.20 Md.iftequar iqbal
kirjoitti:
> Which is the best best frontend js for django
>
>
> On Fri, 7 Sep 2018, 10:34 am Andréas Kühne,
> w
I have one page, which I have to show three model form and three
different submit button for each.
My question is how I can save these three form individually?
FOLLOWING IS CODE:-
**form.py**
class UserTaxesMultiForm(MultiModelForm):
form_classes = {
'user_tax_form': MyForm,
HELLO, good morning!
I am not very familiarised with python, but I have been reading some
documentations, so have been struggling with one problem, I hope someone
is able to help me.
So I have created a queryset to insert the locale clause in all queries in
3 different models of my ap
Hi Ruping,
I realise you posted this over two years ago but my company is trying to
integrate Django with Greenplum for a small project. I more or less believe
it isn't possible without changing Django's own code (which we strictly do
not want to do) so I'm wondering if you ever got it to work,
Thank you Simon.
I will take a look at annotations.
How would I represent seats remaining in the template for loop? Here is
what I have so far.
#
{% for i in events %}
{{ i.event_date|date:"l M j, Y" }} {{
i.event_time|date:"g:i A" }}
{{i.event_type|t
Well indeed, flattening the ldap groups hierarchy could be a solution, but
I don't know if my boss will be OK with that, we are still thinking about
implementation and explore the techno we need to implement our features.
But I think I will keep it in mind seriously, because it could resolve the
On 7/09/2018 4:38 PM, Benjamin SOULAS wrote:
Actually, I don't use ldap groups permission really,
I'm jumping to conclusions here with inadequate evidence. But I'll go
ahead anyway. It makes sense to me that your app being different than
the ldap system will have no use for ldap permissions.
34 matches
Mail list logo