Hello, I'm trying to start a git repo that onyl controls the changes in my
app of my Django's project, but I don't get other thing that a VCS error
'cause of a root problem: so I can git the entire project, but not an app
separately. Does anyone had this problem before? Is something of Django
c
I refer to a new project (in all the possible meanings). When I use
*startapp* to create an app, I want to only git (as you would do for any
other thing) that app, nothing more:
django-admin startproject myproject
cd myproject
python3 manage.py startapp myapp
cd myapp
git init
It's very simple:
I'm doing a little app that consists of a web page were users submits their
jokes (https://github.com/RompePC/django-muro_humoristas/tree/feature). I
had finished the models (a little overview would help), but I have one
question.
I want to use an avatar field for the users: however, I don't un
Nah, I just want to have an avatar inside, to get easy.
And I tried the media docs a few hours ago, but for some reason it doesn't
work. I've to set specific URL in *urls.py* of the app? (Also notice that I
use another folder inside media, but I don't think that's the problem).
El viernes, 24 d
Yeah, there is a test image to do the work. But I'm not using HTML elements
to see it: I'm trying to directly see it with the URL, like when you open a
Twitter image in a new tab.
About the setup...
MEDIA_ROOT = os.path.join(BASE_DIR, '/media/')
MEDIA_URL = '/media/'
So *localhost:8000/media/ima
It seems that my last message didn't submitted for some reason, but
whatever. I found the problem: it was the *MEDIA_ROOT*. And because of such
a noob like me.
*Correct:*
os.path.join(BASE_DIR, 'myApp/media/')
*Wrong:*
os.path.join(BASE_DIR, '/media/')
*Also correct (media is below "myProject"):
I've searched for where to put the validators for my models, but I only
found that they fit in *models.py*, outside the model class.
Is that correct or I should create a specific file for them?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
Yeah, I can put it whenever I want, and just import then, but it is good to
know the exact way (as when following PEP 8).
El miércoles, 29 de julio de 2015, 17:40:45 (UTC+2), felix escribió:
>
> El 29/07/15 10:54, durir...@gmail.com escribió:
>
> I've searched for where to put the validators
I'm in a point of my app where I've two GET params, *p* and *q* (pagination
and query search), and I think that the best method to remember the params
value when you change page is to use a string to manually build up the
params URL. Any ideas?
--
You received this message because you are subs
So, I'm trying to use inputs with the *hidden* attr. I have my form class (
*IndexForm*) that has this:
field = HiddenInput()
Then, I pass the instance of IndexForm (*index_form*) to the template, and
manually render the field (*index_form.field*). It is alright, but then, in
the HTML, the render
Yeah, I deleted the post cause I thinked the same yesterday. Sorry for the
inconvenience.
El viernes, 7 de agosto de 2015, 13:07:49 (UTC+2), Tom Evans escribió:
>
> On Thu, Aug 6, 2015 at 6:55 PM, >
> wrote:
> > So, I'm trying to use inputs with the hidden attr. I have my form class
> > (Inde
I searched in the web for some example of setting a FK in a ModelForm
(bound and unbound), but the examples I founded didn't worked for me. The
best thing I think I've is this:
*forms.py*
*class RegistroComentarioForm(ModelForm):def __init__(self, *args,
**kwargs):super(Regi
I get the same, an empty select.
El sábado, 8 de agosto de 2015, 22:49:19 (UTC+2), James Schneider escribió:
>
> Try removing the .values_list() portion of the query set in your
> ModelForm. You should be passing a query set, not a list of values. The
> form knows how to iterate through the que
>
> Have you created some in that test?
Now I realized I forget to add a *setUp* function with the DB rows...
.__.
It doesn't matter how many time I pass coding, always the same fails.
Thanks both.
El domingo, 9 de agosto de
Ok, now I've other problem, and it is that in the HTML the *Select* doesn't
changes the value selected (it is always the first one, *"-"*). Any
particullary reason for it?
El domingo, 9 de agosto de 2015, 18:51:30 (UTC+2), durir...@gmail.com
escribió:
>
> Have you created some in that t
I did the tutorial for reusable apps for Django. All went well... but then
I get problems when installing the app.
Processing ./django-muro_humoristas/dist/django-muro_humoristas-1.tar.gz
Requirement already satisfied (use --upgrade to upgrade):
django-muro-humoristas==1 from
file:///media/Com
I use no virtualenv, to throw away solutions in that direction.. (didn't
wanna to go hard first time).
*pip* is only installed in 3.2, so that wasn't the problem. I've solved the
problem right now, but after an hour of trial and error, I think the only
think was to do *--upgrade wheel*. Is was j
I had searched in the web about local communication between apps, but I
didn't find anything (or, at least, didn't catch it) about calling an app
from another. Let's say I've this:
http://localhost:8000/app1/resources/user?id=123
http://localhost:8000/app2/list_users
Each app (by the way, first
Thanks for the responses. Now I'll try to explain ahead:
If both apps are running on the same host (or more concisely, both apps can
> access the database for app1), why not just add a database router to app2
> and have it pull the information directly?
> https://docs.djangoproject.com/en/1.8/to
19 matches
Mail list logo